1#ifdef MOOSE_MFEM_ENABLED
16 "The finite element space this variable is defined on.");
19 "Class for adding complex MFEM variables to the problem (`mfem::ParComplexGridFunction`s).");
28 _fespace(getMFEMProblem().getMFEMObject<
MFEMFESpace>(
"MFEMFESpace",
29 getParam<MFEMFESpaceName>(
"fespace"))),
30 _cmplx_gridfunction(buildComplexGridFunction())
35const std::shared_ptr<mfem::ParComplexGridFunction>
45 const int cont_type = mfem_fespace.
getFEC()->GetContType();
53 if (cont_type == mfem::FiniteElementCollection::CONTINUOUS)
58 name() +
"_real_grad_mag",
63 name() +
"_imag_grad_mag",
80 if (cont_type == mfem::FiniteElementCollection::TANGENTIAL ||
81 cont_type == mfem::FiniteElementCollection::CONTINUOUS)
86 name() +
"_real_curl_mag",
91 name() +
"_imag_curl_mag",
95 if (cont_type == mfem::FiniteElementCollection::NORMAL ||
96 cont_type == mfem::FiniteElementCollection::CONTINUOUS)
registerMooseObject("MooseApp", MFEMComplexVariable)
Constructs and stores an mfem::ParComplexGridFunction object.
void declareCoefficients()
std::shared_ptr< mfem::ParComplexGridFunction > getComplexGridFunction() const
Returns a shared pointer to the constructed gridfunction.
MFEMComplexVariable(const InputParameters ¶meters)
const MFEMFESpace & getFESpace() const
Returns a reference to the fespace used by the gridfunction.
const MFEMFESpace & _fespace
const std::shared_ptr< mfem::ParComplexGridFunction > buildComplexGridFunction()
Constructs the gridfunction.
const std::shared_ptr< mfem::ParComplexGridFunction > _cmplx_gridfunction
Stores the constructed gridfunction.
static InputParameters validParams()
Constructs and stores an mfem::ParFiniteElementSpace object.
virtual bool isScalar() const =0
std::shared_ptr< mfem::FiniteElementCollection > getFEC() const
Returns a shared pointer to the constructed fec.
std::shared_ptr< mfem::ParFiniteElementSpace > getFESpace() const
Returns a shared pointer to the constructed fespace.
Thin base for MFEM objects backed directly by MooseObject instead of UserObject.
static InputParameters validParams()
Declare the common parameters required by MFEM MooseObject-backed classes.
MFEMProblem & getMFEMProblem()
Return the owning MFEM problem.
Moose::MFEM::CoefficientManager & getCoefficients()
Method to get the PropertyManager object for storing material properties and converting them to MFEM ...
Scalar coefficient that evaluates the magnitude of a vector coefficient.
const std::string & name() const
Get the name of the class.
static InputParameters validParams()
mfem::Coefficient & declareScalar(const std::string &name, const std::string &existing_or_literal)
Declare an alias to an existing scalar coefficient or, if it does not exist, try interpreting the nam...
mfem::VectorCoefficient & getVectorCoefficient(const std::string &name)
Return a vector coefficient with the given name or, if that doesn't exists, try interpreting the name...
mfem::VectorCoefficient & declareVector(const std::string &name, const std::string &existing_or_literal)
Declare an alias to an existing vector coefficientor or, if it does not exist, try interpreting the n...