]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Small clean-up.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 7 Feb 2000 12:29:11 +0000 (12:29 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 7 Feb 2000 12:29:11 +0000 (12:29 +0000)
git-svn-id: https://svn.dealii.org/trunk@2340 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/sparse_vanka.h
deal.II/lac/include/lac/sparse_vanka.templates.h

index 71f0623d1985477e2a83c1b06f57bad2b7ec7121..76b0d1ad813ebd162a3f2cd314150309f3606b40 100644 (file)
@@ -499,14 +499,29 @@ class SparseBlockVanka : public SparseVanka<number>
 
                                     /**
                                      * In this field, we precompute
-                                     * the first and the one after
-                                     * the last index of each
-                                     * block. This computation is
-                                     * done in the constructor, to
-                                     * avoid recomputing each time
-                                     * the preconditioner is called.
+                                     * for each block which degrees
+                                     * of freedom belong to it. Thus,
+                                     * if #dof_masks[i][j]==true#,
+                                     * then DoF #j# belongs to block
+                                     * #i#. Of course, no other
+                                     * #dof_masks[l][j]# may be
+                                     * #true# for #l!=i#. This
+                                     * computation is done in the
+                                     * constructor, to avoid
+                                     * recomputing each time the
+                                     * preconditioner is called.
                                      */
     vector<vector<bool> > dof_masks;
+
+                                    /**
+                                     * Compute the contents of the
+                                     * field #dof_masks#. This
+                                     * function is called from the
+                                     * constructor.
+                                     */
+    void compute_dof_masks (const SparseMatrix<number> &M,
+                           const vector<bool>         &selected,
+                           const BlockingStrategy      blocking_strategy);
 };
 
 
index a2abf3c700ac7dabf8348b235f7a97b299b30474..be154d391bf03903d8c785ce5a63fd5e7e33bda0 100644 (file)
@@ -397,6 +397,17 @@ SparseBlockVanka<number>::SparseBlockVanka (const SparseMatrix<number> &M,
                 n_blocks (n_blocks),
                 dof_masks (n_blocks,
                           vector<bool>(M.m(), false))
+{
+  compute_dof_masks (M, selected, blocking_strategy);
+};
+
+
+
+template <typename number>
+void
+SparseBlockVanka<number>::compute_dof_masks (const SparseMatrix<number> &M,
+                                            const vector<bool>         &selected,
+                                            const BlockingStrategy      blocking_strategy) 
 {
   Assert (n_blocks > 0, ExcInternalError());
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.