23 params.
addClassDescription(
"Fourth-order diagonally implicit Runge Kutta method (Dirk) with " 24 "three stages plus an update.");
25 params.
addParam<
bool>(
"safe_start",
true,
"If true, use LStableDirk4 to bootstrap this method.");
33 _safe_start(getParam<bool>(
"safe_start"))
35 mooseInfo(
"AStableDirk4 and other multistage TimeIntegrators are known not to work with " 36 "Materials/AuxKernels that accumulate 'state' and should be used with caution.");
39 for (
unsigned int stage = 0; stage < 3; ++stage)
41 std::ostringstream oss;
42 oss <<
"residual_stage" << stage + 1;
88 mooseError(
"AStableDirk4: Time derivative of solution (`u_dot`) is not stored. Please set " 89 "uDotRequested() to true in FEProblemBase befor requesting `u_dot`.");
127 for (
unsigned int current_stage = 1; current_stage < 5; ++current_stage)
137 if (current_stage < 4)
144 _console <<
"Update Stage." << std::endl;
172 mooseError(
"AStableDirk4::postResidual(): Member variable _stage can only have values 1-4.");
193 for (
unsigned int j = 0; j <
_stage; ++j)
208 for (
unsigned int j = 0; j < 3; ++j)
NonlinearSystemBase & _nl
Fourth-order diagonally implicit Runge Kutta method (Dirk) with five stages.
virtual void initPetscOutputAndSomeSolverSettings()
Reinitialize PETSc output for proper linear/nonlinear iteration display.
virtual NumericVector< Number > * solutionUDot()=0
std::shared_ptr< LStableDirk4 > _bootstrap_method
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...
virtual void solve() override
Solves the time step and sets the number of nonlinear and linear iterations.
Generic factory class for build all sorts of objects.
NumericVector< Number > & addVector(const std::string &vector_name, const bool project, const ParallelType type)
Adds a solution length vector to the system.
FEProblemBase & _fe_problem
void mooseInfo(Args &&... args) const
DualNumber< Real, DNDerivativeType, true > DualReal
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters ¶meters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
NumericVector< Number > & _Re_non_time
residual vector for non-time contributions
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
AStableDirk4(const InputParameters ¶meters)
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Base class for a system (of equations)
registerMooseObject("MooseApp", AStableDirk4)
virtual const std::string & name() const
Get the name of the class.
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
MetaPhysicL::DualNumber< V, D, asd > sqrt(const MetaPhysicL::DualNumber< V, D, asd > &a)
static InputParameters validParams()
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template cos(_arg) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(cos
NumericVector< Number > * _stage_residuals[3]
unsigned int _n_linear_iterations
Total number of linear iterations over all stages of the time step.
MooseApp & _app
The MOOSE application this is associated with.
unsigned int number() const
Gets the number of this system.
Fourth-order diagonally implicit Runge Kutta method (Dirk) with three stages plus an update...
Real & _du_dot_du
Derivative of time derivative with respect to current solution: .
const NumericVector< Number > *const & _solution
solution vectors
void computeTimeDerivativeHelper(T &u_dot, const T2 &u_old) const
Helper function that actually does the math for computing the time derivative.
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.
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
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
virtual void computeTimeDerivatives() override
Computes the time derivative and the Jacobian of the time derivative.
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.
virtual void add(const numeric_index_type i, const Number value)=0
static InputParameters validParams()
virtual void postResidual(NumericVector< Number > &residual) override
Callback to the TimeIntegrator called immediately after the residuals are computed in NonlinearSystem...