From e21fad1a33771fbad382752fb07e91dd06f19320 Mon Sep 17 00:00:00 2001 From: bangerth Date: Fri, 27 Apr 2012 09:17:44 +0000 Subject: [PATCH] Avoid a few warnings. git-svn-id: https://svn.dealii.org/trunk@25458 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/lac/constraint_matrix.templates.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/deal.II/include/deal.II/lac/constraint_matrix.templates.h b/deal.II/include/deal.II/lac/constraint_matrix.templates.h index cc03ac7f52..ea3f98ab40 100644 --- a/deal.II/include/deal.II/lac/constraint_matrix.templates.h +++ b/deal.II/include/deal.II/lac/constraint_matrix.templates.h @@ -699,6 +699,10 @@ ConstraintMatrix::condense (BlockSparseMatrix &uncondensed, } +//TODO: I'm sure the followng could be made more elegant by using a bit of +//introspection using static member variables of the various vector +//classes to dispatch between the different functions, rather than using +//knowledge of the individual types // number of functions to select the right implementation for set_zero(). namespace internal @@ -711,7 +715,7 @@ namespace internal // for performance reasons template void set_zero_parallel(const dealii::ConstraintMatrix &cm, VEC &vec, unsigned int shift = 0) - { + { Assert(!vec.has_ghost_elements(), ExcInternalError());//ExcGhostsPresent()); const unsigned int @@ -721,13 +725,13 @@ namespace internal if (cm.is_constrained (shift + i)) vec(i) = 0; } - + template void set_zero_in_parallel(const dealii::ConstraintMatrix &cm, VEC &vec, internal::bool2type) { set_zero_parallel(cm, vec, 0); } - + // in parallel for BlockVectors template void set_zero_in_parallel(const dealii::ConstraintMatrix &cm, VEC &vec, internal::bool2type) @@ -739,7 +743,7 @@ namespace internal start_shift += vec.block(j).size(); } } - + template void set_zero_serial(const dealii::ConstraintMatrix &cm, VEC &vec) { @@ -773,7 +777,7 @@ namespace internal template - void set_zero_all(const dealii::ConstraintMatrix &cm, dealii::parallel::distributed::Vector &vec) + void set_zero_all(const dealii::ConstraintMatrix &, dealii::parallel::distributed::Vector &) { // should use the general template above, but requires that // some member functions are added to parallel::distributed::Vector @@ -781,14 +785,14 @@ namespace internal } template - void set_zero_all(const dealii::ConstraintMatrix &cm, dealii::parallel::distributed::BlockVector &vec) + void set_zero_all(const dealii::ConstraintMatrix &, dealii::parallel::distributed::BlockVector &) { Assert (false, ExcNotImplemented()); } } } } - + template void -- 2.39.5