]> https://gitweb.dealii.org/ - dealii.git/commitdiff
MatrixFree: enable wedges (excluding faces integrals) 11298/head
authorPeter Munch <peterrmuench@gmail.com>
Wed, 2 Dec 2020 22:16:46 +0000 (23:16 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Wed, 2 Dec 2020 22:43:51 +0000 (23:43 +0100)
include/deal.II/matrix_free/mapping_info.templates.h
include/deal.II/matrix_free/shape_info.templates.h

index 444d5c1b8c3a517fbf66241bfc9b8ca7294c3d26..c2d822fff7e31285184bd8929ab0033bde5fae12 100644 (file)
@@ -405,9 +405,17 @@ namespace internal
               if (flag == false)
                 {
 #ifdef DEAL_II_WITH_SIMPLEX_SUPPORT
-                  const auto quad_face = get_face_quadrature(quad[my_q][hpq]);
-                  face_data[my_q].descriptor[hpq].initialize(quad_face,
-                                                             update_default);
+                  try
+                    {
+                      const auto quad_face =
+                        get_face_quadrature(quad[my_q][hpq]);
+                      face_data[my_q].descriptor[hpq].initialize(
+                        quad_face, update_default);
+                    }
+                  catch (...)
+                    {
+                      // TODO: nothing to do for now for wedges and pyramids.
+                    }
 #else
                   Assert(false, ExcNotImplemented());
 #endif
@@ -431,9 +439,17 @@ namespace internal
               if (flag == false)
                 {
 #ifdef DEAL_II_WITH_SIMPLEX_SUPPORT
-                  const auto quad_face = get_face_quadrature(quad[my_q][hpq]);
-                  face_data_by_cells[my_q].descriptor[hpq].initialize(
-                    quad_face, update_default);
+                  try
+                    {
+                      const auto quad_face =
+                        get_face_quadrature(quad[my_q][hpq]);
+                      face_data_by_cells[my_q].descriptor[hpq].initialize(
+                        quad_face, update_default);
+                    }
+                  catch (...)
+                    {
+                      // TODO: nothing to do for now for wedges and pyramids.
+                    }
 #else
                   Assert(false, ExcNotImplemented());
 #endif
index 636127c5ba6781a772a982d95d2875caa5c5cebf..f087691d634917320daa17584ae2660cb77d92dd 100644 (file)
@@ -92,7 +92,8 @@ namespace internal
       const auto fe_poly = dynamic_cast<const FE_Poly<dim, dim> *>(fe);
 
       if (dynamic_cast<const Simplex::FE_P<dim, dim> *>(fe) != nullptr ||
-          dynamic_cast<const Simplex::FE_DGP<dim, dim> *>(fe) != nullptr)
+          dynamic_cast<const Simplex::FE_DGP<dim, dim> *>(fe) != nullptr ||
+          dynamic_cast<const Simplex::FE_WedgeP<dim, dim> *>(fe) != nullptr)
         {
           scalar_lexicographic.resize(fe->n_dofs_per_cell());
           for (unsigned int i = 0; i < scalar_lexicographic.size(); ++i)
@@ -204,7 +205,8 @@ namespace internal
               // Simplices are a special case since the polynomial family is not
               // indicative of their support
               if (dynamic_cast<const Simplex::FE_P<dim> *>(fe_poly_ptr) ||
-                  dynamic_cast<const Simplex::FE_DGP<dim> *>(fe_poly_ptr))
+                  dynamic_cast<const Simplex::FE_DGP<dim> *>(fe_poly_ptr) ||
+                  dynamic_cast<const Simplex::FE_WedgeP<dim> *>(fe_poly_ptr))
                 return true;
 #endif
 
@@ -243,6 +245,8 @@ namespace internal
           dynamic_cast<const Simplex::FE_P<dim> *>(
             &fe_in.base_element(base_element_number)) ||
           dynamic_cast<const Simplex::FE_DGP<dim> *>(
+            &fe_in.base_element(base_element_number)) ||
+          dynamic_cast<const Simplex::FE_WedgeP<dim> *>(
             &fe_in.base_element(base_element_number)))
         {
           // specialization for arbitrary finite elements and quadrature rules
@@ -306,10 +310,10 @@ namespace internal
                                   q] = grad[d];
               }
 
-          const auto reference_cell_type = ReferenceCell::get_simplex(dim);
-
           try
             {
+              const auto reference_cell_type = ReferenceCell::get_simplex(dim);
+
               const auto quad_face  = get_face_quadrature(quad);
               this->n_q_points_face = quad_face.size();
 

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.