From 74bfddf6986da41d4df4da1c35ad89182ed33696 Mon Sep 17 00:00:00 2001 From: kanschat Date: Thu, 9 Dec 1999 22:41:57 +0000 Subject: [PATCH] Assert correct matrix dimensions git-svn-id: https://svn.dealii.org/trunk@2035 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/numerics/matrices.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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. -- 2.39.5