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