10#ifdef MOOSE_MFEM_ENABLED
14#include "libmesh/mesh_generation.h"
25 params.
set<
bool>(
"_mesh_generator_mesh") =
true;
28 "Mesh type for building an mfem::ParMesh from a chain of MFEMMeshGenerator objects.");
38std::unique_ptr<MooseMesh>
48 mooseError(
"MFEMMeshGeneratorMesh: the mesh base has not been set. "
49 "Ensure MFEM mesh generators are present in the input file.");
53 mooseError(
"MFEMMeshGeneratorMesh requires the final mesh generator to produce an MFEM mesh. "
54 "If you are using libMesh generators, use MeshGeneratorMesh instead.");
56 return std::move(*carrier->releaseMFEMMesh());
registerMooseObject("MooseApp", MFEMMeshGeneratorMesh)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
std::unique_ptr< T > copyConstruct(const T &object)
Copy constructs the object object.
A thin libMesh::ReplicatedMesh subclass that carries an mfem::Mesh through the MeshGenerator pipeline...
MooseMesh subclass that consumes the MeshGenerator pipeline to build an mfem::ParMesh.
mfem::Mesh buildSerialMFEMMesh() override
Build and return the serial mfem::Mesh for this object.
MFEMMeshGeneratorMesh(const InputParameters ¶meters)
std::unique_ptr< MooseMesh > safeClone() const override
A safer version of the clone() method that hands back an allocated object wrapped in a smart pointer.
static InputParameters validParams()
Abstract MooseMesh base for all MFEM-backed mesh types (MFEMFileMesh, MFEMMeshGeneratorMesh).
static InputParameters validParams()
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
bool hasMeshBase() const
Whether mesh base object was constructed or not.
MooseApp & _app
The MOOSE application this is associated with.