21 #include "MeshGenerator.h" 36 std::unique_ptr<MeshBase>
generate()
override;
59 unsigned int getFaceNode(
const unsigned int & primary_face)
const;
66 virtual bool isCornerNode(
const unsigned int & node)
const;
71 void moveNodes(std::unique_ptr<MeshBase> &
mesh, std::vector<Real> & polygon_layer_smoothing);
79 const Elem *
getNextLayerElem(
const Elem & elem,
const unsigned int & touching_face,
80 unsigned int & next_touching_face)
const;
88 unsigned int midPointNodeIndex(
const unsigned int & face_id,
const unsigned int & face_node)
const;
96 unsigned int pairedFaceNode(
const unsigned int & node_id,
const unsigned int & face_id)
const;
107 const unsigned int & primary_face)
const;
117 void moveElem(Elem * elem,
const unsigned int & boundary_index,
const unsigned int & primary_face,
118 const std::vector<Real> & polygon_layer_smoothing);
134 unsigned int getNodeIndex(
const Elem * elem,
const Point & pt)
const;
149 void checkPointLength(
const std::vector<std::vector<Real>> & points, std::string name)
const;
165 BoundaryID
getBoundaryID(
const BoundaryName & name,
const MeshBase &
mesh)
const;
173 Point
projectPoint(
const Point & origin,
const Point & pt)
const;
183 Point
adjustPointToCircle(
const unsigned int & node_id, Elem * elem,
const Real & radius,
const Point & origin)
const;
273 std::vector<std::vector<std::pair<unsigned int, unsigned int>>>
_across_pair;
unsigned int _n_noncorner_boundaries
Number of boundaries to be moved that do not include the corners.
Definition: NekMeshGenerator.h:258
Point projectPoint(const Point &origin, const Point &pt) const
Definition: NekMeshGenerator.C:191
void moveNodes(std::unique_ptr< MeshBase > &mesh, std::vector< Real > &polygon_layer_smoothing)
Definition: NekMeshGenerator.C:481
Point getClosestOrigin(const unsigned int &index, const Point &pt) const
Definition: NekMeshGenerator.C:304
const Elem * getNextLayerElem(const Elem &elem, const unsigned int &touching_face, unsigned int &next_touching_face) const
Definition: NekMeshGenerator.C:439
void adjustMidPointNode(const unsigned int &node_id, Elem *elem) const
Definition: NekMeshGenerator.C:268
std::vector< std::vector< unsigned int > > _face_nodes_map
Face nodes map.
Definition: NekMeshGenerator.h:285
Real _corner_radius
If curving corners, the radius of curvature of the corner.
Definition: NekMeshGenerator.h:249
void moveElem(Elem *elem, const unsigned int &boundary_index, const unsigned int &primary_face, const std::vector< Real > &polygon_layer_smoothing)
Definition: NekMeshGenerator.C:333
std::vector< std::vector< Real > > _origin
Origins of the circular surface(s)
Definition: NekMeshGenerator.h:243
std::vector< unsigned int > _across_face
For each face, the paired face "across" to the other side of the original elem type.
Definition: NekMeshGenerator.h:276
const MooseEnum & _geometry_type
Geometry type to curve boundaries to.
Definition: NekMeshGenerator.h:190
unsigned int getFaceNode(const unsigned int &primary_face) const
Definition: NekMeshGenerator.C:534
unsigned int pairedFaceNode(const unsigned int &node_id, const unsigned int &face_id) const
Definition: NekMeshGenerator.C:413
unsigned int getNodeIndex(const Elem *elem, const Point &pt) const
Definition: NekMeshGenerator.C:294
Real _max_corner_distance
Maximum distance a point can be from a corner and still require movement to the curved corners.
Definition: NekMeshGenerator.h:255
const bool & _retain_original_elem_type
Whether to skip the optional output conversion to Quad8 or Hex20 elements.
Definition: NekMeshGenerator.h:216
Definition: CardinalEnums.h:135
void checkPointLength(const std::vector< std::vector< Real >> &points, std::string name) const
Definition: NekMeshGenerator.C:249
Point adjustPointToCircle(const unsigned int &node_id, Elem *elem, const Real &radius, const Point &origin) const
Definition: NekMeshGenerator.C:202
NekMeshGenerator(const InputParameters ¶meters)
Definition: NekMeshGenerator.C:132
unsigned int midPointNodeIndex(const unsigned int &face_id, const unsigned int &face_node) const
Definition: NekMeshGenerator.C:430
BoundaryID getBoundaryID(const BoundaryName &name, const MeshBase &mesh) const
Definition: NekMeshGenerator.C:236
void checkElementType(std::unique_ptr< MeshBase > &mesh)
Definition: NekMeshGenerator.C:540
std::vector< Point > _polygon_corners
If curving corners, the corner coordinates of the polygon.
Definition: NekMeshGenerator.h:252
std::vector< unsigned int > _layers
Number of layers to sweep on each boundary.
Definition: NekMeshGenerator.h:246
std::vector< BoundaryID > _moving_boundary
Sideset IDs to move to fit the circular surface.
Definition: NekMeshGenerator.h:237
std::map< BoundaryID, BoundaryName > _boundary_id_to_name
Original boundary names and IDs.
Definition: NekMeshGenerator.h:264
std::vector< std::vector< unsigned int > > _side_nodes_map
Side nodes map.
Definition: NekMeshGenerator.h:282
std::unique_ptr< MeshBase > & _input
Mesh to modify.
Definition: NekMeshGenerator.h:187
std::vector< Real > _radius
Radii of the circular surface(s)
Definition: NekMeshGenerator.h:240
unsigned int _n_end_nodes
Number of nodes per element in resulting mesh.
Definition: NekMeshGenerator.h:225
virtual std::pair< unsigned int, unsigned int > pairedNodesAboutMidPoint(const unsigned int &node_id) const
Definition: NekMeshGenerator.C:685
const bool & _curve_corners
Whether to move corner nodes to fit curved radii of a regular polygon.
Definition: NekMeshGenerator.h:196
const MooseEnum & _axis
Axis of the mesh about which to build the circular surface.
Definition: NekMeshGenerator.h:193
std::vector< std::vector< unsigned int > > _side_ids
For each face, the mid-side nodes to be adjusted.
Definition: NekMeshGenerator.h:267
std::set< BoundaryID > _boundaries_to_rebuild
Boundaries to rebuild in the new mesh.
Definition: NekMeshGenerator.h:261
static InputParameters validParams()
Definition: NekMeshGenerator.C:38
std::unique_ptr< MeshBase > generate() override
Definition: NekMeshGenerator.C:694
unsigned int _n_sides
Number of sides per element (faces in 3-D, edges in 2-D)
Definition: NekMeshGenerator.h:231
unsigned int _n_start_nodes
Number of nodes per element in original mesh.
Definition: NekMeshGenerator.h:222
std::vector< std::vector< unsigned int > > _corner_nodes
For each face, the corner node indices.
Definition: NekMeshGenerator.h:270
virtual bool isCornerNode(const unsigned int &node) const
Definition: NekMeshGenerator.C:679
Definition: NekMeshGenerator.h:29
const Real & _rotation_angle
Definition: NekMeshGenerator.h:213
void initializeElemData(std::unique_ptr< MeshBase > &mesh)
Definition: NekMeshGenerator.C:565
unsigned int _n_start_nodes_per_side
Number of nodes per side of the starting element.
Definition: NekMeshGenerator.h:228
ElemType _etype
Element type in the original mesh.
Definition: NekMeshGenerator.h:279
unsigned int _n_corner_nodes
Number of corner nodes.
Definition: NekMeshGenerator.h:234
std::vector< std::vector< std::pair< unsigned int, unsigned int > > > _across_pair
For each face, the node pairing "across" that face to the other side of the original elem type.
Definition: NekMeshGenerator.h:273
const bool _has_moving_boundary
Whether sidesets will be moved to match circular surfaces.
Definition: NekMeshGenerator.h:219
std::vector< Elem * > getBoundaryLayerElems(Elem *elem, const unsigned int &n_layers, const unsigned int &primary_face) const
Definition: NekMeshGenerator.C:390
bool isNearCorner(const Point &pt) const
Definition: NekMeshGenerator.C:284