]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove special treatment of boundary cells 12676/head
authorPeter Munch <peterrmuench@gmail.com>
Thu, 19 Aug 2021 06:49:05 +0000 (08:49 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Sat, 21 Aug 2021 05:41:22 +0000 (07:41 +0200)
source/grid/tria.cc
tests/manifold/manifold_id_06.output
tests/manifold/polar_manifold_02.output

index 2b8925bdcf1e5e24acf5c6825cc5d7166b2d19df..1b84026f27a3d74471b2e25b9bca6b118b420054 100644 (file)
@@ -3737,49 +3737,11 @@ namespace internal
 
             new_vertices[8] = next_unused_vertex;
 
-            // if this quad lives
-            // in 2d, then we can
-            // compute the new
-            // central vertex
-            // location just from
-            // the surrounding
-            // ones. If this is
-            // not the case, then
-            // we need to ask a
-            // boundary object
-            if (dim == spacedim)
-              {
-                // triangulation.vertices[next_unused_vertex] = new_point;
-                triangulation.vertices[next_unused_vertex] = cell->center(true);
-
-                // if the user_flag is set, i.e. if the cell is at the
-                // boundary, use a different calculation of the middle vertex
-                // here. this is of advantage if the boundary is strongly
-                // curved (whereas the cell is not) and the cell has a high
-                // aspect ratio.
-                if (cell->user_flag_set())
-                  {
-                    // first reset the user_flag and then refine
-                    cell->clear_user_flag();
-                    triangulation.vertices[next_unused_vertex] =
-                      cell->center(true, true);
-                  }
-              }
-            else
-              {
-                // if this quad lives in a higher dimensional space
-                // then we don't need to worry if it is at the
-                // boundary of the manifold -- we always have to use
-                // the boundary object anyway; so ignore whether the
-                // user flag is set or not
-                cell->clear_user_flag();
-
-                // determine middle vertex by transfinite interpolation to be
-                // consistent with what happens to quads in a Triangulation<3,
-                // 3> when they are refined
-                triangulation.vertices[next_unused_vertex] =
-                  cell->center(true, true);
-              }
+            // determine middle vertex by transfinite interpolation to be
+            // consistent with what happens to quads in a
+            // Triangulation<3,3> when they are refined
+            triangulation.vertices[next_unused_vertex] =
+              cell->center(true, true);
           }
 
 
@@ -4238,25 +4200,8 @@ namespace internal
 
               new_vertices[8] = next_unused_vertex;
 
-              if (dim == spacedim)
-                {
-                  triangulation.vertices[next_unused_vertex] =
-                    cell->center(true);
-
-                  if (cell->user_flag_set())
-                    {
-                      cell->clear_user_flag();
-                      triangulation.vertices[next_unused_vertex] =
-                        cell->center(true, true);
-                    }
-                }
-              else
-                {
-                  cell->clear_user_flag();
-
-                  triangulation.vertices[next_unused_vertex] =
-                    cell->center(true, true);
-                }
+              triangulation.vertices[next_unused_vertex] =
+                cell->center(true, true);
             }
 
           std::array<typename Triangulation<dim, spacedim>::raw_line_iterator,
@@ -4512,9 +4457,6 @@ namespace internal
                  triangulation.active_cell_iterators_on_level(level))
               if (cell->refine_flag_set())
                 {
-                  if (cell->at_boundary())
-                    cell->set_user_flag();
-
                   create_children(triangulation,
                                   next_unused_vertex,
                                   next_unused_line,
@@ -5060,15 +5002,6 @@ namespace internal
                  triangulation.active_cell_iterators_on_level(level))
               if (cell->refine_flag_set())
                 {
-                  // set the user flag to indicate, that at least one
-                  // line is at the boundary
-
-                  // TODO[Tobias Leicht] find a better place to set
-                  // this flag, so that we do not need so much time to
-                  // check each cell here
-                  if (cell->at_boundary())
-                    cell->set_user_flag();
-
                   // actually set up the children and update neighbor
                   // information
                   create_children(triangulation,
index 0291bf67d3f19358847336df61f2b9e469778b29..5ae79a6795aff1ae9ba1a4824616fde74242ae83 100644 (file)
@@ -118,13 +118,13 @@ $NOD
 66  0.0815301 0.0815301 0
 67  0.418470 0.0815301 0
 68  0.0815301 0.418470 0
-69  0.405284 0.405284 0
+69  0.418470 0.418470 0
 70  0.676265 0.119850 0
 71  0.887944 0.125000 0
-72  0.666941 0.376287 0
+72  0.676265 0.380150 0
 73  0.887944 0.375000 0
 74  0.119850 0.676265 0
-75  0.376287 0.666941 0
+75  0.380150 0.676265 0
 76  0.125000 0.887944 0
 77  0.375000 0.887944 0
 78  0.625000 0.625000 0
index 56bdedde2a5da4a4365110aeda2fef8f9ce3c210..ed26a6a3ca073abab791f36fbf41a22174be1e70 100644 (file)
@@ -72,24 +72,24 @@ $NOD
 69  2.87590e-17 0.469670 0
 70  -0.320837 -0.774570 0
 71  0.320837 -0.774570 0
-72  -0.200084 -0.471182 0
-73  0.200084 -0.471182 0
+72  -0.208485 -0.456792 0
+73  0.208485 -0.456792 0
 74  -0.774570 -0.320837 0
-75  -0.471182 -0.200084 0
+75  -0.456792 -0.208485 0
 76  -0.774570 0.320837 0
-77  -0.471182 0.200084 0
+77  -0.456792 0.208485 0
 78  -0.146447 -0.146447 0
 79  0.146447 -0.146447 0
 80  -0.146447 0.146447 0
 81  0.146447 0.146447 0
 82  0.774570 -0.320837 0
 83  0.774570 0.320837 0
-84  0.471182 -0.200084 0
-85  0.471182 0.200084 0
+84  0.456792 -0.208485 0
+85  0.456792 0.208485 0
 86  -0.320837 0.774570 0
-87  -0.200084 0.471182 0
+87  -0.208485 0.456792 0
 88  0.320837 0.774570 0
-89  0.200084 0.471182 0
+89  0.208485 0.456792 0
 $ENDNOD
 $ELM
 80

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.