From b131b8b166b859537689e9f793c2743fb7109707 Mon Sep 17 00:00:00 2001 From: bangerth Date: Tue, 6 Mar 2007 22:00:11 +0000 Subject: [PATCH] Loosen tolerances to allow for Q7 elements in 2d. git-svn-id: https://svn.dealii.org/trunk@14543 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/fe/fe_q.cc | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/deal.II/deal.II/source/fe/fe_q.cc b/deal.II/deal.II/source/fe/fe_q.cc index d3d0fc4ea7..34005afd84 100644 --- a/deal.II/deal.II/source/fe/fe_q.cc +++ b/deal.II/deal.II/source/fe/fe_q.cc @@ -317,7 +317,7 @@ get_interpolation_matrix (const FiniteElement &x_source_fe, for (unsigned int j=0; jdegree*dim, + Assert (std::fabs(sum-1) < 2e-13*this->degree*dim, ExcInternalError()); } } @@ -409,7 +409,7 @@ get_face_interpolation_matrix (const FiniteElement &x_source_fe, // given polynomial degree. // This value is used to cut // off values close to zero. - double eps = 2e-14*this->degree*(dim-1); + double eps = 2e-13*this->degree*(dim-1); // compute the interpolation // matrix by simply taking the @@ -452,7 +452,7 @@ get_face_interpolation_matrix (const FiniteElement &x_source_fe, for (unsigned int i=0; idofs_per_face; ++i) sum += interpolation_matrix(j,i); - Assert (std::fabs(sum-1) < 2e-14*this->degree*(dim-1), + Assert (std::fabs(sum-1) < 2e-13*this->degree*(dim-1), ExcInternalError()); } } @@ -511,7 +511,7 @@ get_subface_interpolation_matrix (const FiniteElement &x_source_fe, // given polynomial degree. // This value is used to cut // off values close to zero. - double eps = 2e-14*this->degree*(dim-1); + double eps = 2e-13*this->degree*(dim-1); // compute the interpolation // matrix by simply taking the @@ -554,7 +554,7 @@ get_subface_interpolation_matrix (const FiniteElement &x_source_fe, for (unsigned int i=0; idofs_per_face; ++i) sum += interpolation_matrix(j,i); - Assert (std::fabs(sum-1) < 2e-14*this->degree*(dim-1), + Assert (std::fabs(sum-1) < 2e-13*this->degree*(dim-1), ExcInternalError()); } } @@ -1332,15 +1332,15 @@ FE_Q::initialize_embedding () // growth in // degree*dim, times a // small constant. - if (std::fabs(cell_value) < 2e-14*this->degree*dim) + if (std::fabs(cell_value) < 2e-13*this->degree*this->degree*dim) cell_interpolation(j, i) = 0.; else cell_interpolation(j, i) = cell_value; - if (std::fabs(subcell_value) < 2e-14*this->degree*dim) + if (std::fabs(subcell_value) < 2e-13*this->degree*this->degree*dim) subcell_interpolation(j, i) = 0.; else - if (std::fabs(subcell_value-1) < 2e-14*this->degree*dim) + if (std::fabs(subcell_value-1) < 2e-13*this->degree*this->degree*dim) subcell_interpolation(j, i) = 1.; else // we have put our @@ -1380,7 +1380,7 @@ FE_Q::initialize_embedding () // here for (unsigned int i=0; idofs_per_cell; ++i) for (unsigned int j=0; jdofs_per_cell; ++j) - if (std::fabs(this->prolongation[child](i,j)) < 2e-14*this->degree*dim) + if (std::fabs(this->prolongation[child](i,j)) < 2e-13*this->degree*dim) this->prolongation[child](i,j) = 0.; // and make sure that the row @@ -1392,7 +1392,7 @@ FE_Q::initialize_embedding () double sum = 0; for (unsigned int col=0; coldofs_per_cell; ++col) sum += this->prolongation[child](row,col); - Assert (std::fabs(sum-1.) < 2e-14*this->degree*dim, + Assert (std::fabs(sum-1.) < 2e-13*this->degree*this->degree*dim, ExcInternalError()); } } @@ -1461,7 +1461,7 @@ FE_Q::initialize_restriction () { const double val = this->poly_space.compute_value(mother_dof, p_cell); - if (std::fabs (val-1.) < 2e-14*this->degree*dim) + if (std::fabs (val-1.) < 2e-13*this->degree*this->degree*dim) // ok, this is the right // dof break; @@ -1469,14 +1469,14 @@ FE_Q::initialize_restriction () // make sure that all // other shape functions // are zero there - Assert (std::fabs(val) < 2e-14*this->degree*dim, + Assert (std::fabs(val) < 2e-13*this->degree*this->degree*dim, ExcInternalError()); } // check also the shape // functions after tat for (unsigned int j=mother_dof+1; jdofs_per_cell; ++j) Assert (std::fabs (this->poly_space.compute_value(j, p_cell)) - < 2e-14*this->degree*dim, + < 2e-13*this->degree*this->degree*dim, ExcInternalError()); // then find the children on @@ -1508,15 +1508,15 @@ FE_Q::initialize_restriction () { const double val = this->poly_space.compute_value(child_dof, p_subcell); - if (std::fabs (val-1.) < 2e-14*this->degree*dim) + if (std::fabs (val-1.) < 2e-13*this->degree*this->degree*dim) break; else - Assert (std::fabs(val) < 2e-14*this->degree*dim, + Assert (std::fabs(val) < 2e-13*this->degree*this->degree*dim, ExcInternalError()); } for (unsigned int j=child_dof+1; jdofs_per_cell; ++j) Assert (std::fabs (this->poly_space.compute_value(j, p_subcell)) - < 2e-14*this->degree*dim, + < 2e-13*this->degree*this->degree*dim, ExcInternalError()); // so now that we have -- 2.39.5