From: kanschat Date: Thu, 9 Dec 1999 22:41:57 +0000 (+0000) Subject: Assert correct matrix dimensions X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74bfddf6986da41d4df4da1c35ad89182ed33696;p=dealii-svn.git Assert correct matrix dimensions git-svn-id: https://svn.dealii.org/trunk@2035 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/numerics/matrices.cc b/deal.II/deal.II/source/numerics/matrices.cc index 4226088910..d57cf1c2ae 100644 --- a/deal.II/deal.II/source/numerics/matrices.cc +++ b/deal.II/deal.II/source/numerics/matrices.cc @@ -1004,7 +1004,11 @@ MatrixCreator::create_interpolation_matrix(const FiniteElement &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.