From b2d4c2bc17b7843fb6a140a999349a50ead00f88 Mon Sep 17 00:00:00 2001 From: heister Date: Thu, 27 Feb 2014 14:08:05 +0000 Subject: [PATCH] ignore FE_Nothing in FESystem logic regarding support points git-svn-id: https://svn.dealii.org/trunk@32569 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/fe/fe.h | 5 ++++- deal.II/source/fe/fe_system.cc | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/deal.II/include/deal.II/fe/fe.h b/deal.II/include/deal.II/fe/fe.h index c78bf30ac8..761a1c4a0a 100644 --- a/deal.II/include/deal.II/fe/fe.h +++ b/deal.II/include/deal.II/fe/fe.h @@ -1373,7 +1373,10 @@ public: * points associated with the other shape functions. * * In composed elements (i.e. for the FESystem class), the result will be - * true if all all the base elements have defined support points. + * true if all all the base elements have defined support points. FE_Nothing + * is a special case in FESystems, because it has 0 support points and + * has_support_points() is false, but an FESystem containing an FE_Nothing + * among other elements will return true. */ bool has_support_points () const; diff --git a/deal.II/source/fe/fe_system.cc b/deal.II/source/fe/fe_system.cc index 84d0af0ef5..26f95e2b7f 100644 --- a/deal.II/source/fe/fe_system.cc +++ b/deal.II/source/fe/fe_system.cc @@ -1887,9 +1887,9 @@ initialize_unit_support_points () { // if one of the base elements has no support points, then it makes no sense // to define support points for the composed element, so return an empty - // array to demonstrate that fact + // array to demonstrate that fact. Note that we ignore FE_Nothing in this logic. for (unsigned int base_el=0; base_eln_base_elements(); ++base_el) - if (!base_element(base_el).has_support_points()) + if (!base_element(base_el).has_support_points() && base_element(base_el).dofs_per_cell!=0) { this->unit_support_points.resize(0); return; -- 2.39.5