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();
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("MooseApp", CentralDifference)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Implements a truly explicit (no nonlinear solve) first-order, forward Euler time integration scheme.
static InputParameters validParams()
Implements a truly explicit (no nonlinear solve) Central Difference time integration scheme.
CentralDifference(const InputParameters ¶meters)
virtual void initialSetup() override
Called to setup datastructures.
virtual void computeTimeDerivatives() override
Computes the time derivative and the Jacobian of the time derivative.
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 InputParameters validParams()
Real & _du_dotdot_du
solution vector for
virtual Real duDotDuCoeff() const override
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 NumericVector< Number > & _solution_older
The older solution.
virtual void initialSetup() override
Called to setup datastructures.
MooseEnum _solve_type
Solve type for how mass matrix is handled.
virtual void setUDotOldRequested(const bool u_dot_old_requested)
Set boolean flag to true to store old solution time derivative.
virtual void setUDotDotRequested(const bool u_dotdot_requested)
Set boolean flag to true to store solution second time derivative.
virtual void setUDotDotOldRequested(const bool u_dotdot_old_requested)
Set boolean flag to true to store old solution second time derivative.
NonlinearSystemBase * _nl
Pointer to the nonlinear system, can happen that we dont have any.
const TagID _u_dotdot_factor_tag
The vector tag for the nodal multiplication factor for the residual calculation of the udotdot term.
const TagID _u_dot_factor_tag
The vector tag for the nodal multiplication factor for the residual calculation of the udot term.
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
virtual NumericVector< Number > * solutionUDot()
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
NumericVector< Number > & solutionOld()
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
NumericVector< Number > & solutionOlder()
NumericVector< Number > & addVector(const std::string &vector_name, const bool project, const libMesh::ParallelType type)
Adds a solution length vector to the system.
virtual NumericVector< Number > * solutionUDotDot()
void computeDuDotDu()
Compute _du_dot_du.
const NumericVector< Number > *const & _solution
FEProblemBase & _fe_problem
Reference to the problem.
SystemBase & _sys
Reference to the system this time integrator operates on.
Real & _dt
The current time step size.
bool _is_lumped
Boolean flag that is set to true if lumped mass matrix is used.
const NumericVector< Number > & _solution_old
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