]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Update GridTools::transform() for use with simplex meshes 10846/head
authorPasquale Africa <pasqualeclaudio.africa@polimi.it>
Wed, 26 Aug 2020 09:33:11 +0000 (09:33 +0000)
committerPasquale Africa <pasqualeclaudio.africa@polimi.it>
Wed, 26 Aug 2020 16:08:14 +0000 (16:08 +0000)
doc/news/changes/minor/20200826PasqualeAfrica [new file with mode: 0644]
include/deal.II/grid/grid_tools.h

diff --git a/doc/news/changes/minor/20200826PasqualeAfrica b/doc/news/changes/minor/20200826PasqualeAfrica
new file mode 100644 (file)
index 0000000..f0387e6
--- /dev/null
@@ -0,0 +1,3 @@
+Updated: GridTools::transform() now works with simplex meshes.
+<br>
+(Pasquale Claudio Africa, 2020/08/26)
index aebd0cd7dbb623ed2a68256477d1a042e26d111f..d781ceba28ec6a671ccb3d7c87236da8582440d8 100644 (file)
@@ -3198,7 +3198,7 @@ namespace GridTools
       cell = triangulation.begin_active(),
       endc = triangulation.end();
     for (; cell != endc; ++cell)
-      for (const unsigned int v : GeometryInfo<dim>::vertex_indices())
+      for (const unsigned int v : cell->vertex_indices())
         if (treated_vertices[cell->vertex_index(v)] == false)
           {
             // transform this vertex
@@ -3219,6 +3219,10 @@ namespace GridTools
             if (cell->face(face)->has_children() &&
                 !cell->face(face)->at_boundary())
               {
+                Assert(cell->reference_cell_type() ==
+                         ReferenceCell::get_hypercube(dim),
+                       ExcNotImplemented());
+
                 // this line has children
                 cell->face(face)->child(0)->vertex(1) =
                   (cell->face(face)->vertex(0) + cell->face(face)->vertex(1)) /
@@ -3235,6 +3239,10 @@ namespace GridTools
             if (cell->face(face)->has_children() &&
                 !cell->face(face)->at_boundary())
               {
+                Assert(cell->reference_cell_type() ==
+                         ReferenceCell::get_hypercube(dim),
+                       ExcNotImplemented());
+
                 // this face has hanging nodes
                 cell->face(face)->child(0)->vertex(1) =
                   (cell->face(face)->vertex(0) + cell->face(face)->vertex(1)) /

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.