14 #include "libmesh/face_quad4.h" 15 #include "libmesh/cell_hex8.h" 16 #include "libmesh/edge_edge2.h" 33 std::unique_ptr<MeshBase>
generate()
override;
81 "elemId not implemented for this element type in DistributedRectilinearMeshGenerator");
103 mooseError(
"numNeighbors not implemented for this element type in " 104 "DistributedRectilinearMeshGenerator");
119 template <
typename T>
126 std::vector<dof_id_type> & ,
129 mooseError(
"getNeighbors not implemented for this element type in " 130 "DistributedRectilinearMeshGenerator");
144 template <
typename T>
153 "nodeId not implemented for this element type in DistributedRectilinearMeshGenerator");
168 template <
typename T>
179 "addPoint not implemented for this element type in DistributedRectilinearMeshGenerator");
196 template <
typename T>
209 "addElement not implemented for this element type in DistributedRectilinearMeshGenerator");
227 template <
typename T>
232 std::vector<dof_id_type> & ,
233 std::vector<dof_id_type> & ,
234 std::vector<dof_id_type> & )
236 mooseError(
"paritionSquarely not implemented for this element type in " 237 "DistributedRectilinearMeshGenerator");
250 template <
typename T>
259 "getIndices not implemented for this element type in DistributedRectilinearMeshGenerator");
270 template <
typename T>
275 const std::set<dof_id_type> & ,
276 std::set<dof_id_type> & )
278 mooseError(
"getGhostNeighbors not implemented for this element type in " 279 "DistributedRectilinearMeshGenerator");
287 template <
typename T>
290 mooseError(
"setBoundaryNames not implemented for this element type in " 291 "DistributedRectilinearMeshGenerator");
309 template <
typename T>
321 mooseError(
"scaleNodalPositions not implemented for this element type in " 322 "DistributedRectilinearMeshGenerator");
415 void DistributedRectilinearMeshGenerator::getNeighbors<Edge2>(
const dof_id_type nx,
421 std::vector<dof_id_type> & neighbors,
425 void DistributedRectilinearMeshGenerator::getNeighbors<Quad4>(
const dof_id_type nx,
431 std::vector<dof_id_type> & neighbors,
435 void DistributedRectilinearMeshGenerator::getNeighbors<Hex8>(
const dof_id_type nx,
441 std::vector<dof_id_type> & neighbors,
469 Node * DistributedRectilinearMeshGenerator::addPoint<Edge2>(
const dof_id_type nx,
479 Node * DistributedRectilinearMeshGenerator::addPoint<Quad4>(
const dof_id_type nx,
489 Node * DistributedRectilinearMeshGenerator::addPoint<Hex8>(
const dof_id_type nx,
499 void DistributedRectilinearMeshGenerator::addElement<Edge2>(
const dof_id_type nx,
511 void DistributedRectilinearMeshGenerator::addElement<Quad4>(
const dof_id_type nx,
523 void DistributedRectilinearMeshGenerator::addElement<Hex8>(
const dof_id_type nx,
535 void DistributedRectilinearMeshGenerator::getIndices<Edge2>(
const dof_id_type nx,
543 void DistributedRectilinearMeshGenerator::getIndices<Quad4>(
const dof_id_type nx,
551 void DistributedRectilinearMeshGenerator::getIndices<Hex8>(
const dof_id_type nx,
559 void DistributedRectilinearMeshGenerator::getGhostNeighbors<Edge2>(
563 const MeshBase &
mesh,
564 const std::set<dof_id_type> & current_elems,
565 std::set<dof_id_type> & ghost_elems);
568 void DistributedRectilinearMeshGenerator::getGhostNeighbors<Quad4>(
572 const MeshBase &
mesh,
573 const std::set<dof_id_type> & current_elems,
574 std::set<dof_id_type> & ghost_elems);
577 void DistributedRectilinearMeshGenerator::getGhostNeighbors<Hex8>(
581 const MeshBase &
mesh,
582 const std::set<dof_id_type> & current_elems,
583 std::set<dof_id_type> & ghost_elems);
586 void DistributedRectilinearMeshGenerator::scaleNodalPositions<Edge2>(
dof_id_type nx,
598 void DistributedRectilinearMeshGenerator::scaleNodalPositions<Quad4>(
dof_id_type nx,
610 void DistributedRectilinearMeshGenerator::scaleNodalPositions<Hex8>(
dof_id_type nx,
622 void DistributedRectilinearMeshGenerator::setBoundaryNames<Edge2>(BoundaryInfo & boundary_info);
625 void DistributedRectilinearMeshGenerator::setBoundaryNames<Quad4>(BoundaryInfo & boundary_info);
628 void DistributedRectilinearMeshGenerator::setBoundaryNames<Hex8>(BoundaryInfo & boundary_info);
631 void DistributedRectilinearMeshGenerator::paritionSquarely<Edge2>(
636 std::vector<dof_id_type> & ,
637 std::vector<dof_id_type> & ,
638 std::vector<dof_id_type> & );
641 void DistributedRectilinearMeshGenerator::paritionSquarely<Quad4>(
646 std::vector<dof_id_type> & ,
647 std::vector<dof_id_type> & ,
648 std::vector<dof_id_type> & );
652 DistributedRectilinearMeshGenerator::paritionSquarely<Hex8>(
const dof_id_type ,
656 std::vector<dof_id_type> & ,
657 std::vector<dof_id_type> & ,
658 std::vector<dof_id_type> & );
processor_id_type _num_parts_per_compute_node
Number of cores per compute node if hierarch partitioning is used.
void getNeighbors(const dof_id_type, const dof_id_type, const dof_id_type, const dof_id_type, const dof_id_type, const dof_id_type, std::vector< dof_id_type > &, const bool)
Get the IDs of the neighbors of a given element.
std::string _part_package
External partitioner.
void scaleNodalPositions(dof_id_type, dof_id_type, dof_id_type, Real, Real, Real, Real, Real, Real, MeshBase &)
All meshes are generated on the unit square.
dof_id_type & _nx
Number of elements in x, y, z direction.
processor_id_type _num_cores_for_partition
Number of cores for partitioning the graph The number of cores for the graph partition can be differe...
void getIndices(const dof_id_type, const dof_id_type, const dof_id_type, dof_id_type &, dof_id_type &, dof_id_type &)
Compute the i,j,k indices of a given element ID.
void getGhostNeighbors(const dof_id_type, const dof_id_type, const dof_id_type, const MeshBase &, const std::set< dof_id_type > &, std::set< dof_id_type > &)
Find the elements and sides that need ghost elements.
ElemType _elem_type
The type of element to build.
DistributedRectilinearMeshGenerator(const InputParameters ¶meters)
This class works by first creating a "distributed dual graph" of the element connectivity based on a ...
void paritionSquarely(const dof_id_type, const dof_id_type, const dof_id_type, const processor_id_type, std::vector< dof_id_type > &, std::vector< dof_id_type > &, std::vector< dof_id_type > &)
Partition mesh squarely.
uint8_t processor_id_type
void addElement(const dof_id_type, const dof_id_type, const dof_id_type, const dof_id_type, const dof_id_type, const dof_id_type, const dof_id_type, const processor_id_type, const ElemType, MeshBase &)
Adds an element to the mesh.
Node * addPoint(const dof_id_type, const dof_id_type, const dof_id_type, const dof_id_type, const dof_id_type, const dof_id_type, const ElemType, MeshBase &)
Add a node to the mesh.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
void setBoundaryNames(BoundaryInfo &)
Set the boundary names for any added boundary ideas.
Real & _xmin
The min/max values for x,y,z component.
void buildCube(UnstructuredMesh &, const unsigned int, unsigned int, unsigned int, const Real, const Real, const Real, const Real, const Real, const Real, const ElemType)
Build a cube mesh.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MooseEnum _dim
The dimension of the mesh.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
dof_id_type numNeighbors(const dof_id_type, const dof_id_type, const dof_id_type, const dof_id_type, const dof_id_type, const dof_id_type)
Get the number of neighbors this element will have.
const InputParameters & parameters() const
Get the parameters of the object.
Real _bias_x
The amount by which to bias the cells in the x,y,z directions.
unsigned _num_side_layers
Number of element side neighbor layers While most of applications in moose require one layer of side ...
dof_id_type nodeId(const ElemType, const dof_id_type, const dof_id_type, const dof_id_type, const dof_id_type, const dof_id_type)
The ID of the i,j,k node.
std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
MeshGenerators are objects that can modify or add to an existing mesh.
static InputParameters validParams()
dof_id_type elemId(const dof_id_type, const dof_id_type, const dof_id_type, const dof_id_type, const dof_id_type)
Get the element ID for a given hex.
std::string _partition_method
Which method is used to partition the mesh that is not built yet.