21 params.
addClassDescription(
"Explicit TVD (total-variation-diminishing) second-order Runge-Kutta " 22 "time integration method.");
29 _residual_old(_nl.addVector(
"residual_old", false,
GHOSTED)),
30 _solution_older(_sys.solutionState(2))
32 mooseInfo(
"ExplicitTVDRK2 and other multistage TimeIntegrators are known not to work with " 33 "Materials/AuxKernels that accumulate 'state' and should be used with caution.");
52 mooseError(
"ExplicitTVDRK2: Time derivative of solution (`u_dot`) is not stored. Please set " 53 "uDotRequested() to true in FEProblemBase befor requesting `u_dot`.");
76 Real time_stage2 = time_old +
_dt;
87 _console <<
"1st solve" << std::endl;
106 _console <<
"2nd solve" << std::endl;
167 "ExplicitTVDRK2::postResidual(): _stage = ",
_stage,
", only _stage = 1-3 is allowed.");
NonlinearSystemBase & _nl
virtual void computeTimeDerivatives() override
Computes the time derivative and the Jacobian of the time derivative.
virtual void initPetscOutputAndSomeSolverSettings()
Reinitialize PETSc output for proper linear/nonlinear iteration display.
void computeTimeDerivativeHelper(T &u_dot, const T2 &u_old, const T3 &u_older) const
Helper function that actually does the math for computing the time derivative.
virtual NumericVector< Number > * solutionUDot()=0
virtual Real & time() const
virtual bool converged(const unsigned int nl_sys_num)
Eventually we want to convert this virtual over to taking a nonlinear system number argument...
FEProblemBase & _fe_problem
void mooseInfo(Args &&... args) const
DualNumber< Real, DNDerivativeType, true > DualReal
NumericVector< Number > & _Re_non_time
residual vector for non-time contributions
virtual void preSolve() override
virtual void advanceState()
Advance all of the state holding vectors / datastructures so that we can move to the next timestep...
const NumericVector< Number > & _solution_older
The older solution.
NumericVector< Number > & _residual_old
Buffer to store non-time residual from the first stage.
registerMooseObject("MooseApp", ExplicitTVDRK2)
unsigned int _n_linear_iterations
Total number of linear iterations over all stages of the time step.
unsigned int number() const
Gets the number of this system.
Real & _du_dot_du
Derivative of time derivative with respect to current solution: .
const NumericVector< Number > *const & _solution
solution vectors
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Base class for time integrators.
unsigned int getNumLinearIterationsLastSolve() const
Gets the number of linear iterations in the most recent solve.
void setConstJacobian(bool state)
Set flag that Jacobian is constant (for optimization purposes)
virtual System & system() override
Get the reference to the libMesh system.
ExplicitTVDRK2(const InputParameters ¶meters)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
NumericVector< Number > & _Re_time
residual vector for time contributions
virtual void postResidual(NumericVector< Number > &residual) override
Callback to the TimeIntegrator called immediately after the residuals are computed in NonlinearSystem...
virtual Real & timeOld() const
const NumericVector< Number > & _solution_old
unsigned int _n_nonlinear_iterations
Total number of nonlinear iterations over all stages of the time step.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
unsigned int getNumNonlinearIterationsLastSolve() const
Gets the number of nonlinear iterations in the most recent solve.
Explicit TVD (total-variation-diminishing) second-order Runge-Kutta time integration methods: ...
virtual void solve() override
Solves the time step and sets the number of nonlinear and linear iterations.
virtual void add(const numeric_index_type i, const Number value)=0
static InputParameters validParams()
static InputParameters validParams()
void computeADTimeDerivatives(DualReal &ad_u_dot, const dof_id_type &dof, DualReal &ad_u_dotdot) const override
method for computing local automatic differentiation time derivatives