Serac  0.1
Serac is an implicit thermal strucural mechanics simulation code.
Public Member Functions | Static Public Member Functions | List of all members
serac::Mesh Class Reference

Helper class for constructing a mesh consistent with serac. More...

#include <mesh.hpp>

Public Member Functions

 Mesh (mfem::Mesh &&mesh, const std::string &meshtag, int serial_refine=0, int parallel_refine=0, MPI_Comm comm=MPI_COMM_WORLD)
 Construct from existing serial mfem mesh. More...
 
 Mesh (mfem::ParMesh &&mesh, const std::string &meshtag)
 Construct from existing parallel mfem mesh. More...
 
 Mesh (const std::string &meshfile, const std::string &meshtag, int serial_refine=0, int parallel_refine=0, MPI_Comm comm=MPI_COMM_WORLD)
 Construct from path to mesh (typically .g or .mesh) More...
 
const std::string & tag () const
 Returns string tag for mesh.
 
const mfem::ParMesh & mfemParMesh () const
 Returns const parallel mfem mesh.
 
mfem::ParMesh & mfemParMesh ()
 Returns parallel mfem mesh.
 
MPI_Comm getComm () const
 Returns parallel communicator.
 
serac::DomainentireBody () const
 Returns domain corresponding to the entire mesh.
 
serac::DomainentireBoundary () const
 Returns domain boundary corresponding to the entire mesh.
 
serac::DomaininternalBoundary () const
 Returns domain boundary corresponding to the internal boundary elements.
 
serac::Domaindomain (const std::string &domain_name) const
 Returns registered domain with specified name.
 
serac::DomainaddDomainOfBoundaryElements (const std::string &domain_name, std::function< bool(std::vector< vec3 >, int)> func)
 create domain of 3D boundary elements with specified name The second argument is a function taking a std::vector<vec3> corresponding to the nodal coordinates of the boundary element as well as an integer corresponding to the attribute id
 
serac::DomainaddDomainOfBoundaryElements (const std::string &domain_name, std::function< bool(std::vector< vec2 >, int)> func)
 create domain of 2D boundary elements with specified name The second argument is a function taking a std::vector<vec2> corresponding to the nodal coordinates of the boundary element as well as an integer corresponding to the attribute id
 
serac::DomainaddDomainOfBodyElements (const std::string &domain_name, std::function< bool(std::vector< vec3 >, int)> func)
 create domain of 3D elements with specified name The second argument is a function taking a std::vector<vec3> corresponding to the nodal coordinates of the element as well as an integer corresponding to the attribute id
 
serac::DomainaddDomainOfBodyElements (const std::string &domain_name, std::function< bool(std::vector< vec2 >, int)> func)
 create domain of 2D boundary elements with specified name The second argument is a function taking a std::vector<vec2> corresponding to the nodal coordinates of the element as well as an integer corresponding to the attribute id
 
const mfem::ParFiniteElementSpace & shapeDisplacementSpace ()
 get space associated with shape displacement
 
serac::FiniteElementState newShapeDisplacement ()
 create new shape displacement
 
serac::FiniteElementDual newShapeDisplacementDual ()
 create new shape displacement sensitivity
 

Static Public Member Functions

static std::string entireBodyName ()
 Returns string, name used to access the entire domain body.
 
static std::string entireBoundaryName ()
 Returns string, name used to access the entire boundary.
 
static std::string internalBoundaryName ()
 Returns string, name used to access the internal boundary elements.
 

Detailed Description

Helper class for constructing a mesh consistent with serac.

Definition at line 37 of file mesh.hpp.

Constructor & Destructor Documentation

◆ Mesh() [1/3]

serac::Mesh::Mesh ( mfem::Mesh &&  mesh,
const std::string &  meshtag,
int  serial_refine = 0,
int  parallel_refine = 0,
MPI_Comm  comm = MPI_COMM_WORLD 
)

Construct from existing serial mfem mesh.

Parameters
meshserial mfem mesh
meshtagstring tag name for mesh
serial_refinenumber of serial refinements
parallel_refinenumber of parallel refinements
commthe communicator that the parallel form of mesh should be made with

Definition at line 30 of file mesh.cpp.

◆ Mesh() [2/3]

serac::Mesh::Mesh ( mfem::ParMesh &&  mesh,
const std::string &  meshtag 
)

Construct from existing parallel mfem mesh.

Parameters
meshparallel mfem mesh
meshtagstring tag name for mesh

Definition at line 38 of file mesh.cpp.

◆ Mesh() [3/3]

serac::Mesh::Mesh ( const std::string &  meshfile,
const std::string &  meshtag,
int  serial_refine = 0,
int  parallel_refine = 0,
MPI_Comm  comm = MPI_COMM_WORLD 
)

Construct from path to mesh (typically .g or .mesh)

Parameters
meshfilepath and name of mesh to read in
meshtagstring tag name for mesh
serial_refinenumber of serial refinements
parallel_refinenumber of parallel refinements
commthe communicator that the parallel form of mesh should be made with

Definition at line 21 of file mesh.cpp.


The documentation for this class was generated from the following files: