10 #ifdef MOOSE_MFEM_ENABLED 21 params.
addClassDescription(
"Projects $s \\vec u \\cdot \\vec v$ onto a scalar MFEM auxvariable");
22 params.
addRequiredParam<MFEMVectorCoefficientName>(
"first_source_vec",
"Vector coefficient");
23 params.
addRequiredParam<MFEMVectorCoefficientName>(
"second_source_vec",
"Vector coefficient");
24 params.
addParam<MFEMScalarCoefficientName>(
25 "coefficient",
"1.",
"Name of scalar coefficient s to scale the inner product by");
31 _inner(getVectorCoefficient(
"first_source_vec"), getVectorCoefficient(
"second_source_vec")),
32 _scaled_inner(getScalarCoefficient(
"coefficient"), _inner)
35 mfem::ParFiniteElementSpace * fes =
_result_var.ParFESpace();
38 if (!dynamic_cast<const mfem::L2_FECollection *>(fes->FEColl()) || fes->GetVDim() != 1)
39 mooseError(
"MFEMInnerProductAux requires the target variable to be scalar L2.");
42 if (fes->GetTrueVSize() != fes->GetVSize())
43 mooseError(
"MFEMInnerProductAux currently supports only L2 spaces with interior DOFs " 44 "(no shared/constrained DOFs).");
53 #endif // MOOSE_MFEM_ENABLED void execute() override
Perform the main work for this object.
Project onto a scalar MFEM auxvariable.
MFEMInnerProductAux(const InputParameters ¶meters)
static InputParameters validParams()
registerMooseObject("MooseApp", MFEMInnerProductAux)
mfem::ParGridFunction & _result_var
Reference to result gridfunction.
Class to construct an auxiliary solver used to update a real auxvariable.
static InputParameters validParams()
mfem::ProductCoefficient _scaled_inner
Final coefficient that applies a scaling factor to the inner product.
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...