From: oliver Date: Sat, 23 Oct 2004 14:38:21 +0000 (+0000) Subject: Implemented a small fix, which sets near zero elements in the constraint X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=442639454ca60b36c0b8fa57191b59219248c4ea;p=dealii-svn.git Implemented a small fix, which sets near zero elements in the constraint matrix, which stem from numerical inaccuracies, to zero. git-svn-id: https://svn.dealii.org/trunk@9721 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/fe_q.cc b/deal.II/deal.II/source/fe/fe_q.cc index 1ac505552c..6420c058ba 100644 --- a/deal.II/deal.II/source/fe/fe_q.cc +++ b/deal.II/deal.II/source/fe/fe_q.cc @@ -1398,6 +1398,20 @@ FE_Q<3>::initialize_constraints () interface_constraints(j,i) = poly_f->compute_value(face_index_map [i], constraint_points[j]); + + // if the value is small up + // to round-off, then + // simply set it to zero to + // avoid unwanted fill-in + // of the constraint + // matrices (which would + // then increase the number + // of other DoFs a + // constrained DoF would + // couple to) + if (std::fabs(interface_constraints(j,i)) < 1e-14) + interface_constraints(j,i) = 0; + indx++; } delete poly_f;