22 "Second order diagonally implicit Runge Kutta method (Dirk) with two stages.");
29 _residual_stage1(_nl.addVector(
"residual_stage1", false,
GHOSTED)),
30 _residual_stage2(_nl.addVector(
"residual_stage2", false,
GHOSTED)),
33 mooseInfo(
"LStableDirk2 and other multistage TimeIntegrators are known not to work with " 34 "Materials/AuxKernels that accumulate 'state' and should be used with caution.");
44 mooseError(
"LStableDirk2: Time derivative of solution (`u_dot`) is not stored. Please set " 45 "uDotRequested() to true in FEProblemBase befor requesting `u_dot`.");
80 _console <<
"1st stage" << std::endl;
93 _console <<
"2nd stage" << std::endl;
151 mooseError(
"LStableDirk2::postResidual(): Member variable _stage can only have values 1 or 2.");
NonlinearSystemBase & _nl
virtual void initPetscOutputAndSomeSolverSettings()
Reinitialize PETSc output for proper linear/nonlinear iteration display.
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
virtual NumericVector< Number > * solutionUDot()=0
virtual Real & time() const
virtual void computeTimeDerivatives() override
Computes the time derivative and the Jacobian of the time derivative.
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
LStableDirk2(const InputParameters ¶meters)
DualNumber< Real, DNDerivativeType, true > DualReal
NumericVector< Number > & _Re_non_time
residual vector for non-time contributions
static InputParameters validParams()
virtual void solve() override
Solves the time step and sets the number of nonlinear and linear iterations.
MetaPhysicL::DualNumber< V, D, asd > sqrt(const MetaPhysicL::DualNumber< V, D, asd > &a)
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.
virtual void postResidual(NumericVector< Number > &residual) override
Callback to the TimeIntegrator called immediately after the residuals are computed in NonlinearSystem...
void computeTimeDerivativeHelper(T &u_dot, const T2 &u_old) const
Helper function that actually does the math for computing the time derivative.
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.
virtual System & system() override
Get the reference to the libMesh system.
unsigned int _stage
Indicates the current stage (1 or 2).
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
NumericVector< Number > & _Re_time
residual vector for time contributions
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.
NumericVector< Number > & _residual_stage2
Buffer to store non-time residual from second stage solve.
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.
Second order diagonally implicit Runge Kutta method (Dirk) with two stages.
virtual void add(const numeric_index_type i, const Number value)=0
registerMooseObject("MooseApp", LStableDirk2)
NumericVector< Number > & _residual_stage1
Buffer to store non-time residual from first stage solve.
static InputParameters validParams()