16 #include "libmesh/nonlinear_solver.h" 26 "Implementation of Explicit/Forward Euler without invoking any of the nonlinear solver");
28 params.
addParam<
bool>(
"use_constant_mass",
30 "If set to true, will only compute the mass matrix in the first time step, " 31 "and keep using it throughout the simulation.");
45 mooseError(
"ActuallyExplicitEuler: Time derivative of solution (`u_dot`) is not stored. Please " 46 "set uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
NonlinearSystemBase & _nl
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
void overwriteNodeFace(NumericVector< Number > &soln)
Called from explicit time stepping to overwrite boundary positions (explicit dynamics).
virtual Real & time() const
Real _current_time
Save off current time to reset it back and forth.
virtual void postResidual(NumericVector< Number > &residual) override
Callback to the TimeIntegrator called immediately after the residuals are computed in NonlinearSystem...
virtual void setSolution(const NumericVector< Number > &soln)
FEProblemBase & _fe_problem
DualNumber< Real, DNDerivativeType, true > DualReal
NumericVector< Number > & _Re_non_time
residual vector for non-time contributions
TagID _Ke_time_tag
For computing the mass matrix.
static InputParameters validParams()
virtual void computeJacobianTag(const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, TagID tag)
Form a Jacobian matrix for a given tag.
static InputParameters validParams()
NumericVector< Real > & _solution_update
Solution vector for the linear solve.
unsigned int _n_linear_iterations
Total number of linear iterations over all stages of the time step.
registerMooseObject("MooseApp", ActuallyExplicitEuler)
bool performExplicitSolve(SparseMatrix< Number > &mass_matrix)
Solves a linear system using the chosen solve type.
unsigned int number() const
Gets the number of this system.
const bool & _constant_mass
Real & _du_dot_du
Derivative of time derivative with respect to current solution: .
const NumericVector< Number > *const & _solution
solution vectors
virtual void solve() override
Solves the time step and sets the number of nonlinear and linear iterations.
ActuallyExplicitEuler(const InputParameters ¶meters)
void computeTimeDerivativeHelper(T &u_dot, const T2 &u_old) const
Helper function that actually does the math for computing the time derivative.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
NumericVector< Number > & _Re_time
residual vector for time contributions
Implements a truly explicit (no nonlinear solve) first-order, forward Euler time integration scheme...
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.
void computeResidual(NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, NumericVector< Number > &residual)
This function is called by Libmesh to form a residual.
NumericVector< Number > & solutionOld()
virtual void computeTimeDerivatives() override
Computes the time derivative and the Jacobian of the time derivative.
NumericVector< Real > & _explicit_residual
Residual used for the RHS.
Base class for explicit time integrators that are implemented without using a nonlinear solver...
NonlinearImplicitSystem * _nonlinear_implicit_system
Nonlinear implicit system, if applicable; otherwise, nullptr.