]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
ignore FE_Nothing in FESystem logic regarding support points
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 27 Feb 2014 14:08:05 +0000 (14:08 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 27 Feb 2014 14:08:05 +0000 (14:08 +0000)
git-svn-id: https://svn.dealii.org/trunk@32569 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/fe/fe.h
deal.II/source/fe/fe_system.cc

index c78bf30ac887483bd934b59118af864c855182d4..761a1c4a0af9a0c67c3fc87e8aaafd584d3b1c3d 100644 (file)
@@ -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;
 
index 84d0af0ef5234a8146f2cf258eaa3531b1948a23..26f95e2b7f6857cb5e73a6434d7b873d4fefc966 100644 (file)
@@ -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;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.