]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Work on some asserts in MatrixFree 11227/head
authorPeter Munch <peterrmuench@gmail.com>
Sun, 22 Nov 2020 06:00:57 +0000 (07:00 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Sun, 22 Nov 2020 06:00:57 +0000 (07:00 +0100)
include/deal.II/matrix_free/evaluation_kernels.h
include/deal.II/matrix_free/mapping_info.templates.h

index 036b628f597b4ab9e332041a0c9b42d2ee9d31e6..dff4ba1e00bc079c0cab3be4b0d94eaa94dfa1a3 100644 (file)
@@ -2504,6 +2504,9 @@ namespace internal
         const unsigned int            face_orientation,
         const Table<2, unsigned int> &orientation_map)
     {
+      Assert(data.element_type != MatrixFreeFunctions::tensor_none,
+             ExcNotImplemented());
+
       constexpr unsigned int static_dofs_per_face =
         fe_degree > -1 ? Utilities::pow(fe_degree + 1, dim - 1) :
                          numbers::invalid_unsigned_int;
@@ -2594,6 +2597,9 @@ namespace internal
         const unsigned int            face_orientation,
         const Table<2, unsigned int> &orientation_map)
     {
+      Assert(data.element_type != MatrixFreeFunctions::tensor_none,
+             ExcNotImplemented());
+
       if (face_orientation)
         adjust_for_face_orientation(dim,
                                     n_components,
index 02ef441e584a88b9614f5f2167adaf8a22e03a6d..47e0d5c252193379ee4f573f45d8bf0e16243390 100644 (file)
@@ -376,12 +376,17 @@ namespace internal
                     flag &= quad[my_q][q].get_tensor_basis()[0] ==
                             quad[my_q][q].get_tensor_basis()[i];
                   }
-#ifdef DEAL_II_WITH_SIMPLEX_SUPPORT
+
               if (flag == false)
-                cell_data[my_q].descriptor[q].initialize(quad[my_q][q],
-                                                         update_default);
-              else
+                {
+#ifdef DEAL_II_WITH_SIMPLEX_SUPPORT
+                  cell_data[my_q].descriptor[q].initialize(quad[my_q][q],
+                                                           update_default);
+#else
+                  Assert(false, ExcNotImplemented());
 #endif
+                }
+              else
                 cell_data[my_q].descriptor[q].initialize(
                   quad[my_q][q].get_tensor_basis()[0], update_default);
             }

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.