Serac  0.1
Serac is an implicit thermal strucural mechanics simulation code.
Classes | Functions
serac::mesh Namespace Reference

Mesh related input options. More...

Classes

struct  InputOptions
 Container for the mesh input options. More...
 
struct  FileInputOptions
 Input options for meshes read from files. More...
 
struct  BoxInputOptions
 Input options for generated meshes. More...
 
struct  NBallInputOptions
 Input options for generated meshes. More...
 

Functions

std::unique_ptr< mfem::ParMesh > buildParallelMesh (const InputOptions &options, const MPI_Comm comm=MPI_COMM_WORLD)
 Constructs an MFEM parallel mesh from a set of input options. More...
 
std::unique_ptr< mfem::ParMesh > refineAndDistribute (mfem::Mesh &&serial_mesh, const int refine_serial=0, const int refine_parallel=0, const MPI_Comm comm=MPI_COMM_WORLD)
 Finalizes a serial mesh into a refined parallel mesh. More...
 

Detailed Description

Mesh related input options.

Function Documentation

◆ buildParallelMesh()

std::unique_ptr< mfem::ParMesh > serac::mesh::buildParallelMesh ( const InputOptions options,
const MPI_Comm  comm = MPI_COMM_WORLD 
)

Constructs an MFEM parallel mesh from a set of input options.

Parameters
[in]optionsThe options used to construct the mesh
[in]commThe MPI communicator to use with the parallel mesh
Returns
A unique_ptr containing the constructed mesh

Definition at line 423 of file mesh_utils.cpp.

◆ refineAndDistribute()

std::unique_ptr< mfem::ParMesh > serac::mesh::refineAndDistribute ( mfem::Mesh &&  serial_mesh,
const int  refine_serial = 0,
const int  refine_parallel = 0,
const MPI_Comm  comm = MPI_COMM_WORLD 
)

Finalizes a serial mesh into a refined parallel mesh.

Parameters
[in]serial_meshThe "base" serial mesh
[in]refine_serialThe number of serial refinements
[in]refine_parallelThe number of parallel refinements
[in]commThe MPI communicator
Returns
A unique_ptr containing the constructed mesh
Note
It is sometimes required to refine serially first if your number of processors is less than the original number of mesh elements

Definition at line 452 of file mesh_utils.cpp.