]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix face domination between FE_Q and FE_DGQ.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 11 Jan 2017 20:18:32 +0000 (13:18 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 12 Jan 2017 05:01:15 +0000 (22:01 -0700)
Right now, one got an answer if one asked the FE_DGQ whether or not
it dominates the FE_Q, but not the other way around. Make this symmetric.

While there, also include FE_DGP in the test.

source/fe/fe_q_base.cc

index 4b3f1ccf9a0d51354ffbd24dae07099bf41c413f..cb0b1d848bcee19704f8042aaf91e115d1f88f32 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2000 - 2015 by the deal.II authors
+// Copyright (C) 2000 - 2017 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -22,6 +22,8 @@
 #include <deal.II/base/tensor_product_polynomials_bubbles.h>
 #include <deal.II/base/polynomials_piecewise.h>
 #include <deal.II/fe/fe_q_base.h>
+#include <deal.II/fe/fe_dgq.h>
+#include <deal.II/fe/fe_dgp.h>
 #include <deal.II/fe/fe_nothing.h>
 #include <deal.II/fe/fe_tools.h>
 #include <deal.II/base/quadrature_lib.h>
@@ -876,6 +878,14 @@ compare_for_face_domination (const FiniteElement<dim,spacedim> &fe_other) const
           return FiniteElementDomination::no_requirements;
         }
     }
+  else if ((dynamic_cast<const FE_DGQ<dim,spacedim>*>(&fe_other) != 0)
+           ||
+           (dynamic_cast<const FE_DGP<dim,spacedim>*>(&fe_other) != 0))
+    {
+      // there are no requirements between continuous and
+      // discontinuous elements
+      return FiniteElementDomination::no_requirements;
+    }
 
   Assert (false, ExcNotImplemented());
   return FiniteElementDomination::neither_element_dominates;

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.