]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Assert reference cell is hypercube in Discrete*QuadratureGenerator 13810/head
authorSimon Sticko <simon@sticko.se>
Wed, 25 May 2022 07:32:12 +0000 (09:32 +0200)
committerSimon Sticko <simon@sticko.se>
Wed, 25 May 2022 07:51:50 +0000 (09:51 +0200)
source/non_matching/quadrature_generator.cc

index f69033abf382d9711b694dfa9a742d7747ade81a..9a530fa7f25a5cb733bacda53f3602049df00870 100644 (file)
@@ -1278,6 +1278,10 @@ namespace NonMatching
         ExcCellNotSet,
         "The set_active_cell function has to be called before calling this function.");
 
+      DeclExceptionMsg(
+        ExcReferenceCellNotHypercube,
+        "The reference cell of the incoming cell must be a hypercube.");
+
 
       /**
        * This class evaluates a function defined by a solution vector and a
@@ -1891,6 +1895,10 @@ namespace NonMatching
   DiscreteQuadratureGenerator<dim>::generate(
     const typename Triangulation<dim>::active_cell_iterator &cell)
   {
+    Assert(cell->reference_cell().is_hyper_cube(),
+           internal::DiscreteQuadratureGeneratorImplementation::
+             ExcReferenceCellNotHypercube());
+
     reference_space_level_set->set_active_cell(cell);
     const BoundingBox<dim> unit_box = create_unit_bounding_box<dim>();
     QuadratureGenerator<dim>::generate(*reference_space_level_set, unit_box);
@@ -1921,6 +1929,10 @@ namespace NonMatching
     const typename Triangulation<dim>::active_cell_iterator &cell,
     const unsigned int                                       face_index)
   {
+    Assert(cell->reference_cell().is_hyper_cube(),
+           internal::DiscreteQuadratureGeneratorImplementation::
+             ExcReferenceCellNotHypercube());
+
     reference_space_level_set->set_active_cell(cell);
     const BoundingBox<dim> unit_box = create_unit_bounding_box<dim>();
     FaceQuadratureGenerator<dim>::generate(*reference_space_level_set,

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.