24 #include <boost/archive/text_oarchive.hpp> 25 #include <boost/archive/text_iarchive.hpp> 26 #include <boost/archive/binary_oarchive.hpp> 27 #include <boost/archive/binary_iarchive.hpp> 38 std::string extension(
const std::string &filename)
40 std::string::size_type idx;
41 idx = filename.rfind(
'.');
42 if (idx != std::string::npos)
44 return filename.substr(idx+1);
56 template <
int dim,
int spacedim>
58 const std::string _grid_type,
59 const std::string _input_grid_file,
60 const std::string _point_1,
61 const std::string _point_2,
62 const std::string _colorize,
63 const std::string _double_1,
64 const std::string _double_2,
65 const std::string _double_3,
66 const std::string _int_1,
67 const std::string _int_2,
68 const std::string _vec_of_int,
69 const std::string _mesh_smoothing,
70 const std::string _output_grid_file,
71 const std::string _manifold_descriptors)
74 mesh_smoothing(_mesh_smoothing),
75 grid_name(_grid_type),
76 optional_manifold_descriptors(_manifold_descriptors),
77 create_default_manifolds(true),
78 copy_boundary_to_manifold_ids(false),
79 copy_material_to_manifold_ids(false),
80 input_grid_file_name(_input_grid_file),
81 output_grid_file_name(_output_grid_file),
82 str_point_1(_point_1),
83 str_point_2(_point_2),
84 str_colorize(_colorize),
85 str_double_1(_double_1),
86 str_double_2(_double_2),
87 str_double_3(_double_3),
90 str_vec_int(_vec_of_int)
95 template <
int dim,
int spacedim>
98 return "file|rectangle|hyper_ball|hyper_shell|hyper_sphere|hyper_L|half_hyper_ball|cylinder|truncated_cone|hyper_cross|hyper_cube_slit|half_hyper_shell|quarter_hyper_shell|cylinder_shell|torus|hyper_cube_with_cylindrical_hole|moebius|cheese";
101 template <
int dim,
int spacedim>
105 std::vector<unsigned int> dummy_vec_int(dim, 1);
106 std::vector<double> dummy_vec_double(spacedim);
109 for (
unsigned int d=0;
d<dim; ++
d)
110 dummy_point_2[
d]=1.0;
112 std::string def_point, def_point_2, def_int, def_double;
113 def_point =
print(dummy_point);
114 def_point_2 =
print(dummy_point_2);
115 def_int =
print(dummy_vec_int);
116 def_double =
print(dummy_vec_double);
121 "The grid to generate. You can choose among:\n" 122 "- file: read grid from a file using:\n" 123 " - Input grid filename : input filename\n\n" 124 "- rectangle: create a subdivided hyperrectangle using:\n" 125 " - Optional Point<spacedim> 1: lower-left corner\n" 126 " - Optional Point<spacedim> 2: upper-right corner\n" 127 " - Optional Vector of dim int: subdivisions on each direction\n" 128 " - Optional bool 1 : colorize grid\n" 129 "- hyper_sphere : generate an hyper sphere with center and radius prescribed:\n" 130 " - Optional Point<spacedim> : center\n" 131 " - Optional double : radius\n" 132 "- hyper_ball : initialize the given triangulation with a hyper_ball:\n\n" 133 " - Optional Point<spacedim> : center\n" 134 " - Optional double : radius\n" 135 "- hyper_shell : create a gird represented by the region between two spheres with fixed center:\n\n" 136 " - Optional Point<spacedim> : center\n" 137 " - Optional double : inner sphere radius\n" 138 " - Optional double : outer sphere radius\n" 139 " - Optional unsigned int : number of cells of the resulting triangulation (In 3d, only 6, 12, and 96 are allowed)\n" 140 " - Optional bool : colorize grid\n" 141 "- hyper_L : initialize the given triangulation with a hyper-L. It produces the hypercube with the interval [left,right] without the hypercube made out of the interval [(left+right)/2,right] for each coordinate." 142 " - Optional double : left\n" 143 " - Optional double : right\n" 144 "- half_hyper_ball : produce a half hyper-ball around center, which contains four elements in 2d and 6 in 3d. The cut plane is perpendicular to the x-axis: \n" 145 " - Optional Point<spacedim> : center\n" 146 " - Optional double : radius\n" 147 "- cylinder: create a cylinder around the x-axis. The cylinder extends from x=-half_length to x=+half_length and its projection into the yz-plane is a circle of radius radius: \n" 148 " - Optional double : radius\n" 149 " - Optional double : half length of the cylinder\n" 150 "- truncated_cone : create a cut cone around the x-axis. The cone extends from x=-half_length to x=half_length and its projection into the yz-plane is a circle of radius radius1 at x=-half_length and a circle of radius radius2 at x=+half_length :\n" 151 " - Optional double : radius 1\n" 152 " - Optional double : radius 2\n" 153 " - Optional double : half length\n" 154 "- hyper_cross : a center cell with stacks of cell protruding from each surface :\n" 155 " - Optional Vector of dim int: sizes\n" 156 " - Optional bool : colorize grid\n" 157 "- hyper_cube_slit : initialize the given Triangulation with a hypercube with a slit. In each coordinate direction, the hypercube extends from left to right :\n" 158 " - Optional double : left\n" 159 " - Optional double : right\n" 160 " - Optional bool : colorize grid\n" 161 "- half_hyper_shell : produce a half hyper-shell, i.e. the space between two circles in two space dimensions and the region between two spheres in 3d :\n" 162 " - Optional Point<spacedim> : center\n" 163 " - Optional double : inner radius\n" 164 " - Optional double : outer radius\n" 165 " - Optional unsigned int : number of cells\n" 166 " - Optional bool : colorize grid\n" 167 "- quarter_hyper_shell : Produce a domain that is the intersection between a hyper-shell with given inner and outer radius, i.e. the space between two circles in two space dimensions and the region between two spheres in 3d, and the positive quadrant (in 2d) or octant (in 3d). In 2d, this is indeed a quarter of the full annulus, while the function is a misnomer in 3d because there the domain is not a quarter but one eighth of the full shell :\n" 168 " - Optional Point<spacedim> : center\n" 169 " - Optional double : inner radius\n" 170 " - Optional double : outer radius\n" 171 " - Optional unsigned int : number of cells\n" 172 " - Optional bool : colorize grid\n" 173 "- cylinder_shell : produce a domain that is the space between two cylinders in 3d, with given length, inner and outer radius and a given number of elements for this initial triangulation. If n_radial_cells is zero (as is the default), then it is computed adaptively such that the resulting elements have the least aspect ratio. The same holds for n_axial_cells :\n" 174 " - Optional double : lenght\n" 175 " - Optional double : inner radius\n" 176 " - Optional double : outer radius\n" 177 " - Optional unsigned int : n_radial_cells\n" 178 " - Optional unsigned int : n_axial_cells\n" 179 "- moebius : produce a ring of cells in 3d that is cut open, twisted and glued together again. This results in a kind of moebius-loop :\n" 180 " - Optional unsigned int : number of cells in the loop\n" 181 " - Optional unsigned int : number of rotations (Pi/2 each) to be performed before gluing the loop together\n" 182 " - Optional double : radius of the circle\n" 183 " - Optional double : radius of the cylinder bend together as loop\n" 184 "- hyper_cube_with_cylindrical_hole : produces a square in the xy-plane with a circular hole in the middle :\n" 185 " - Optional double : inner radius\n" 186 " - Optional double : outer radius\n" 187 " - Optional double : lenght\n" 188 " - Optional unsigned int : repetitions (number of subdivisions along the z-direction)\n" 189 " - Optional bool : colorize grid\n" 190 "- torus : produce the surface meshing of the torus :\n" 191 " - Optional double : radius of the circle which forms the middle line of the torus containing the loop of cells\n" 192 " - Optional double : inner radius of the torus\n" 193 "- cheese : domain itself is rectangular. The argument holes specifies how many square holes the domain should have in each coordinate direction :\n" 194 " - Optional Vector of dim int: number of holes on each direction\n" 200 "limit_level_difference_at_vertices|" 201 "eliminate_unrefined_islands|" 204 "allow_anisotropic_smoothing|" 205 "eliminate_refined_inner_islands|" 206 "eliminate_refined_boundary_islands|" 207 "do_not_produce_unrefined_islands|" 208 "smoothing_on_refinement|" 209 "smoothing_on_coarsening|" 210 "maximum_smoothing"));
215 "Name of the input grid. All supported deal.II formats. " 216 "The extestion will be used to decide what " 217 "grid format to use.");
222 "First additional double to be used in the generation of the grid. " 223 "The use of it will depend on the specific grid.");
228 "Second additional double to be used in the generation of the grid. " 229 "The use of it will depend on the specific grid.");
234 "Second additional double to be used in the generation of the grid. " 235 "The use of it will depend on the specific grid.");
240 "First additional Point<spacedim> to be used in the generation of the grid. " 241 "The use of it will depend on the specific grid.");
246 "Second additional Point<spacedim> to be used in the generation of the grid. " 247 "The use of it will depend on the specific grid.");
253 "Unsigned int to be used in the generation of the grid. " 254 "The use of it will depend on the specific grid.");
259 "Unsigned int to be used in the generation of the grid. " 260 "The use of it will depend on the specific grid.");
265 "Vector of positive unsigned int to be used in the generation of the grid. " 266 "The use of it will depend on the specific grid.");
271 "Bool be used in the generation of the grid to set colorize. " 272 "The use of it will depend on the specific grid.");
275 "Create default manifolds",
278 "If set to true, boundary ids " 279 "will be copied over the manifold ids, and the " 280 "default manifolds for this triangulation will be" 285 "Copy boundary to manifold ids",
288 "If set to true, boundary ids will be copied over " 289 "the manifold ids.");
292 "Copy material to manifold ids",
295 "If set to true, material ids " 296 "will be copied over the manifold ids.");
302 "Manifold descriptors.\n" 303 "Pattern to be used: \n" 304 "id followed by '=' manifold descriptor \n " 305 "each couple of id and manifold descriptor is separated by '%' " 306 "and those Manifold descriptors which require additional parameters " 307 "use the ones defined in this class.\n" 308 "Available manifold descriptor: \n" 309 "- HyperBallBoundary : boundary of a hyper_ball :\n" 310 " - Optional double : radius\n" 311 " - Optional Point<spacedim> 1: center\n" 312 "- CylinderBoundaryOnAxis : boundary of a cylinder, given radius and axis :\n" 313 " - Optional double : radius\n" 314 " - Optional int 1 : axis (0=x, 1=y, 2=z)\n" 315 "- GeneralCylinderBoundary : boundary of a cylinder, given radius, a point on the axis and a direction :\n" 316 " - Optional double : radius\n" 317 " - Optional int 1 : axis (0=x, 1=y, 2=z)\n" 318 " - Optional Point<spacedim> 1: point on axis\n" 319 " - Optional Point<spacedim> 2: direction\n" 320 "- ConeBoundary : boundary of a cone, given radii, and two points on the faces:\n" 321 " - Optional double 1 : radius 1\n" 322 " - Optional double 2 : radius 2\n" 323 " - Optional Point<spacedim> 1: point on first face\n" 324 " - Optional Point<spacedim> 2: point on second face\n" 325 "- TorusBoundary : boundary of a torus :\n" 326 " - Optional double 1 : radius 1\n" 327 " - Optional double 2 : radius 2\n" 328 "- ArclengthProjectionLineManifold:file.iges/step : interface to CAD file:\n" 329 " - Optional double 1 : scale to apply to input CAD file\n" 330 "- ArclengthProjectionLineManifold:file.iges/step : interface to CAD file:\n" 331 " - Optional double 1 : scale to apply to input CAD file\n" 332 "- DirectionalProjectionBoundary:file.iges/step : interface to CAD file:\n" 333 " - Optional double 1 : scale to apply to input CAD file\n" 334 " - Optional Point<spacedim> 1: direction of projection\n" 335 "- NormalProjectionBoundary:file.iges/step : interface to CAD file:\n" 336 " - Optional double 1 : scale to apply to input CAD file\n" 337 "- NormalToMeshProjectionBoundary:file.iges/step : interface to CAD file:\n" 338 " - Optional double 1 : scale to apply to input CAD file\n" 344 "Name of the output grid. All supported deal.II formats. " 345 "The extestion will be used to decide what " 346 "grid format to use. If empty, no grid will be written.");
349 #ifdef DEAL_II_WITH_MPI 350 #ifdef DEAL_II_WITH_P4EST 351 template <
int dim,
int spacedim>
366 template <
int dim,
int spacedim>
389 template<
int dim,
int spacedim>
398 for (
unsigned int i=0; i<dim; ++i)
423 else if (ext ==
"msh")
425 else if (ext ==
"ucd" || ext ==
"inp")
427 else if (ext ==
"unv")
429 else if (ext ==
"ar")
431 boost::archive::text_iarchive ia(in);
434 else if (ext ==
"bin")
436 boost::archive::binary_iarchive ia(in);
454 typename std::enable_if<(dim<3),
void **>::
type=0)
458 GridGenerator::hyper_sphere<dim,dim+1> ( tria,
462 tria.set_all_manifold_ids(0);
493 else if (p->
grid_name ==
"half_hyper_ball")
507 else if (p->
grid_name ==
"truncated_cone")
521 else if (p->
grid_name ==
"hyper_cube_slit")
528 else if (p->
grid_name ==
"half_hyper_shell")
537 "0=SphericalManifold % 1=SphericalManifold" :
538 "0=SphericalManifold";
541 else if (p->
grid_name ==
"quarter_hyper_shell")
550 "0=SphericalManifold % 1=SphericalManifold" :
551 "0=SphericalManifold";
553 else if (p->
grid_name ==
"cylinder_shell")
566 else if (p->
grid_name ==
"hyper_cube_with_cylindrical_hole")
584 "0=SphericalManifold % 1=SphericalManifold" :
585 "0=SphericalManifold";
615 PGGHelper::create_grid<3>( p, tria);
634 #ifdef DEAL_II_WITH_OPENCASCADE 638 if (ext ==
"step" || ext ==
"stp" ||
639 ext ==
"iges" || ext ==
"igs")
645 std::vector<TopoDS_Face> faces;
646 std::vector<TopoDS_Edge> edges;
647 std::vector<TopoDS_Vertex> vertices;
652 ExcMessage(
"The optional unsigned int you specified (" 660 PGGHelper::create_grid<2>(p, tria);
666 PGGHelper::create_grid<2>(p, tria);
675 const std::string &name)
677 if (name==
"CylinderBoundaryOnAxis")
682 else if (name==
"GeneralCylinderBoundary")
688 else if (name==
"ConeBoundary")
697 #ifdef DEAL_II_WITH_OPENCASCADE 699 const int spacedim = 3;
702 if (subnames[0] ==
"ArclengthProjectionLineManifold")
708 else if (subnames[0] ==
"DirectionalProjectionBoundary")
715 else if (subnames[0] ==
"NormalProjectionBoundary")
721 else if (subnames[0] ==
"NormalToMeshProjectionBoundary")
729 return create_manifold<3>(p, name);
735 const std::string &name)
737 if (name==
"TorusBoundary")
744 #ifdef DEAL_II_WITH_OPENCASCADE 746 const int spacedim = 3;
749 if (subnames[0] ==
"ArclengthProjectionLineManifold")
755 else if (subnames[0] ==
"DirectionalProjectionBoundary")
762 else if (subnames[0] ==
"NormalProjectionBoundary")
768 else if (subnames[0] ==
"NormalToMeshProjectionBoundary")
775 return default_create_manifold(p, name);
786 const std::string &name)
788 if (name==
"HalfHyperBallBoundary")
793 else if (name ==
"HyperShellBoundary")
797 else if (name ==
"HalfHyperShellBoundary")
804 return default_create_manifold(p, name);
814 const std::string &name,
815 typename std::enable_if<(dim<3),
void **>::
type=0)
817 return default_create_manifold(p, name);
820 #ifdef DEAL_II_WITH_OPENCASCADE 821 static TopoDS_Shape readOCC(
const std::string &name,
const double &
scale)
823 std::string ext = extension(name);
826 if (ext ==
"iges" || ext ==
"igs")
828 else if (ext ==
"step" || ext ==
"stp")
838 template<
int dim,
int spacedim>
841 const std::string &name)
843 if (name==
"HyperBallBoundary")
848 else if (name==
"SphericalManifold")
852 else if (name==
"CylindricalManifoldOnAxis")
856 else if (name==
"GeneralCylindricalManifold")
866 if (subnames[0] ==
"FunctionManifold0")
871 else if (subnames[0] ==
"FunctionManifold1")
875 (subnames[1], subnames[2]));
879 return shared_ptr<Manifold<dim,spacedim> >();
883 template <
int dim,
int spacedim>
909 template <
int dim,
int spacedim>
915 for (
unsigned int i=0; i<idcomponents.size(); ++i)
927 template <
int dim,
int spacedim>
929 const std::string &filename)
const 932 if (my_filename !=
"")
935 std::ofstream out(my_filename.c_str());
941 std::string ext = extension(my_filename);
944 else if (ext ==
"msh")
946 else if (ext ==
"ucd" || ext ==
"inp")
948 else if (ext ==
"vtu")
950 else if (ext ==
"ar")
952 boost::archive::text_oarchive oa(out);
955 else if (ext ==
"bin")
957 boost::archive::binary_oarchive oa(out);
969 template <
int dim,
int spacedim>
975 (
static_cast<int>(a)|static_cast<int>(
b));
979 template <
int dim,
int spacedim>
985 for (std::string s : ss)
989 else if (s ==
"limit_level_difference_at_vertices")
991 else if (s ==
"eliminate_unrefined_islands")
993 else if (s ==
"patch_level_1")
995 else if (s ==
"coarsest_level_1")
997 else if (s ==
"allow_anisotropic_smoothing")
999 else if (s ==
"eliminate_refined_inner_islands")
1001 else if (s ==
"eliminate_refined_boundary_islands")
1003 else if (s ==
"do_not_produce_unrefined_islands")
1005 else if (s ==
"smoothing_on_refinement")
1007 else if (s ==
"smoothing_on_coarsening")
1009 else if (s ==
"maximum_smoothing")
1020 template class deal2lkit::ParsedGridGenerator<1,1>;
1021 template class deal2lkit::ParsedGridGenerator<1,2>;
1023 template class deal2lkit::ParsedGridGenerator<2,2>;
1024 template class deal2lkit::ParsedGridGenerator<2,3>;
1025 template class deal2lkit::ParsedGridGenerator<3,3>;
void write_ucd(const Triangulation< dim, spacedim > &tria, std::ostream &out) const
static void create_grid(ParsedGridGenerator< 2, 3 > *p, Triangulation< 2, 3 > &tria)
This function is used to generate grids when dim = 2 and spacedim = 3.
#define AssertDimension(dim1, dim2)
void copy_boundary_to_manifold_id(Triangulation< dim, spacedim > &tria, const bool reset_boundary_ids=false)
TopoDS_Shape read_IGES(const std::string &filename, const double scale_factor=1e-3)
void torus(Triangulation< dim, spacedim > &tria, const double R, const double r)
A parameter acceptor base class.
static void create_grid(ParsedGridGenerator< 3 > *p, Triangulation< 3, 3 > &tria)
This function is used to generate grids when spacedim = dim = 3.
bool colorize
For all the internally generated meshes that support it, turn on colorizing.
unsigned int un_int_option_two
Optional int argument.
static ParameterHandler prm
Static parameter.
static::ExceptionBase & ExcIO()
std::string grid_name
The grid to generate.
TopoDS_Shape read_STEP(const std::string &filename, const double scale_factor=1e-3)
std::string output_grid_file_name
Output grid file name.
bool create_default_manifolds
Create default manifold descriptors.
bool copy_material_to_manifold_ids
Copy material ids to manifold ids.
void write_vtk(const Triangulation< dim, spacedim > &tria, std::ostream &out) const
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 moebius(Triangulation< 3, 3 > &tria, const unsigned int n_cells, const unsigned int n_rotations, const double R, const double r)
std::string default_manifold_descriptors
Default Manifold descriptors.
static shared_ptr< Manifold< dim, spacedim > > default_create_manifold(ParsedGridGenerator< dim, spacedim > *p, const std::string &name)
Prototype function for creating new manifolds from a name and a pgg.
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)
std::string mesh_smoothing
Mesh smoothing to apply to the newly created Triangulation.
std::string optional_manifold_descriptors
Optional Manifold descriptors.
static std::string get_grid_names()
Return a list of implemented grids.
static::ExceptionBase & ExcNotInitialized()
#define AssertThrow(cond, exc)
shared_ptr< T > SP(T *t)
Construct a shared pointer to a non const class T.
Parsed Grid Generator Helper.
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)
double double_option_three
Optional double argument.
unsigned int un_int_option_one
Optional int argument.
static void create_grid(ParsedGridGenerator< dim, dim > *p, Triangulation< dim, dim > &tria)
This function is used to generate grids when spacedim = dim.
void read_vtk(std::istream &in)
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)
void set_manifold(const types::manifold_id number, const Manifold< dim, spacedim > &manifold_object)
void hyper_L(Triangulation< dim > &tria, const double left=-1., const double right=1., const bool colorize=false)
void write_msh(const Triangulation< dim, spacedim > &tria, std::ostream &out) const
void half_hyper_ball(Triangulation< dim > &tria, const Point< dim > ¢er=Point< dim >(), const double radius=1.)
static::ExceptionBase & ExcMessage(std::string arg1)
double double_option_two
Optional double argument.
static void default_create_grid(ParsedGridGenerator< dim, spacedim > *p, Triangulation< dim, spacedim > &tria)
This function is used to generate grids when there are no restriction on the template parameters...
void write_vtu(const Triangulation< dim, spacedim > &tria, std::ostream &out) const
void cylinder(Triangulation< dim > &tria, const double radius=1., const double half_length=1.)
std::string type(const T &t)
Return a human readable name of the type passed as argument.
#define Assert(cond, exc)
Triangulation< dim, spacedim > * serial()
Return a pointer to a newly created serial Triangulation.
void load(Archive &ar, const unsigned int version)
void read_ucd(std::istream &in, const bool apply_all_indicators_to_manifolds=false)
virtual void declare_parameters(ParameterHandler &prm)
Declare all parameters of this class.
std::string input_grid_file_name
Input grid file name.
void parse_manifold_descriptors(const std::string &str_manifold_descriptors)
Take str_manifold_descriptors and fill manifold_descriptors with ids and manifolds.
double double_option_one
Optional double argument.
void copy_material_to_manifold_id(Triangulation< dim, spacedim > &tria, const bool compute_face_ids=false)
void hyper_cube_slit(Triangulation< dim > &tria, const double left=0., const double right=1., const bool colorize=false)
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
SymmetricTensor< 2, dim, Number > b(const Tensor< 2, dim, Number > &F)
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 read_msh(std::istream &in)
void cheese(Triangulation< dim, spacedim > &tria, const std::vector< unsigned int > &holes)
std::string print(const std::vector< Type > &list, const std::string sep=",")
Return a string containing the content of the vector, with elements separated by the @ sep parameter...
Point< spacedim > point_option_one
Optional Point argument.
void save(Archive &ar, const unsigned int version) const
static shared_ptr< Manifold< 2, 3 > > create_manifold(ParsedGridGenerator< 2, 3 > *p, const std::string &name)
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)
ParsedGridGenerator(const std::string section_name="", const std::string grid_type="rectangle", const std::string input_grid_file="", const std::string opt_point_1="", const std::string opt_point_2="", const std::string opt_colorize="false", const std::string opt_double_1="1.0", const std::string opt_double_2="0.5", const std::string opt_double_3="1.5", const std::string opt_int_1="1", const std::string opt_int_2="2", const std::string opt_vec_of_int="", const std::string mesh_smoothing="none", const std::string output_grid_file="", const std::string opt_manifold_descriptors="")
Constructor.
void extract_geometrical_shapes(const TopoDS_Shape &shape, std::vector< TopoDS_Face > &faces, std::vector< TopoDS_Edge > &edges, std::vector< TopoDS_Vertex > &vertices)
static shared_ptr< Manifold< dim > > create_manifold(ParsedGridGenerator< dim > *p, const std::string &name)
Prototype function for creating new manifolds from a name and a pgg.
std::vector< std::string > split_string_list(const std::string &s, const char delimiter=',')
void read_unv(std::istream &in)
static shared_ptr< Manifold< 3 > > create_manifold(ParsedGridGenerator< 3 > *p, const std::string &name)
Prototype function for creating new manifolds from a name and a pgg.
int string_to_int(const std::string &s)
static::ExceptionBase & ExcNotImplemented()
Point< spacedim > point_option_two
Optional Point argument.
void write(const Triangulation< dim, spacedim > &tria, const std::string &filename="") const
Write the given Triangulation to the output file specified in Output file name, or in the optional fi...
Triangulation< dim, spacedim >::MeshSmoothing get_smoothing()
Mesh smoothing.
std::map< types::manifold_id, shared_ptr< Manifold< dim, spacedim > > > manifold_descriptors
A map of Manifold associated to the given manifold_ids.
void set_flags(const GridOutFlags::DX &flags)
static void create_grid(ParsedGridGenerator< dim, dim+1 > *p, Triangulation< dim, dim+1 > &tria, typename std::enable_if<(dim< 3), void **>::type=0)
This function is used to generate grids when spacedim = dim + 1.
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 hyper_ball(Triangulation< dim > &tria, const Point< dim > ¢er=Point< dim >(), const double radius=1.)
void attach_triangulation(Triangulation< dim, spacedim > &tria)
static shared_ptr< Manifold< dim, dim+1 > > create_manifold(ParsedGridGenerator< dim, dim+1 > *p, const std::string &name, typename std::enable_if<(dim< 3), void **>::type=0)
Prototype function for creating new manifolds from a name and a pgg.
void add_parameter(ParameterHandler &prm, T *parameter, const std::string &entry, const std::string &default_value, const Patterns::PatternBase &pattern=Patterns::Anything(), const std::string &documentation=std::string())
Add a parameter the given parameter list.
std::vector< unsigned int > un_int_vec_option_one
Optional vector of integers.
bool copy_boundary_to_manifold_ids
Copy boundary ids to manifold ids.
void create(Triangulation< dim, spacedim > &tria)
Generate the grid.
void create_triangulation(const TopoDS_Face &face, Triangulation< 2, 3 > &tria)
static::ExceptionBase & ExcInternalError()