10 #ifdef MOOSE_MFEM_ENABLED 22 "Calculates a running time average of a scalar MFEM variable projected onto an auxvariable");
23 params.
addRequiredParam<VariableName>(
"source",
"Scalar MFEMVariable to take the average of.");
24 params.
addParam<mfem::real_t>(
"time_skip", 0.0,
"Time to skip before beginning the average.");
31 _source_var_name(getParam<VariableName>(
"source")),
32 _source_var_coefficient(getScalarCoefficientByName(_source_var_name)),
33 _result_var_coefficient(getScalarCoefficientByName(_result_var_name)),
34 _average_var(_result_var.ParFESpace()),
35 _skip(getParam<
Real>(
"time_skip")),
36 _time(getMFEMProblem().time()),
37 _dt(getMFEMProblem().dt())
MFEMScalarTimeAverageAux(const InputParameters ¶meters)
const Real & _skip
Time before the averaging starts.
virtual void execute() override
Computes the auxvariable.
mfem::Coefficient & _result_var_coefficient
Reference to result gridfunction coefficient.
const Real & _dt
Time step size.
mfem::ParGridFunction & _result_var
Reference to result gridfunction.
Class to construct an auxiliary solver used to update an auxvariable.
const Real & _time
The current time.
static InputParameters validParams()
AuxKernel to compute a running time average of an MFEMVariable using a linear blend.
static InputParameters validParams()
registerMooseObject("MooseApp", MFEMScalarTimeAverageAux)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
mfem::ParGridFunction _average_var
Placeholder gridfunction to avoid read/write aliasing during projection.
mfem::Coefficient & _source_var_coefficient
Reference to source gridfunction coefficient.