16#ifndef dealii_grid_generator_h
17#define dealii_grid_generator_h
99 template <
int dim,
int spacedim>
102 const double left = 0.,
103 const double right = 1.,
143 template <
int dim,
int spacedim>
175 template <
int dim,
int spacedim>
178 const unsigned int repetitions,
179 const double left = 0.,
180 const double right = 1.,
218 template <
int dim,
int spacedim>
274 template <
int dim,
int spacedim>
277 const std::vector<unsigned int> &repetitions,
300 const std::vector<std::vector<double>> &step_sizes,
318 const std::vector<std::vector<double>> &spacing,
347 template <
int dim,
int spacedim>
350 const std::vector<unsigned int> &holes);
398 const double inner_radius = 0.4,
399 const double outer_radius = 1.,
400 const double pad_bottom = 2.,
401 const double pad_top = 2.,
402 const double pad_left = 1.,
403 const double pad_right = 1.,
408 const unsigned int n_slices = 2,
502 const double shell_region_width = 0.03,
503 const unsigned int n_shells = 2,
504 const double skewness = 2.0,
527 template <
int dim,
int spacedim>
590 const unsigned int n_subdivisions,
606 const unsigned int (&n_subdivisions)[dim],
608 const unsigned int *n_subdivisions,
636 template <
int dim,
int spacedim>
641 const std::vector<unsigned int> &subdivisions = {},
663 const double left = 0.,
664 const double right = 1.,
665 const double thickness = 1.,
748 const double radius = 1.,
749 const bool attach_spherical_manifold_on_boundary_cells =
false);
787 const double radius = 1.);
809 const unsigned int n_rotate_middle_square);
834 const bool face_orientation,
835 const bool face_flip,
836 const bool face_rotation,
837 const bool manipulate_left_cube);
865 template <
int spacedim>
869 const double radius = 1.);
908 const double radius = 1.);
926 const double radius = 1.);
954 const double radius = 1.,
955 const double half_length = 1.);
994 const unsigned int x_subdivisions,
995 const double radius = 1.,
996 const double half_length = 1.);
1032 const double radius_0 = 1.0,
1033 const double radius_1 = 0.5,
1034 const double half_length = 1.0);
1159 template <
int dim,
int spacedim>
1164 const double aspect_ratio = 0.5);
1192 template <
int dim,
int spacedim>
1195 const std::vector<unsigned int> &sizes,
1196 const bool colorize_cells =
false);
1236 const double left = -1.,
1237 const double right = 1.,
1271 template <
int dim,
int spacedim>
1274 const std::vector<unsigned int> &repetitions,
1277 const std::vector<int> & n_cells_to_remove);
1301 const double left = 0.,
1302 const double right = 1.,
1366 const double inner_radius,
1367 const double outer_radius,
1368 const unsigned int n_cells = 0,
1409 const double inner_radius,
1410 const double outer_radius,
1411 const unsigned int n_cells);
1446 const double inner_radius,
1447 const double outer_radius,
1448 const unsigned int n_cells = 0,
1481 const double inner_radius,
1482 const double outer_radius,
1483 const unsigned int n_cells = 0,
1515 const double length,
1516 const double inner_radius,
1517 const double outer_radius,
1518 const unsigned int n_radial_cells = 0,
1519 const unsigned int n_axial_cells = 0);
1570 template <
int dim,
int spacedim>
1575 const unsigned int n_cells_toroidal = 6,
1610 const double inner_radius = .25,
1611 const double outer_radius = .5,
1612 const double L = .5,
1613 const unsigned int repetitions = 1,
1690 const double inner_radius = 0.125,
1691 const double outer_radius = 0.25,
1692 const unsigned int n_shells = 1,
1693 const double skewness = 0.1,
1694 const unsigned int n_cells_per_shell = 0,
1712 const unsigned int n_cells,
1713 const unsigned int n_rotations,
1752 template <
int dim,
int spacedim>
1756 const std::string & grid_generator_function_name,
1757 const std::string & grid_generator_function_arguments);
1816 const double & outer_ball_radius = 1.0);
1905 template <
int dim,
int spacedim>
1910 const double duplicated_vertex_tolerance = 1.0e-12,
1911 const bool copy_manifold_ids =
false,
1912 const bool copy_boundary_ids =
false);
1929 template <
int dim,
int spacedim>
1934 const double duplicated_vertex_tolerance = 1.0e-12,
1935 const bool copy_manifold_ids =
false,
1936 const bool copy_boundary_ids =
false);
1985 template <
int dim,
int spacedim = dim>
1988 const std::vector<unsigned int> & extents,
2028 template <
int dim,
int spacedim>
2071 template <
int dim,
int spacedim>
2149 const unsigned int n_slices,
2150 const double height,
2152 const bool copy_manifold_ids =
false,
2153 const std::vector<types::manifold_id> &manifold_priorities = {});
2164 const unsigned int n_slices,
2165 const double height,
2167 const bool copy_manifold_ids =
false,
2168 const std::vector<types::manifold_id> &manifold_priorities = {});
2192 const std::vector<double> & slice_coordinates,
2194 const bool copy_manifold_ids =
false,
2195 const std::vector<types::manifold_id> &manifold_priorities = {});
2206 const std::vector<double> & slice_coordinates,
2208 const bool copy_manifold_ids =
false,
2209 const std::vector<types::manifold_id> &manifold_priorities = {});
2249 template <
int dim,
int spacedim1,
int spacedim2>
2288 template <
int dim,
int spacedim>
2299 template <
int spacedim>
2508 template <
int dim,
int spacedim>
2512 const std::vector<unsigned int> &repetitions,
2532 template <
int dim,
int spacedim>
2535 const unsigned int repetitions,
2536 const double p1 = 0.0,
2537 const double p2 = 1.0,
2556 template <
template <
int,
int>
class MeshType,
int dim,
int spacedim>
2559 struct ExtractBoundaryMesh
2562 std::map<
typename MeshType<dim - 1, spacedim>::cell_iterator,
2563 typename MeshType<dim, spacedim>::face_iterator>;
2664 template <
template <
int,
int>
class MeshType,
int dim,
int spacedim>
2671 std::map<
typename MeshType<dim - 1, spacedim>::cell_iterator,
2672 typename MeshType<dim, spacedim>::face_iterator>
2674 typename ExtractBoundaryMesh<MeshType, dim, spacedim>::return_type
2678 MeshType<dim - 1, spacedim> & surface_mesh,
2679 const std::set<types::boundary_id> &boundary_ids =
2680 std::set<types::boundary_id>());
2700 <<
"The number of repetitions " << arg1 <<
" must be >=1.");
2706 <<
"The vector of repetitions must have " << arg1
2713 "The input to this function is oriented in a way that will"
2714 " cause all cells to have negative measure.");
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_CXX20_REQUIRES(condition)
#define DEAL_II_NAMESPACE_CLOSE
#define DeclException0(Exception0)
static ::ExceptionBase & ExcInvalidInputOrientation()
static ::ExceptionBase & ExcInvalidRepetitions(int arg1)
#define DeclExceptionMsg(Exception, defaulttext)
static ::ExceptionBase & ExcInvalidRadii()
#define DeclException1(Exception1, type1, outsequence)
static ::ExceptionBase & ExcInvalidRepetitionsDimension(int arg1)
void create_triangulation(Triangulation< dim, dim > &tria, const AdditionalData &additional_data=AdditionalData())
void subdivided_hyper_cube_with_simplices(Triangulation< dim, spacedim > &tria, const unsigned int repetitions, const double p1=0.0, const double p2=1.0, const bool colorize=false)
void parallelepiped(Triangulation< dim > &tria, const Point< dim >(&corners)[dim], const bool colorize=false)
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_ball_balanced(Triangulation< dim > &tria, const Point< dim > ¢er=Point< dim >(), const double radius=1.)
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 > ¢er=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 generate_from_name_and_arguments(Triangulation< dim, spacedim > &tria, const std::string &grid_generator_function_name, const std::string &grid_generator_function_arguments)
void enclosed_hyper_cube(Triangulation< dim > &tria, const double left=0., const double right=1., const double thickness=1., const bool colorize=false)
void replicate_triangulation(const Triangulation< dim, spacedim > &input, const std::vector< unsigned int > &extents, Triangulation< dim, spacedim > &result)
Replicate a given triangulation in multiple coordinate axes.
void parallelogram(Triangulation< dim > &tria, const Point< dim >(&corners)[dim], const bool colorize=false)
void general_cell(Triangulation< dim, spacedim > &tria, const std::vector< Point< spacedim > > &vertices, const bool colorize=false)
void subdivided_hyper_cube(Triangulation< dim, spacedim > &tria, const unsigned int repetitions, const double left=0., const double right=1., const bool colorize=false)
void hyper_L(Triangulation< dim > &tria, const double left=-1., const double right=1., const bool colorize=false)
void hyper_cube_slit(Triangulation< dim > &tria, const double left=0., const double right=1., const bool colorize=false)
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 eccentric_hyper_shell(Triangulation< dim > &triangulation, const Point< dim > &inner_center, const Point< dim > &outer_center, const double inner_radius, const double outer_radius, const unsigned int n_cells)
void hyper_rectangle(Triangulation< dim, spacedim > &tria, const Point< dim > &p1, const Point< dim > &p2, const bool colorize=false)
void surface_mesh_to_volumetric_mesh(const Triangulation< 2, 3 > &surface_tria, Triangulation< 3 > &vol_tria, const CGALWrappers::AdditionalData< 3 > &data=CGALWrappers::AdditionalData< 3 >{})
void cylinder(Triangulation< dim > &tria, const double radius=1., const double half_length=1.)
void moebius(Triangulation< 3, 3 > &tria, const unsigned int n_cells, const unsigned int n_rotations, const double R, const double r)
void pipe_junction(Triangulation< dim, spacedim > &tria, const std::vector< std::pair< Point< spacedim >, double > > &openings, const std::pair< Point< spacedim >, double > &bifurcation, const double aspect_ratio=0.5)
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 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 quarter_hyper_ball(Triangulation< dim > &tria, const Point< dim > ¢er=Point< dim >(), const double radius=1.)
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 cheese(Triangulation< dim, spacedim > &tria, const std::vector< unsigned int > &holes)
Rectangular domain with rectangular pattern of holes.
void torus(Triangulation< dim, spacedim > &tria, const double R, const double r, const unsigned int n_cells_toroidal=6, const double phi=2.0 *numbers::PI)
void implicit_function(Triangulation< dim, 3 > &tria, const Function< 3 > &implicit_function, const CGALWrappers::AdditionalData< dim > &data=CGALWrappers::AdditionalData< dim >{}, const Point< 3 > &interior_point=Point< 3 >(), const double &outer_ball_radius=1.0)
void create_union_triangulation(const Triangulation< dim, spacedim > &triangulation_1, const Triangulation< dim, spacedim > &triangulation_2, Triangulation< dim, spacedim > &result)
void subdivided_hyper_rectangle_with_simplices(Triangulation< dim, spacedim > &tria, const std::vector< unsigned int > &repetitions, const Point< dim > &p1, const Point< dim > &p2, const bool colorize=false)
void non_standard_orientation_mesh(Triangulation< 2 > &tria, const unsigned int n_rotate_middle_square)
return_type 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 subdivided_parallelepiped(Triangulation< dim > &tria, const unsigned int n_subdivisions, const Point< dim >(&corners)[dim], const bool colorize=false)
void subdivided_cylinder(Triangulation< dim > &tria, const unsigned int x_subdivisions, const double radius=1., const double half_length=1.)
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 subdivided_hyper_L(Triangulation< dim, spacedim > &tria, const std::vector< unsigned int > &repetitions, const Point< dim > &bottom_left, const Point< dim > &top_right, const std::vector< int > &n_cells_to_remove)
void hyper_sphere(Triangulation< spacedim - 1, spacedim > &tria, const Point< spacedim > ¢er=Point< spacedim >(), const double radius=1.)
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 convert_hypercube_to_simplex_mesh(const Triangulation< dim, spacedim > &in_tria, Triangulation< dim, spacedim > &out_tria)
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 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 hyper_cube(Triangulation< dim, spacedim > &tria, const double left=0., const double right=1., 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)
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 simplex(Triangulation< dim, dim > &tria, const std::vector< Point< dim > > &vertices)
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)
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 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, const bool copy_boundary_ids=false)
void reference_cell(Triangulation< dim, spacedim > &tria, const ReferenceCell &reference_cell)
void half_hyper_ball(Triangulation< dim > &tria, const Point< dim > ¢er=Point< dim >(), const double radius=1.)
void flatten_triangulation(const Triangulation< dim, spacedim1 > &in_tria, Triangulation< dim, spacedim2 > &out_tria)
static constexpr double PI
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation
unsigned int n_subdivision_x_0
unsigned int n_subdivision_y
unsigned int n_subdivision_x_2
void add_parameters(ParameterHandler &prm)
unsigned int airfoil_sampling_factor
unsigned int n_subdivision_x_1
Point< 2, double > joukowski_center
const ::Triangulation< dim, spacedim > & tria