From: heister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Date: Thu, 27 Feb 2014 14:08:05 +0000 (+0000)
Subject: ignore FE_Nothing in FESystem logic regarding support points
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2d4c2bc17b7843fb6a140a999349a50ead00f88;p=dealii-svn.git

ignore FE_Nothing in FESystem logic regarding support points

git-svn-id: https://svn.dealii.org/trunk@32569 0785d39b-7218-0410-832d-ea1e28bc413d
---

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_el<this->n_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;