31 class FiniteElementState;
32 class FiniteElementDual;
45 Mesh(mfem::Mesh&& mesh,
const std::string& meshtag,
int serial_refine = 0,
int parallel_refine = 0,
46 MPI_Comm comm = MPI_COMM_WORLD);
51 Mesh(mfem::ParMesh&& mesh,
const std::string& meshtag);
59 Mesh(
const std::string& meshfile,
const std::string& meshtag,
int serial_refine = 0,
int parallel_refine = 0,
60 MPI_Comm comm = MPI_COMM_WORLD);
63 const std::string&
tag()
const {
return mesh_tag_; }
66 const mfem::ParMesh&
mfemParMesh()
const {
return *mfem_mesh_; }
99 std::function<
bool(std::vector<vec3>,
int)> func);
105 std::function<
bool(std::vector<vec2>,
int)> func);
111 std::function<
bool(std::vector<vec3>,
int)> func);
117 std::function<
bool(std::vector<vec2>,
int)> func);
131 void createDomains();
134 std::string mesh_tag_;
137 mfem::ParMesh* mfem_mesh_;
140 mutable std::map<std::string, serac::Domain> domains_;
Class for encapsulating the dual vector space of a finite element space (i.e. the space of linear for...
Class for encapsulating the critical MFEM components of a primal finite element field.
Helper class for constructing a mesh consistent with serac.
mfem::ParMesh & mfemParMesh()
Returns parallel mfem mesh.
serac::Domain & entireBody() const
Returns domain corresponding to the entire 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.
serac::Domain & addDomainOfBodyElements(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::vect...
static std::string internalBoundaryName()
Returns string, name used to access the internal boundary elements.
const mfem::ParFiniteElementSpace & shapeDisplacementSpace()
get space associated with shape displacement
serac::Domain & internalBoundary() const
Returns domain boundary corresponding to the internal boundary elements.
serac::Domain & addDomainOfBoundaryElements(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 ...
serac::FiniteElementState newShapeDisplacement()
create new shape displacement
const mfem::ParMesh & mfemParMesh() const
Returns const parallel mfem mesh.
static std::string entireBoundaryName()
Returns string, name used to access the entire boundary.
serac::Domain & entireBoundary() const
Returns domain boundary corresponding to the entire mesh.
serac::FiniteElementDual newShapeDisplacementDual()
create new shape displacement sensitivity
static std::string entireBodyName()
Returns string, name used to access the entire domain body.
const std::string & tag() const
Returns string tag for mesh.
MPI_Comm getComm() const
Returns parallel communicator.
serac::Domain & domain(const std::string &domain_name) const
Returns registered domain with specified name.
many of the functions in this file amount to extracting element indices from an mesh_t like
Accelerator functionality.
a class for representing a geometric region that can be used for integration
Implementation of the tensor class used by Functional.