From: kronbichler Date: Thu, 18 Mar 2010 16:02:17 +0000 (+0000) Subject: Modify tolerable round-off errors so that also 8th order polynomials can be initialized. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5b3208d25fa8c9362fc084f9851897e082efd37;p=dealii-svn.git Modify tolerable round-off errors so that also 8th order polynomials can be initialized. git-svn-id: https://svn.dealii.org/trunk@20847 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 06b74131de..f6da1338b3 100644 --- a/deal.II/deal.II/source/fe/fe_q.cc +++ b/deal.II/deal.II/source/fe/fe_q.cc @@ -778,10 +778,12 @@ get_interpolation_matrix (const FiniteElement &x_source_fe, cell_interpolation.mmult (interpolation_matrix, source_interpolation); + const double eps = 2e-13*this->degree*dim; + // cut off very small values for (unsigned int i=0; idofs_per_cell; ++i) for (unsigned int j=0; j &x_source_fe, for (unsigned int j=0; jdegree*dim, - ExcInternalError()); + Assert (std::fabs(sum-1) < eps, ExcInternalError()); } } @@ -1577,7 +1578,7 @@ FE_Q::initialize_embedding () const std::vector &index_map= this->poly_space.get_numbering(); - const double eps = 2e-13*this->degree*this->degree*dim; + const double eps = 1e-13*this->degree*this->degree*this->degree*this->degree*dim; unsigned n_ones = 0; // precompute subcell interpolation @@ -1694,8 +1695,7 @@ FE_Q::initialize_embedding () double sum = 0; for (unsigned int col=0; coldofs_per_cell; ++col) sum += this->prolongation[ref][child](row,col); - Assert (std::fabs(sum-1.) < eps, - ExcInternalError()); + Assert (std::fabs(sum-1.) < this->degree*eps, ExcInternalError()); } } } @@ -1752,7 +1752,7 @@ FE_Q::initialize_restriction () // (compute on a later child), so // we don't have to care about this - const double eps = 2e-13*this->degree*this->degree*dim; + const double eps = 1e-13*this->degree*this->degree*this->degree*this->degree*dim; const std::vector &index_map_inverse= this->poly_space.get_numbering_inverse(); for (unsigned int i=0; idofs_per_cell; ++i) @@ -1823,7 +1823,8 @@ FE_Q::initialize_restriction () sum_check += val; } - Assert (std::fabs(sum_check-1) < eps, ExcInternalError()); + Assert (std::fabs(sum_check-1) < this->degree*eps, + ExcInternalError()); } } }