21 params.
addClassDescription(
"Second-order Runge-Kutta (implicit midpoint) time integration.");
28 _residual_stage1(addVector(
"residual_stage1", false,
libMesh::
GHOSTED))
30 mooseInfo(
"ImplicitMidpoint and other multistage TimeIntegrators are known not to work with " 31 "Materials/AuxKernels that accumulate 'state' and should be used with caution.");
41 mooseError(
"ImplicitMidpoint: Time derivative of solution (`u_dot`) is not stored. Please set " 42 "uDotRequested() to true in FEProblemBase befor requesting `u_dot`.");
64 Real time_half = (time_new + time_old) / 2.;
72 _console <<
"1st stage" << std::endl;
85 _console <<
"2nd stage" << std::endl;
132 "ImplicitMidpoint::postResidual(): _stage = ",
_stage,
", only _stage = 1, 2 is allowed.");
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
virtual void initPetscOutputAndSomeSolverSettings()
Reinitialize PETSc output for proper linear/nonlinear iteration display.
virtual Real & time() const
Second-order Runge-Kutta (implicit midpoint) time integration.
FEProblemBase & _fe_problem
Reference to the problem.
void mooseInfo(Args &&... args) const
static InputParameters validParams()
NonlinearSystemBase * _nl
Pointer to the nonlinear system, can happen that we dont have any.
SystemBase & _sys
Reference to the system this time integrator operates on.
ImplicitMidpoint(const InputParameters ¶meters)
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("MooseApp", ImplicitMidpoint)
NumericVector< Number > * _Re_time
residual vector for time contributions
void computeTimeDerivativeHelper(T &u_dot, const T2 &u_old) const
Helper function that actually does the math for computing the time derivative.
virtual void computeTimeDerivatives() override
Computes the time derivative and the Jacobian of the time derivative.
virtual NumericVector< Number > * solutionUDot()
virtual bool converged(const unsigned int sys_num)
Eventually we want to convert this virtual over to taking a solver system number argument.
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.
NumericVector< Number > * _residual_stage1
Buffer to store non-time residual from the first stage.
virtual void solve() override
Solves the time step and sets the number of nonlinear and linear iterations.
const NumericVector< Number > *const & _solution
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 void postResidual(NumericVector< Number > &residual) override
Callback to the NonLinearTimeIntegratorInterface called immediately after the residuals are computed ...
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
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.
virtual void add(const numeric_index_type i, const Number value)=0
NumericVector< Number > * _Re_non_time
residual vector for non-time contributions
static InputParameters validParams()
void computeDuDotDu()
Compute _du_dot_du.
virtual libMesh::System & system() override
Get the reference to the libMesh system.