]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use shortcase when determining isotropic refinement cases 13921/head
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Tue, 7 Jun 2022 21:02:22 +0000 (23:02 +0200)
committerMartin Kronbichler <martin.kronbichler@uni-a.de>
Tue, 7 Jun 2022 21:02:22 +0000 (23:02 +0200)
include/deal.II/base/geometry_info.h

index 4c778352d0b008bc70ac9ae16d78afa43dba01c6..ab7ac139e490a8869fa67eebd7d28cb62840daec 100644 (file)
@@ -3675,6 +3675,10 @@ GeometryInfo<2>::face_refinement_case(
                    RefinementCase<dim>::isotropic_refinement + 1);
   AssertIndexRange(face_no, GeometryInfo<dim>::faces_per_cell);
 
+  // simple special case
+  if (cell_refinement_case == RefinementCase<dim>::cut_xy)
+    return RefinementCase<1>::cut_x;
+
   const RefinementCase<dim - 1>
     ref_cases[RefinementCase<dim>::isotropic_refinement +
               1][GeometryInfo<dim>::faces_per_cell / 2] = {
@@ -3706,6 +3710,10 @@ GeometryInfo<3>::face_refinement_case(
                    RefinementCase<dim>::isotropic_refinement + 1);
   AssertIndexRange(face_no, GeometryInfo<dim>::faces_per_cell);
 
+  // simple special case
+  if (cell_refinement_case == RefinementCase<dim>::cut_xyz)
+    return RefinementCase<dim - 1>::cut_xy;
+
   const RefinementCase<dim - 1>
     ref_cases[RefinementCase<dim>::isotropic_refinement + 1]
              [GeometryInfo<dim>::faces_per_cell / 2] = {
@@ -3816,6 +3824,10 @@ GeometryInfo<3>::line_refinement_case(
                    RefinementCase<dim>::isotropic_refinement + 1);
   AssertIndexRange(line_no, GeometryInfo<dim>::lines_per_cell);
 
+  // simple special case
+  if (cell_refinement_case == RefinementCase<dim>::cut_xyz)
+    return RefinementCase<1>::cut_x;
+
   // array indicating, which simple refine
   // case cuts a line in direction x, y or
   // z. For example, cut_y and everything

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.