24 "Fourth-order diagonally implicit Runge Kutta method (Dirk) with five stages.");
34 {.125, .125, .25, 0, 0},
35 {-1.5, .75, 1.5, .25, 0},
36 {0, 1. / 6, 2. / 3, -1. / 12, .25}};
41 mooseInfo(
"LStableDirk4 and other multistage TimeIntegrators are known not to work with "
42 "Materials/AuxKernels that accumulate 'state' and should be used with caution.");
45 for (
unsigned int stage = 0; stage <
_n_stages; ++stage)
47 std::ostringstream oss;
48 oss <<
"residual_stage" << stage + 1;
60 mooseError(
"LStableDirk4: Time derivative of solution (`u_dot`) is not stored. Please set "
61 "uDotRequested() to true in FEProblemBase befor requesting `u_dot`.");
90 for (
unsigned int current_stage = 1; current_stage <=
_n_stages; ++current_stage)
132 mooseError(
"LStableDirk4::postResidual(): Member variable _stage can only have values 1-",
153 for (
unsigned int j = 0; j <
_stage; ++j)
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("MooseApp", LStableDirk4)
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
virtual Real & timeOld() const
virtual Real & time() const
virtual void initPetscOutputAndSomeSolverSettings()
Reinitialize PETSc output for proper linear/nonlinear iteration display.
Fourth-order diagonally implicit Runge Kutta method (Dirk) with five stages.
NumericVector< Number > * _stage_residuals[_n_stages]
LStableDirk4(const InputParameters ¶meters)
static const Real _a[_n_stages][_n_stages]
static InputParameters validParams()
virtual void computeTimeDerivatives() override
Computes the time derivative and the Jacobian of the time derivative.
static const Real _c[_n_stages]
virtual void solve() override
Solves the time step and sets the number of nonlinear and linear iterations.
void computeTimeDerivativeHelper(T &u_dot, const T2 &u_old) const
Helper function that actually does the math for computing the time derivative.
virtual void postResidual(NumericVector< Number > &residual) override
Callback to the NonLinearTimeIntegratorInterface called immediately after the residuals are computed ...
virtual void computeADTimeDerivatives(ADReal &ad_u_dot, const dof_id_type &dof, ADReal &ad_u_dotdot) const override
method for computing local automatic differentiation time derivatives
static const unsigned int _n_stages
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
void mooseInfo(Args &&... args) const
virtual void potentiallySetupFiniteDifferencing()
Create finite differencing contexts for assembly of the Jacobian and/or approximating the action of t...
virtual libMesh::System & system() override
Get the reference to the libMesh system.
void destroyColoring()
Destroy the coloring object if it exists.
NonlinearSystemBase * _nl
Pointer to the nonlinear system, can happen that we dont have any.
NumericVector< Number > * _Re_non_time
residual vector for non-time contributions
NumericVector< Number > * addVector(const std::string &name, const bool project, const libMesh::ParallelType type)
Wrapper around vector addition for nonlinear time integrators.
NumericVector< Number > * _Re_time
residual vector for time contributions
virtual bool converged(const unsigned int sys_num)
Eventually we want to convert this virtual over to taking a solver system number argument.
virtual NumericVector< Number > * solutionUDot()
unsigned int number() const
Gets the number of this system.
Base class for time integrators.
void computeDuDotDu()
Compute _du_dot_du.
unsigned int getNumLinearIterationsLastSolve() const
Gets the number of linear iterations in the most recent solve.
const NumericVector< Number > *const & _solution
unsigned int _n_linear_iterations
Total number of linear iterations over all stages of the time step.
unsigned int _n_nonlinear_iterations
Total number of nonlinear iterations over all stages of the time step.
static InputParameters validParams()
FEProblemBase & _fe_problem
Reference to the problem.
unsigned int getNumNonlinearIterationsLastSolve() const
Gets the number of nonlinear iterations in the most recent solve.
SystemBase & _sys
Reference to the system this time integrator operates on.
Real & _dt
The current time step size.
const NumericVector< Number > & _solution_old
virtual void add(const numeric_index_type i, const T value)=0
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real