From: Denis Davydov Date: Mon, 1 Feb 2016 10:26:01 +0000 (+0100) Subject: remove invalid assert in compute_line_dof_identities() related to element domination... X-Git-Tag: v8.4.0-rc2~43^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8754c480b22c0c66d3c8a29804de9c6bec1360f1;p=dealii.git remove invalid assert in compute_line_dof_identities() related to element domination; add a unit test --- diff --git a/source/hp/dof_handler.cc b/source/hp/dof_handler.cc index 5bc2f527d5..79b267ef3f 100644 --- a/source/hp/dof_handler.cc +++ b/source/hp/dof_handler.cc @@ -2321,15 +2321,10 @@ namespace hp if (i == (*finite_elements)[fe_index_1].dofs_per_line) { - // the dofs of these two finite elements are - // identical. as a safety check, ensure that none - // of the two FEs is trying to dominate the other, - // which wouldn't make any sense in this case - Assert ((*finite_elements)[fe_index_1].compare_for_face_domination - ((*finite_elements)[fe_index_2]) - == - FiniteElementDomination::either_element_can_dominate, - ExcInternalError()); + // The line dofs (i.e., the ones interior to a line) of these two finite elements are identical. + // Note that there could be situations when one element still dominates another, e.g.: + // FE_Q(2) x FE_Nothing(dominate) vs + // FE_Q(2) x FE_Q(1) --unique_sets_of_dofs; diff --git a/tests/fe/fe_nothing.cc b/tests/fe/fe_nothing.cc new file mode 100644 index 0000000000..43be9c2769 --- /dev/null +++ b/tests/fe/fe_nothing.cc @@ -0,0 +1,103 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../tests.h" + +#include +#include + +const double eps = 1e-10; + + +using namespace dealii; + +template +void test2cells(const unsigned int p1=2, + const unsigned int p2=1) +{ + deallog << "2cells: "<(); + test2cells<3>(); + } + catch (std::exception &exc) + { + std::cerr << std::endl << std::endl + << "----------------------------------------------------" + << std::endl; + std::cerr << "Exception on processing: " << std::endl + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + + return 1; + } + catch (...) + { + std::cerr << std::endl << std::endl + << "----------------------------------------------------" + << std::endl; + std::cerr << "Unknown exception!" << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; + }; +} diff --git a/tests/fe/fe_nothing.output b/tests/fe/fe_nothing.output new file mode 100644 index 0000000000..d5ac6116e1 --- /dev/null +++ b/tests/fe/fe_nothing.output @@ -0,0 +1,9 @@ + +DEAL::2cells: 2d, p1=2, p2=1 + 8 = 0 + 12 = 0 +DEAL::2cells: 3d, p1=2, p2=1 + 20 = 0 + 24 = 0 + 28 = 0 + 32 = 0