16 #ifndef dealii_grid_generator_h 17 #define dealii_grid_generator_h 20 #include <deal.II/base/config.h> 22 #include <deal.II/base/exceptions.h> 23 #include <deal.II/base/function.h> 24 #include <deal.II/base/point.h> 25 #include <deal.II/base/table.h> 27 #include <deal.II/grid/tria.h> 32 DEAL_II_NAMESPACE_OPEN
90 template <
int dim,
int spacedim>
93 const double left = 0.,
94 const double right = 1.,
95 const bool colorize =
false);
139 template <
int dim,
int spacedim>
142 const unsigned int repetitions,
143 const double left = 0.,
144 const double right = 1.);
180 template <
int dim,
int spacedim>
185 const bool colorize =
false);
237 template <
int dim,
int spacedim>
240 const std::vector<unsigned int> &repetitions,
243 const bool colorize =
false);
263 const std::vector<std::vector<double>> &step_sizes,
266 const bool colorize =
false);
281 const std::vector<std::vector<double>> &spacing,
284 const bool colorize =
false);
312 template <
int dim,
int spacedim>
315 const std::vector<unsigned int> &holes);
363 const double inner_radius = 0.4,
364 const double outer_radius = 1.,
365 const double pad_bottom = 2.,
366 const double pad_top = 2.,
367 const double pad_left = 1.,
368 const double pad_right = 1.,
373 const unsigned int n_slices = 2,
374 const bool colorize =
false);
465 const double shell_region_width = 0.03,
466 const unsigned int n_shells = 2,
467 const double skewness = 2.0,
468 const bool colorize =
false);
492 template <
int dim,
int spacedim>
496 const bool colorize =
false);
512 const bool colorize =
false);
532 const bool colorize =
false);
547 const unsigned int n_subdivisions,
549 const bool colorize =
false);
562 const unsigned int (&n_subdivisions)[dim],
564 const unsigned int *n_subdivisions,
567 const bool colorize =
false);
592 template <
int dim,
int spacedim>
597 const std::vector<unsigned int> &subdivisions = {},
598 const bool colorize =
false);
618 const double left = 0.,
619 const double right = 1.,
620 const double thickness = 1.,
621 const bool colorize =
false);
662 const double radius = 1.,
663 const bool attach_spherical_manifold_on_boundary_cells =
false);
690 template <
int spacedim>
693 const double radius = 1.);
710 const double radius = 1.);
727 const double radius = 1.);
759 const double radius = 1.,
760 const double half_length = 1.);
796 const double radius_0 = 1.0,
797 const double radius_1 = 0.5,
798 const double half_length = 1.0);
829 template <
int dim,
int spacedim>
832 const std::vector<unsigned int> &sizes,
833 const bool colorize_cells =
false);
872 const double left = -1.,
873 const double right = 1.,
874 const bool colorize =
false);
897 const double left = 0.,
898 const double right = 1.,
899 const bool colorize =
false);
943 const double inner_radius,
944 const double outer_radius,
945 const unsigned int n_cells = 0,
946 bool colorize =
false);
977 const double inner_radius,
978 const double outer_radius,
979 const unsigned int n_cells = 0,
980 const bool colorize =
false);
1011 const double inner_radius,
1012 const double outer_radius,
1013 const unsigned int n_cells = 0,
1014 const bool colorize =
false);
1038 const double length,
1039 const double inner_radius,
1040 const double outer_radius,
1041 const unsigned int n_radial_cells = 0,
1042 const unsigned int n_axial_cells = 0);
1067 template <
int dim,
int spacedim>
1103 const double inner_radius = .25,
1104 const double outer_radius = .5,
1105 const double L = .5,
1106 const unsigned int repetitions = 1,
1107 const bool colorize =
false);
1184 const double inner_radius = 0.125,
1185 const double outer_radius = 0.25,
1186 const unsigned int n_shells = 1,
1187 const double skewness = 0.1,
1188 const unsigned int n_cells_per_shell = 0,
1189 const bool colorize =
false);
1205 const unsigned int n_cells,
1206 const unsigned int n_rotations,
1276 template <
int dim,
int spacedim>
1281 const double duplicated_vertex_tolerance = 1.0e-12,
1282 const bool copy_manifold_ids =
false);
1298 template <
int dim,
int spacedim>
1304 const double duplicated_vertex_tolerance = 1.0e-12,
1305 const bool copy_manifold_ids =
false);
1343 template <
int dim,
int spacedim>
1385 template <
int dim,
int spacedim>
1450 const unsigned int n_slices,
1451 const double height,
1453 const bool copy_manifold_ids =
false,
1454 const std::vector<types::manifold_id> &manifold_priorities = {});
1479 const std::vector<double> & slice_coordinates,
1481 const bool copy_manifold_ids =
false,
1482 const std::vector<types::manifold_id> &manifold_priorities = {});
1515 template <
int dim,
int spacedim1,
int spacedim2>
1536 template <
template <
int,
int>
class MeshType,
int dim,
int spacedim>
1537 struct ExtractBoundaryMesh
1540 std::map<
typename MeshType<dim - 1, spacedim>::cell_iterator,
1541 typename MeshType<dim, spacedim>::face_iterator>;
1620 template <
template <
int,
int>
class MeshType,
int dim,
int spacedim>
1622 std::map<
typename MeshType<dim - 1, spacedim>::cell_iterator,
1623 typename MeshType<dim, spacedim>::face_iterator>
1625 typename ExtractBoundaryMesh<MeshType, dim, spacedim>::return_type
1628 MeshType<dim - 1, spacedim> & surface_mesh,
1629 const std::set<types::boundary_id> &boundary_ids =
1630 std::set<types::boundary_id>());
1650 <<
"The number of repetitions " << arg1 <<
" must be >=1.");
1656 <<
"The vector of repetitions must have " << arg1
1663 "The input to this function is oriented in a way that will" 1664 " cause all cells to have negative measure.");
1719 DEAL_II_NAMESPACE_CLOSE
void create_union_triangulation(const Triangulation< dim, spacedim > &triangulation_1, const Triangulation< dim, spacedim > &triangulation_2, Triangulation< dim, spacedim > &result)
void torus(Triangulation< dim, spacedim > &tria, const double R, const double r)
void simplex(Triangulation< dim, dim > &tria, const std::vector< Point< dim >> &vertices)
Triangulation of a d-simplex with (d+1) vertices and mesh cells.
void channel_with_cylinder(Triangulation< dim > &tria, const double shell_region_width=0.03, const unsigned int n_shells=2, const double skewness=2.0, const bool colorize=false)
void concentric_hyper_shells(Triangulation< dim > &triangulation, const Point< dim > ¢er, const double inner_radius=0.125, const double outer_radius=0.25, const unsigned int n_shells=1, const double skewness=0.1, const unsigned int n_cells_per_shell=0, const bool colorize=false)
void general_cell(Triangulation< dim, spacedim > &tria, const std::vector< Point< spacedim >> &vertices, const bool colorize=false)
void truncated_cone(Triangulation< dim > &tria, const double radius_0=1.0, const double radius_1=0.5, const double half_length=1.0)
void hyper_rectangle(Triangulation< dim, spacedim > &tria, const Point< dim > &p1, const Point< dim > &p2, const bool colorize=false)
void moebius(Triangulation< 3, 3 > &tria, const unsigned int n_cells, const unsigned int n_rotations, const double R, const double r)
void flatten_triangulation(const Triangulation< dim, spacedim1 > &in_tria, Triangulation< dim, spacedim2 > &out_tria)
void quarter_hyper_shell(Triangulation< dim > &tria, const Point< dim > ¢er, const double inner_radius, const double outer_radius, const unsigned int n_cells=0, const bool colorize=false)
void enclosed_hyper_cube(Triangulation< dim > &tria, const double left=0., const double right=1., const double thickness=1., const bool colorize=false)
void subdivided_parallelepiped(Triangulation< dim > &tria, const unsigned int n_subdivisions, const Point< dim >(&corners)[dim], const bool colorize=false)
static ::ExceptionBase & ExcInvalidRepetitionsDimension(int arg1)
void parallelogram(Triangulation< dim > &tria, const Point< dim >(&corners)[dim], const bool colorize=false)
void hyper_shell(Triangulation< dim > &tria, const Point< dim > ¢er, const double inner_radius, const double outer_radius, const unsigned int n_cells=0, bool colorize=false)
static ::ExceptionBase & ExcInvalidInputOrientation()
void cylinder_shell(Triangulation< dim > &tria, const double length, const double inner_radius, const double outer_radius, const unsigned int n_radial_cells=0, const unsigned int n_axial_cells=0)
void hyper_cross(Triangulation< dim, spacedim > &tria, const std::vector< unsigned int > &sizes, const bool colorize_cells=false)
A center cell with stacks of cell protruding from each surface.
void hyper_L(Triangulation< dim > &tria, const double left=-1., const double right=1., const bool colorize=false)
void half_hyper_ball(Triangulation< dim > &tria, const Point< dim > ¢er=Point< dim >(), const double radius=1.)
#define DeclException1(Exception1, type1, outsequence)
void hyper_sphere(Triangulation< spacedim - 1, spacedim > &tria, const Point< spacedim > ¢er=Point< spacedim >(), const double radius=1.)
void cylinder(Triangulation< dim > &tria, const double radius=1., const double half_length=1.)
#define DeclExceptionMsg(Exception, defaulttext)
#define DeclException0(Exception0)
void quarter_hyper_ball(Triangulation< dim > &tria, const Point< dim > ¢er=Point< dim >(), const double radius=1.)
void subdivided_hyper_cube(Triangulation< dim, spacedim > &tria, const unsigned int repetitions, const double left=0., const double right=1.)
void create_triangulation_with_removed_cells(const Triangulation< dim, spacedim > &input_triangulation, const std::set< typename Triangulation< dim, spacedim >::active_cell_iterator > &cells_to_remove, Triangulation< dim, spacedim > &result)
void extrude_triangulation(const Triangulation< 2, 2 > &input, const unsigned int n_slices, const double height, Triangulation< 3, 3 > &result, const bool copy_manifold_ids=false, const std::vector< types::manifold_id > &manifold_priorities={})
void hyper_cube_slit(Triangulation< dim > &tria, const double left=0., const double right=1., const bool colorize=false)
void subdivided_hyper_rectangle(Triangulation< dim, spacedim > &tria, const std::vector< unsigned int > &repetitions, const Point< dim > &p1, const Point< dim > &p2, const bool colorize=false)
void merge_triangulations(const Triangulation< dim, spacedim > &triangulation_1, const Triangulation< dim, spacedim > &triangulation_2, Triangulation< dim, spacedim > &result, const double duplicated_vertex_tolerance=1.0e-12, const bool copy_manifold_ids=false)
static ::ExceptionBase & ExcInvalidRadii()
void cheese(Triangulation< dim, spacedim > &tria, const std::vector< unsigned int > &holes)
Rectangular domain with rectangular pattern of holes.
__global__ void set(Number *val, const Number s, const size_type N)
void parallelepiped(Triangulation< dim > &tria, const Point< dim >(&corners)[dim], const bool colorize=false)
void half_hyper_shell(Triangulation< dim > &tria, const Point< dim > ¢er, const double inner_radius, const double outer_radius, const unsigned int n_cells=0, const bool colorize=false)
void hyper_cube(Triangulation< dim, spacedim > &tria, const double left=0., const double right=1., const bool colorize=false)
std::map< typename MeshType< dim - 1, spacedim >::cell_iterator, typename MeshType< dim, spacedim >::face_iterator > extract_boundary_mesh(const MeshType< dim, spacedim > &volume_mesh, MeshType< dim - 1, spacedim > &surface_mesh, const std::set< types::boundary_id > &boundary_ids=std::set< types::boundary_id >())
void hyper_ball(Triangulation< dim > &tria, const Point< dim > ¢er=Point< dim >(), const double radius=1., const bool attach_spherical_manifold_on_boundary_cells=false)
void plate_with_a_hole(Triangulation< dim > &tria, const double inner_radius=0.4, const double outer_radius=1., const double pad_bottom=2., const double pad_top=2., const double pad_left=1., const double pad_right=1., const Point< dim > center=Point< dim >(), const types::manifold_id polar_manifold_id=0, const types::manifold_id tfi_manifold_id=1, const double L=1., const unsigned int n_slices=2, const bool colorize=false)
Rectangular plate with an (offset) cylindrical hole.
void hyper_cube_with_cylindrical_hole(Triangulation< dim > &triangulation, const double inner_radius=.25, const double outer_radius=.5, const double L=.5, const unsigned int repetitions=1, const bool colorize=false)
static ::ExceptionBase & ExcInvalidRepetitions(int arg1)