10 #ifdef MOOSE_MFEM_ENABLED 21 "Convenience class to construct vector finite element spaces, abstracting away some of the " 22 "mathematical complexity of specifying the dimensions.");
24 params.
addParam<
MooseEnum>(
"fec_type", fec_types,
"Specifies the family of FE shape functions.");
25 MooseEnum closed_basis_types(
"GaussLobatto=1 ClosedUniform=4 Serendipity=6 ClosedGL=7",
29 "Specifies the closed basis used for ND and RT elements.");
30 MooseEnum basis_types(
"GaussLegendre GaussLobatto Positive OpenUniform ClosedUniform " 31 "OpenHalfUniform Serendipity ClosedGL IntegratedGLL",
34 "open_basis", basis_types,
"Specifies the open basis used for ND and RT elements.");
35 basis_types =
"GaussLobatto";
39 "Specifies the basis used for H1 and L2 vector elements. H1 spaces require a closed basis " 40 "(GaussLobatto Positive ClosedUniform Serendipity ClosedGL)");
43 "The number of components of the vectors in reference space. Zero " 44 "(the default) means it will be the same as the problem dimension. " 45 "Note that MFEM does not currently support 2D vectors in 1D space " 46 "for ND and RT elements.");
52 _fec_type(getParam<
MooseEnum>(
"fec_type")),
53 _range_dim(getParam<
int>(
"range_dim"))
66 std::to_string(
_range_dim) +
"D vectors in " + std::to_string(pdim) +
"D space.");
67 actual_type +=
"_R" + std::to_string(pdim) +
"D";
70 std::string basis =
_fec_type ==
"L2" ?
"_T" :
"@";
75 mooseWarning(
"basis parameter ignored, using closed_basis/open_basis parameters instead");
76 basis += mfem::BasisType::GetChar(getParam<MooseEnum>(
"closed_basis"));
77 basis += mfem::BasisType::GetChar(getParam<MooseEnum>(
"open_basis"));
82 mooseWarning(
"closed_basis/open_basis parameter ignored, using basis parameter instead");
84 ? std::to_string(getParam<MooseEnum>(
"basis"))
85 : std::string({mfem::BasisType::GetChar(getParam<MooseEnum>(
"basis"))});
89 basis = (basis ==
"@Gg" || basis ==
"@G" || basis ==
"_T0") ?
"" : basis;
91 return actual_type + basis +
"_" + std::to_string(pdim) +
"D_P" + std::to_string(
_fec_order);
MFEMVectorFESpace(const InputParameters ¶meters)
static InputParameters validParams()
virtual int getVDim() const override
Get the number of degrees of freedom per basis function needed in this finite element space...
registerMooseObject("MooseApp", MFEMVectorFESpace)
virtual std::string getFECName() const override
Get the name of the desired FECollection.
void mooseWarning(Args &&... args) const
const std::string _fec_type
Name of the family of finite element collections to use.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
const int _fec_order
Order of the basis functions in the finite element collection.
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...
static InputParameters validParams()
bool isParamSetByUser(const std::string &name) const
Test if the supplied parameter is set by a user, as opposed to not set or set to default.
int getProblemDim() const
Returns the dimension of the problem (i.e., the highest dimension of the reference elements in the me...
void ErrorVector unsigned int
Class with common parameters for MFEMVectorFESpace and MFEMScalarFESpace.
const int _range_dim
The number of vector components in the reference space.