From: kayser-herold Date: Mon, 31 Jul 2006 01:27:09 +0000 (+0000) Subject: Added the lines to adjust almost 1 and almost 0 entries X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc4c718c60b7b8d91fa5a3675fbf6d226396b2db;p=dealii-svn.git Added the lines to adjust almost 1 and almost 0 entries in the face/subface interpolation matrices to the method for subfaces. git-svn-id: https://svn.dealii.org/trunk@13534 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 cd33fd99a2..24767f8841 100644 --- a/deal.II/deal.II/source/fe/fe_q.cc +++ b/deal.II/deal.II/source/fe/fe_q.cc @@ -493,11 +493,17 @@ get_subface_interpolation_matrix (const FiniteElement &x_source_fe, ExcDimensionMismatch (interpolation_matrix.m(), source_fe.dofs_per_face)); - // generate a point on this - // cell and evaluate the - // shape functions there + // generate a point on this + // cell and evaluate the + // shape functions there Quadrature quad_face_support (source_fe.get_unit_face_support_points ()); + // Rule of thumb for FP accuracy, + // that can be expected for a + // given polynomial degree. + // This value is used to cut + // off values close to zero. + double eps = 2e-14*this->degree*(dim-1); // compute the interpolation // matrix by simply taking the @@ -510,14 +516,23 @@ get_subface_interpolation_matrix (const FiniteElement &x_source_fe, Point p = QProjector::project_to_subface (quad_face_support, 0, subface).point (i); for (unsigned int j=0; jdofs_per_face; ++j) - interpolation_matrix(j,i) = this->shape_value (this->face_to_cell_index(j, 0), p); - } + { + double matrix_entry = this->shape_value (this->face_to_cell_index(j, 0), p); - // cut off very small values - for (unsigned int i=0; idofs_per_face; ++i) - for (unsigned int j=0; j