From 7dde5f365fc44c4411ff9120d16ed91d15dbeb0b Mon Sep 17 00:00:00 2001 From: wolf Date: Mon, 7 Feb 2000 12:29:11 +0000 Subject: [PATCH] Small clean-up. git-svn-id: https://svn.dealii.org/trunk@2340 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/sparse_vanka.h | 27 ++++++++++++++----- .../lac/include/lac/sparse_vanka.templates.h | 11 ++++++++ 2 files changed, 32 insertions(+), 6 deletions(-) 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()); -- 2.39.5