23 "function",
"The name of the time-dependent function that prescribes the time step size.");
24 params.
addParam<std::vector<Real>>(
"time_t", {},
"The values of t");
25 params.
addParam<std::vector<Real>>(
"time_dt", {},
"The values of dt");
28 "Maximum ratio of new to previous timestep sizes.");
29 params.
addParam<
Real>(
"min_dt", 0,
"The minimal dt to take.");
33 "Whether or not to interpolate DT between times. " 34 "This is true by default for historical reasons.");
36 "Timestepper whose steps vary over time according to a user-defined function");
44 _time_t(getParam<
std::vector<
Real>>(
"time_t")),
45 _time_dt(getParam<
std::vector<
Real>>(
"time_dt")),
47 _growth_factor(getParam<
Real>(
"growth_factor")),
48 _min_dt(getParam<
Real>(
"min_dt")),
49 _interpolate(getParam<bool>(
"interpolate"))
54 ": Using `time_t` and `time_dt` parameter is deprecated. Switch your input " 55 "file to using `function` parameter.\n",
56 " 1. Build a new function. If `interpolate` parameter is true use type = " 57 "PiecewiseLinear. If it was false, use PiecewiseConstant.\n",
58 " 2. Copy `time_t` parameter into your function and rename it to `x`.\n",
59 " 3. Copy `time_dt` parameter into your function and rename it to `y`.\n",
60 " 4. Use the `function` parameter in your time stepper and pass your new " 61 "function name into it.\n");
64 ": Using `time_t`, `_time_dt` and `function` at the same time. Use only `function`, " 65 "`time_t` and _time_dt is deprecated.");
68 ": Please, specify a function (using the `function` parameter) that will prescribe " 69 "the time step size.");
77 catch (std::domain_error & e)
94 for (
unsigned int i = 0; i < n_knots; i++)
142 for (; i <
_time_t.size() - 1; i++)
registerMooseObject("MooseApp", FunctionDT)
static InputParameters validParams()
Function base which provides a piecewise approximation to a specified (x,y) point data set...
std::unique_ptr< LinearInterpolation > _time_ipol
Piecewise linear definition of time stepping.
bool _use_function
true, if we are using _function, false if we are using _time_ipol
const Point & _point_zero
Zero point.
std::vector< Real > _time_knots
const std::string & _name
The name of this class, reference to value stored in InputParameters.
void mooseDeprecated(Args &&... args) const
const Function & getFunction(const std::string &name) const
Get a function with a given name.
Base class for time stepping.
const std::vector< Real > & _time_t
bool _interpolate
Whether or not to interpolate DT between times.
virtual void postStep() override
virtual Real domain(const int i) const
bool relativeFuzzyGreaterEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Function to check whether a variable is greater than or equal to another variable within a relative t...
virtual const std::string & name() const
Get the name of the class.
auto max(const L &left, const R &right)
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
virtual void init() override
Initialize the time stepper.
static InputParameters validParams()
const Function * _function
The time-dependent function specifying the time step size (turn this into a reference then time_t and...
virtual Real functionSize() const
virtual Real computeDT() override
Called to compute _current_dt for a normal step.
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.
virtual Real computeInitialDT() override
Called to compute _current_dt for the first timestep.
virtual Real value(Real t, const Point &p) const
Override this to evaluate the scalar function at point (t,x,y,z), by default this returns zero...
bool relativeFuzzyLessThan(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Function to check whether a variable is less than another variable within a relative tolerance...
FunctionDT(const InputParameters ¶meters)
Interface for objects that need to use functions.
const std::vector< Real > & _time_dt
Real & _time
Values from executioner.