From: Ralf Hartmann Date: Wed, 29 Aug 2001 10:16:34 +0000 (+0000) Subject: Fix assertion. X-Git-Tag: v8.0.0~18877 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be951a37cc6bb5d001e833a987b1547f6b597611;p=dealii.git Fix assertion. git-svn-id: https://svn.dealii.org/trunk@4921 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 b4111d439e..245d16507b 100644 --- a/deal.II/deal.II/source/numerics/matrices.cc +++ b/deal.II/deal.II/source/numerics/matrices.cc @@ -117,7 +117,8 @@ void MatrixCreator::create_mass_matrix_1 (const Mapping &mapping, const FiniteElement &fe = fe_values.get_fe(); const unsigned int n_components = fe.n_components(); - Assert(coefficient->n_components==1 || + Assert(coefficient == 0 || + coefficient->n_components==1 || coefficient->n_components==n_components, ExcComponentMismatch()); FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); @@ -273,7 +274,8 @@ MatrixCreator::create_mass_matrix_2 (const Mapping &mapping, const FiniteElement &fe = fe_values.get_fe(); const unsigned int n_components = fe.n_components(); - Assert(coefficient->n_components==1 || + Assert(coefficient == 0 || + coefficient->n_components==1 || coefficient->n_components==n_components, ExcComponentMismatch()); FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); @@ -477,7 +479,8 @@ create_boundary_mass_matrix_1 (const Mapping &mapping, ExcInternalError()); Assert (n_components == boundary_functions.begin()->second->n_components, ExcComponentMismatch()); - Assert (coefficient->n_components==1 || + Assert (coefficient ==0 || + coefficient->n_components==1 || coefficient->n_components==n_components, ExcComponentMismatch()); #ifdef DEBUG if (true) @@ -872,7 +875,8 @@ void MatrixCreator::create_laplace_matrix_1 (const Mapping &mapping, const FiniteElement &fe = fe_values.get_fe(); const unsigned int n_components = fe.n_components(); - Assert(coefficient->n_components==1 || + Assert(coefficient == 0 || + coefficient->n_components==1 || coefficient->n_components==n_components, ExcComponentMismatch()); FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); @@ -1069,7 +1073,8 @@ MatrixCreator::create_laplace_matrix_2 (const Mapping &mapping, const FiniteElement &fe = fe_values.get_fe(); const unsigned int n_components = fe.n_components(); - Assert(coefficient->n_components==1 || + Assert(coefficient == 0 || + coefficient->n_components==1 || coefficient->n_components==n_components, ExcComponentMismatch()); FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell);