From: Wolfgang Bangerth Date: Thu, 18 May 2000 12:07:42 +0000 (+0000) Subject: Add more assertions. X-Git-Tag: v8.0.0~20518 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8b7725ad6fe851bc35c90eb6b83ab209cb9674c;p=dealii.git Add more assertions. git-svn-id: https://svn.dealii.org/trunk@2887 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/numerics/matrices.h b/deal.II/deal.II/include/numerics/matrices.h index 14aa6cdb3f..679948e1de 100644 --- a/deal.II/deal.II/include/numerics/matrices.h +++ b/deal.II/deal.II/include/numerics/matrices.h @@ -483,6 +483,10 @@ class MatrixTools : public MatrixCreator * Exception */ DeclException0 (ExcMatrixNotBlockSquare); + /** + * Exception + */ + DeclException0 (ExcBlocksDontMatch); }; diff --git a/deal.II/deal.II/source/numerics/matrices.cc b/deal.II/deal.II/source/numerics/matrices.cc index 9e64d9de02..fa62dc9371 100644 --- a/deal.II/deal.II/source/numerics/matrices.cc +++ b/deal.II/deal.II/source/numerics/matrices.cc @@ -698,6 +698,13 @@ MatrixTools::apply_boundary_values (const map &boundar Assert (matrix.get_sparsity_pattern().get_row_indices() == matrix.get_sparsity_pattern().get_column_indices(), ExcMatrixNotBlockSquare()); + Assert (matrix.get_sparsity_pattern().get_column_indices() == + solution.get_block_indices (), + ExcBlocksDontMatch ()); + Assert (matrix.get_sparsity_pattern().get_row_indices() == + right_hand_side.get_block_indices (), + ExcBlocksDontMatch ()); + // if no boundary values are to be applied // simply return