16 #include "libmesh/nonlinear_solver.h" 27 params.
addClassDescription(
"Implementation of explicit, Central Difference integration without " 28 "invoking any of the nonlinear solver");
35 _du_dotdot_du(_sys.duDotDotDu()),
36 _solution_older(_sys.solutionState(2))
49 ADReal & ad_u_dotdot)
const 53 ad_u_dotdot = ad_u_dot;
74 mooseError(
"CentralDifference: Time derivative of solution (`u_dot`) is not stored. Please " 75 "set uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
78 mooseError(
"CentralDifference: Time derivative of solution (`u_dotdot`) is not stored. Please " 79 "set uDotDotRequested() to true in FEProblemBase before requesting `u_dot`.");
107 u_dotdot_factor *= 1.0 / (
_dt *
_dt);
108 u_dotdot_factor.
close();
119 u_dot_factor *= 1.0 / (2.0 *
_dt);
120 u_dot_factor.
close();
Real & _du_dotdot_du
solution vector for
virtual void setUDotDotOldRequested(const bool u_dotdot_old_requested)
Set boolean flag to true to store old solution second time derivative.
void computeTimeDerivativeHelper(T &u_dot, T2 &u_dotdot, const T3 &u_old, const T4 &u_older) const
Helper function that actually does the math for computing the time derivative.
const TagID _u_dot_factor_tag
The vector tag for the nodal multiplication factor for the residual calculation of the udot term...
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
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
virtual void setUDotDotRequested(const bool u_dotdot_requested)
Set boolean flag to true to store solution second time derivative.
virtual void initialSetup() override
Called to setup datastructures.
bool _is_lumped
Boolean flag that is set to true if lumped mass matrix is used.
FEProblemBase & _fe_problem
Reference to the problem.
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.
virtual void computeTimeDerivatives() override
Computes the time derivative and the Jacobian of the time derivative.
static InputParameters validParams()
static InputParameters validParams()
Implements a truly explicit (no nonlinear solve) Central Difference time integration scheme...
registerMooseObject("MooseApp", CentralDifference)
NumericVector< Number > & solutionOlder()
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
DualNumber< Real, DNDerivativeType, true > ADReal
Real & _dt
The current time step size.
MooseEnum _solve_type
Solve type for how mass matrix is handled.
NumericVector< Number > & addVector(const std::string &vector_name, const bool project, const libMesh::ParallelType type)
Adds a solution length vector to the system.
virtual void setUDotOldRequested(const bool u_dot_old_requested)
Set boolean flag to true to store old solution time derivative.
const TagID _u_dotdot_factor_tag
The vector tag for the nodal multiplication factor for the residual calculation of the udotdot term...
virtual NumericVector< Number > * solutionUDot()
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
virtual Real duDotDuCoeff() const override
const NumericVector< Number > *const & _solution
const NumericVector< Number > & _solution_older
The older solution.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
Implements a truly explicit (no nonlinear solve) first-order, forward Euler time integration scheme...
const NumericVector< Number > & _solution_old
virtual NumericVector< Number > * solutionUDotDot()
CentralDifference(const InputParameters ¶meters)
NumericVector< Number > & solutionOld()
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
virtual void initialSetup() override
Called to setup datastructures.
void computeDuDotDu()
Compute _du_dot_du.