From: Pasquale Africa Date: Wed, 26 Aug 2020 09:33:11 +0000 (+0000) Subject: Update GridTools::transform() for use with simplex meshes X-Git-Tag: v9.3.0-rc1~1170^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10846%2Fhead;p=dealii.git Update GridTools::transform() for use with simplex meshes --- diff --git a/doc/news/changes/minor/20200826PasqualeAfrica b/doc/news/changes/minor/20200826PasqualeAfrica new file mode 100644 index 0000000000..f0387e6e29 --- /dev/null +++ b/doc/news/changes/minor/20200826PasqualeAfrica @@ -0,0 +1,3 @@ +Updated: GridTools::transform() now works with simplex meshes. +
+(Pasquale Claudio Africa, 2020/08/26) diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index aebd0cd7db..d781ceba28 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -3198,7 +3198,7 @@ namespace GridTools cell = triangulation.begin_active(), endc = triangulation.end(); for (; cell != endc; ++cell) - for (const unsigned int v : GeometryInfo::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)) /