]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Assert correct matrix dimensions
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 9 Dec 1999 22:41:57 +0000 (22:41 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 9 Dec 1999 22:41:57 +0000 (22:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@2035 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 42260889104a28a9040278680b7fefaed1be0927..d57cf1c2ae1a7aed8fb427c64674bb76d14b69ea 100644 (file)
@@ -1004,7 +1004,11 @@ MatrixCreator<dim>::create_interpolation_matrix(const FiniteElement<dim> &high,
   Assert (high.n_components() == low.n_components(),
          ExcInvalidFE());
   
-  result.reinit (low.dofs_per_cell, high.dofs_per_cell);
+  Assert (result.m() == low.dofs_per_cell,
+         ExcDimensionMismatch(result.m(), low.dofs_per_cell));
+  Assert (result.n() == high.dofs_per_cell,
+         ExcDimensionMismatch(result.n(), high.dofs_per_cell));
+
 
                                   // Initialize FEValues at the support points
                                   // of the low element.

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.