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).");
registerMooseObject("MooseApp", MFEMCrossProductAux)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Class to construct an auxiliary solver used to update a real auxvariable.
static InputParameters validParams()
mfem::ParGridFunction & _result_var
Reference to result gridfunction.
Project onto a vector MFEM auxvariable.
void execute() override
Perform the main work for this object.
mfem::ScalarVectorProductCoefficient _scaled_cross
Final coefficient that applies a scaling factor to the cross product.
static InputParameters validParams()
MFEMCrossProductAux(const InputParameters ¶meters)