From: Wolfgang Bangerth Date: Sat, 18 Jul 1998 14:40:40 +0000 (+0000) Subject: Fix small problem. X-Git-Tag: v8.0.0~22806 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfae7164788b6001e4d3edf4c5a11579c7dcddd6;p=dealii.git Fix small problem. git-svn-id: https://svn.dealii.org/trunk@448 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 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