Go to the documentation of this file.
21 params.
addParam<Real>(
"coefficient", 1.0,
"A simple coefficient");
23 "order", 2,
"The order of global truncation error: midpoint=1, trapazoidal=2, Simpson=3");
29 _coef(getParam<Real>(
"coefficient")),
30 _order(getParam<unsigned int>(
"order"))
53 mooseError(
"VariableTimeIntegrationAux: unknown time integraiton order specfied");
71 Real integral_value = 0.0;
73 for (
unsigned int i = 0; i <
_order; ++i)
91 Real term1 = (x2 - x0) * (y0 + (x2 - x0) * (y1 - y0) / (2.0 * (x1 - x0)));
92 Real term2 = (2.0 * x2 * x2 - x0 * x2 - x0 * x0 + 3.0 * x0 * x1 - 3.0 * x1 * x2) / 6.0;
93 Real term3 = (y2 - y1) / (x2 - x1) - (y1 - y0) / (x1 - x0);
94 integral_value = term1 + term2 * term3;
97 return integral_value;
std::vector< Real > _integration_coef
An AuxKernel that can be used to integrate a field variable in time using a variety of different inte...
virtual const VariableValue & coupledValueOlder(const std::string &var_name, unsigned int comp=0)
Returns an old value from two time steps previous of a coupled variable.
static InputParameters validParams()
void mooseError(Args &&... args) const
defineLegacyParams(VariableTimeIntegrationAux)
const OutputTools< ComputeValueType >::VariableValue & _u_older
Holds the t-2 solution at the current quadrature point.
virtual Real computeValue() override
Compute and return the value of the aux variable.
Base class for creating new auxiliary kernels and auxiliary boundary conditions.
const OutputTools< ComputeValueType >::VariableValue & _u_old
Holds the previous solution at the current quadrature point.
Real & _dt_old
Size of the old time step.
virtual const VariableValue & coupledValue(const std::string &var_name, unsigned int comp=0)
Returns value of a coupled variable.
VariableTimeIntegrationAux(const InputParameters ¶meters)
static InputParameters validParams()
virtual const VariableValue & coupledValueOld(const std::string &var_name, unsigned int comp=0)
Returns an old value from previous time step of a coupled variable.
Real & _dt
Time step size.
std::vector< const VariableValue * > _coupled_vars
unsigned int _qp
Quadrature point index.
registerMooseObject("MooseApp", VariableTimeIntegrationAux)