From: Wolfgang Bangerth Date: Mon, 7 Feb 2000 12:29:11 +0000 (+0000) Subject: Small clean-up. X-Git-Tag: v8.0.0~21020 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=400d49f9820e0dc7a1ed2cef9b3bcb14514280fc;p=dealii.git Small clean-up. git-svn-id: https://svn.dealii.org/trunk@2340 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/sparse_vanka.h b/deal.II/lac/include/lac/sparse_vanka.h index 71f0623d19..76b0d1ad81 100644 --- a/deal.II/lac/include/lac/sparse_vanka.h +++ b/deal.II/lac/include/lac/sparse_vanka.h @@ -499,14 +499,29 @@ class SparseBlockVanka : public SparseVanka /** * 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 > dof_masks; + + /** + * Compute the contents of the + * field #dof_masks#. This + * function is called from the + * constructor. + */ + void compute_dof_masks (const SparseMatrix &M, + const vector &selected, + const BlockingStrategy blocking_strategy); }; diff --git a/deal.II/lac/include/lac/sparse_vanka.templates.h b/deal.II/lac/include/lac/sparse_vanka.templates.h index a2abf3c700..be154d391b 100644 --- a/deal.II/lac/include/lac/sparse_vanka.templates.h +++ b/deal.II/lac/include/lac/sparse_vanka.templates.h @@ -397,6 +397,17 @@ SparseBlockVanka::SparseBlockVanka (const SparseMatrix &M, n_blocks (n_blocks), dof_masks (n_blocks, vector(M.m(), false)) +{ + compute_dof_masks (M, selected, blocking_strategy); +}; + + + +template +void +SparseBlockVanka::compute_dof_masks (const SparseMatrix &M, + const vector &selected, + const BlockingStrategy blocking_strategy) { Assert (n_blocks > 0, ExcInternalError());