From: Melanie Gerault Date: Fri, 9 Aug 2019 05:34:05 +0000 (-0600) Subject: Figures for 2D and 3D grids plus edits on grid_generator.cc X-Git-Tag: v9.2.0-rc1~1243^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8526%2Fhead;p=dealii.git Figures for 2D and 3D grids plus edits on grid_generator.cc --- diff --git a/doc/doxygen/images/eccentric_hyper_shell_2D.png b/doc/doxygen/images/eccentric_hyper_shell_2D.png new file mode 100644 index 0000000000..d87400b6b7 Binary files /dev/null and b/doc/doxygen/images/eccentric_hyper_shell_2D.png differ diff --git a/doc/doxygen/images/eccentric_hyper_shell_3D.png b/doc/doxygen/images/eccentric_hyper_shell_3D.png new file mode 100644 index 0000000000..134c4156f5 Binary files /dev/null and b/doc/doxygen/images/eccentric_hyper_shell_3D.png differ diff --git a/source/grid/grid_generator.cc b/source/grid/grid_generator.cc index ed123dd0ba..6099f7750f 100644 --- a/source/grid/grid_generator.cc +++ b/source/grid/grid_generator.cc @@ -3003,58 +3003,6 @@ namespace GridGenerator tria.set_manifold(0, SphericalManifold<2>(center)); } - template - void - eccentric_hyper_shell(Triangulation &tria, - const Point & inner_center, - const Point & outer_center, - const double inner_radius, - const double outer_radius, - const unsigned int n_cells) - { - GridGenerator::hyper_shell( - tria, outer_center, inner_radius, outer_radius, n_cells, true); - - // check the consistency of the dimensions provided - Assert( - outer_radius - inner_radius > outer_center.distance(inner_center), - ExcInternalError( - "The inner radius is greater than or equal to the outer radius plus eccentricity.")); - - // shift nodes along the inner boundary according to the position of - // inner_circle - std::set *> vertices_to_move; - - for (const auto &cell : tria.active_cell_iterators()) - for (unsigned int f = 0; f < GeometryInfo::faces_per_cell; ++f) - if (cell->face(f)->boundary_id() == 0) - for (unsigned int v = 0; v < GeometryInfo::vertices_per_face; - ++v) - vertices_to_move.insert(&cell->face(f)->vertex(v)); - - const auto shift = inner_center - outer_center; - for (const auto &p : vertices_to_move) - (*p) += shift; - - // the original hyper_shell function assigns the same manifold id - // to all cells and faces. Set all manifolds ids to a different - // value (2), then use boundary ids to assign different manifolds to - // the inner (0) and outer manifolds (1). Use a transfinite manifold - // for all faces and cells aside from the boundaries. - tria.set_all_manifold_ids(2); - GridTools::copy_boundary_to_manifold_id(tria); - - SphericalManifold inner_manifold(inner_center); - SphericalManifold outer_manifold(outer_center); - - TransfiniteInterpolationManifold transfinite; - transfinite.initialize(tria); - - tria.set_manifold(0, inner_manifold); - tria.set_manifold(1, outer_manifold); - tria.set_manifold(2, transfinite); - } - template @@ -3108,6 +3056,7 @@ namespace GridGenerator } + // Implementation for 2D only template <> void cylinder(Triangulation<2> &tria,