17 #include "libmesh/mesh_triangle_holes.h" 26 params.
addRequiredParam<MeshGeneratorName>(
"input",
"The input mesh to create the gap based on.");
30 MooseEnum gap_direction(
"OUTWARD INWARD",
"OUTWARD");
34 "In which direction the gap is created with respect to the side " 35 "normal of the elements along the boundary of the input mesh.");
37 params.
addParam<std::vector<boundary_id_type>>(
39 std::vector<boundary_id_type>(),
40 "The boundary IDs around which the gap will be created.");
42 params.
addParam<
Real>(
"max_elem_size",
"The maximum element size for the generated gap mesh.");
45 "Generates a polyline mesh that is based on an input 2D-XY mesh. The 2D-XY mesh needs to be " 47 "connected mesh with only one outer boundary manifold. The polyline mesh generated along " 48 "with the boundary of the input mesh form an unmeshed gap with a specified thickness.");
56 _thickness(getParam<
Real>(
"thickness")),
62 std::unique_ptr<MeshBase>
66 std::unique_ptr<UnstructuredMesh>
mesh =
71 TriangulatorInterface::MeshedHole bdry_mh(*
mesh, mesh_bdry_ids);
74 std::vector<Point> reduced_pts_list;
75 std::vector<Point> reduced_mid_pts_list;
77 bdry_mh, reduced_pts_list, reduced_mid_pts_list,
false);
86 std::vector<unsigned int>({1}));
88 std::unique_ptr<UnstructuredMesh> ply_mesh_u =
91 std::vector<Point> mod_reduced_pts_list =
103 mod_reduced_pts_list,
107 getParam<Real>(
"max_elem_size"));
110 mod_reduced_pts_list,
114 std::vector<unsigned int>({1}));
void buildPolyLineMesh(MeshBase &mesh, const std::vector< Point > &points, const bool loop, const BoundaryName &start_boundary, const BoundaryName &end_boundary, const std::vector< unsigned int > &nums_edges_between_points)
enum GapLineMeshGenerator::GapDirection _gap_direction
T & getMesh(MooseMesh &mesh)
function to cast mesh
GapDirection
The direction in which the gap is created with respect to the boundary of the input mesh...
static InputParameters validParams()
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
registerMooseObject("ReactorApp", GapLineMeshGenerator)
const Real _thickness
The thickness of the gap to be created.
std::unique_ptr< MeshBase > generate() override
static InputParameters validParams()
Generate a polyline mesh that is based on an input 2D-XY mesh.
std::vector< Point > generateOffsetPolyline(MeshGenerator *mg, std::unique_ptr< libMesh::UnstructuredMesh > &ply_mesh_u, std::vector< Point > &points, std::vector< Point > &mid_points, const bool outward, const Real thickness)
GapLineMeshGenerator(const InputParameters ¶meters)
std::unique_ptr< MeshBase > & _input
Input mesh defining the boundary.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
A base class that contains common members for Reactor module mesh generators.
void collectExteriorVertexPointsFromMesh(libMesh::TriangulatorInterface::MeshedHole &bdry_mh, std::vector< Point > &points, std::vector< Point > &mid_points, const bool skip_node_reduction=false)
bool isParamValid(const std::string &name) const
std::unique_ptr< MeshBase > buildMeshBaseObject(unsigned int dim=libMesh::invalid_uint)
const std::vector< boundary_id_type > _boundary_ids
The boundary IDs around which the gap will be created.