From dfae7164788b6001e4d3edf4c5a11579c7dcddd6 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sat, 18 Jul 1998 14:40:40 +0000 Subject: [PATCH] Fix small problem. git-svn-id: https://svn.dealii.org/trunk@448 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/numerics/matrices.cc | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/deal.II/deal.II/source/numerics/matrices.cc b/deal.II/deal.II/source/numerics/matrices.cc index f25cffd6d2..91b7f988f1 100644 --- a/deal.II/deal.II/source/numerics/matrices.cc +++ b/deal.II/deal.II/source/numerics/matrices.cc @@ -14,6 +14,7 @@ #include #include +#include @@ -220,7 +221,15 @@ void MatrixCreator::create_boundary_mass_matrix (const DoFHandler & // points and finally all of its // entries in the cell matrix and // vector should be zero. If not, we - // throw an error + // throw an error (note: because of + // the evaluation of the shape + // functions only up to machine + // precision, the term "must be zero" + // really should mean: "should be + // very small". since this is only an + // assertion and not part of the + // code, we may choose "very small" + // quite arbitrarily) // // the main problem here is that the // matrix or vector entry should also @@ -257,13 +266,19 @@ void MatrixCreator::create_boundary_mass_matrix (const DoFHandler & dof_to_boundary_mapping[dofs[j]], cell_matrix(i,j)); else - Assert (cell_matrix(i,j)==0, ExcInternalError ()); + { + Assert (fabs(cell_matrix(i,j)) <= 1e-10, + ExcInternalError ()); + }; for (unsigned int j=0; j