]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add more assertions.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 18 May 2000 12:07:42 +0000 (12:07 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 18 May 2000 12:07:42 +0000 (12:07 +0000)
git-svn-id: https://svn.dealii.org/trunk@2887 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/matrices.h
deal.II/deal.II/source/numerics/matrices.cc

index 14aa6cdb3fe39c929a0080adf13f0ca41c40756a..679948e1deb1acc80fcd7f4ebce97116eb65ebb6 100644 (file)
@@ -483,6 +483,10 @@ class MatrixTools : public MatrixCreator<dim>
                                      * Exception
                                      */
     DeclException0 (ExcMatrixNotBlockSquare);
+                                    /**
+                                     * Exception
+                                     */
+    DeclException0 (ExcBlocksDontMatch);
 };
 
 
index 9e64d9de0279b70cc37aea7bf7eb1b40db3c9f11..fa62dc93715067e790942e9c1a906130a045c52a 100644 (file)
@@ -698,6 +698,13 @@ MatrixTools<dim>::apply_boundary_values (const map<unsigned int,double> &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

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.