From 67e07d9fc88ace4290fb3d37c5785272cbafbf2c Mon Sep 17 00:00:00 2001 From: kronbichler Date: Tue, 14 May 2013 15:01:54 +0000 Subject: [PATCH] Avoid running into an assertion for very high order. git-svn-id: https://svn.dealii.org/trunk@29511 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/fe/fe_q_base.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/deal.II/source/fe/fe_q_base.cc b/deal.II/source/fe/fe_q_base.cc index bb320f8a4c..331131daf3 100644 --- a/deal.II/source/fe/fe_q_base.cc +++ b/deal.II/source/fe/fe_q_base.cc @@ -185,14 +185,15 @@ struct FE_Q_Base::Implementation const std::vector &index_map_inverse = fe.poly_space.get_numbering_inverse(); const std::vector face_index_map = - FE_Q_Helper::face_lexicographic_to_hierarchic_numbering<2>(fe.degree); - Assert(fe.poly_space.compute_value(index_map_inverse[0],Point<2>()) == 1., + FE_Q_Helper::face_lexicographic_to_hierarchic_numbering(fe.degree); + Assert(std::abs(fe.poly_space.compute_value(index_map_inverse[0],Point()) + - 1.) < 1e-14, ExcInternalError()); for (unsigned int i=0; i p; + Point p; p[0] = constraint_points[i](0); fe.interface_constraints(i,face_index_map[j]) = fe.poly_space.compute_value(index_map_inverse[j], p); @@ -304,8 +305,9 @@ struct FE_Q_Base::Implementation const std::vector &index_map_inverse = fe.poly_space.get_numbering_inverse(); const std::vector face_index_map = - FE_Q_Helper::face_lexicographic_to_hierarchic_numbering<3>(fe.degree); - Assert(fe.poly_space.compute_value(index_map_inverse[0],Point<3>()) == 1., + FE_Q_Helper::face_lexicographic_to_hierarchic_numbering(fe.degree); + Assert(std::abs(fe.poly_space.compute_value(index_map_inverse[0],Point()) + - 1.) < 1e-14, ExcInternalError()); fe.interface_constraints -- 2.39.5