10 #ifdef MOOSE_MFEM_ENABLED 22 params.
addParam<MFEMFESpaceName>(
"flux_fespace",
"FE space to write the flux into");
23 params.
addParam<MFEMFESpaceName>(
"smooth_flux_fespace",
"FE space to write the smooth flux into");
32 if (
auto * sn = queryParam<MFEMFESpaceName>(
"flux_fespace"))
36 if (
auto * sn = queryParam<MFEMFESpaceName>(
"smooth_flux_fespace"))
48 [[maybe_unused]]
bool is_supported =
false;
51 is_supported |= (
dynamic_cast<mfem::DiffusionIntegrator *
>(
_integ.get()) !=
nullptr);
53 is_supported |= (
dynamic_cast<mfem::CurlCurlIntegrator *
>(
_integ.get()) !=
nullptr);
55 is_supported |= (
dynamic_cast<mfem::ElasticityIntegrator *
>(
_integ.get()) !=
nullptr);
58 mooseError(
"MFEML2ZienkiewiczZhuIndicator only supports MFEMDiffusionKernel, " 59 "MFEMCurlCurlKernel and MFEMLinearElasticityKernel");
68 _flux_fec = std::make_unique<mfem::L2_FECollection>(order,
dim);
std::shared_ptr< mfem::ParGridFunction > getGridFunction(const std::string &name)
Wrapper for the Zienkiewicz-Zhu estimator with L2 projection.
virtual void createEstimator() override
Override the createEstimator method to use a Zienkiewicz-Zhu estimator.
MFEMProblem & getMFEMProblem()
Return the owning MFEM problem.
const VariableName & _var_name
Name of the variable associated with the weak form that the kernel is applied to. ...
std::shared_ptr< mfem::FiniteElementCollection > _flux_fec
Finite element collection for the discontinuous flux.
std::shared_ptr< mfem::ParFiniteElementSpace > _flux_fes
Finite element space for the discontinuous flux.
T & getMFEMObject(const std::string &system, const std::string &name, const THREAD_ID tid=0) const
Retrieve an MFEM object from the warehouse by system and name.
static InputParameters validParams()
mfem::ParMesh & getParMesh() const
Get reference to the FE space's underlying mesh.
std::unique_ptr< mfem::BilinearFormIntegrator > _integ
Auxiliary blf integrator implementing ComputeElementFlux().
virtual mfem::BilinearFormIntegrator * createBFIntegrator()
Create MFEM integrator to apply to the LHS of the weak form. Ownership managed by the caller...
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
mfem::ParFiniteElementSpace & getFESpace() const
Get reference to FE space using the name we store when setting up this class.
std::shared_ptr< mfem::ParFiniteElementSpace > _smooth_flux_fes
Finite element space for the smoothed flux.
const std::string & _kernel_name
Name of the kernel providing the error estimate.
std::shared_ptr< mfem::ErrorEstimator > _error_estimator
Shared pointer to the MFEM estimator wrapped by this class.
registerMooseObject("MooseApp", MFEML2ZienkiewiczZhuIndicator)
Constructs and stores an mfem::ParFiniteElementSpace object.
std::shared_ptr< mfem::FiniteElementCollection > _smooth_flux_fec
Finite element collection for the smoothed flux.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
MFEML2ZienkiewiczZhuIndicator(const InputParameters ¶meters)
Class to construct an MFEM integrator to apply to the equation system.
static InputParameters validParams()