20 params.
addClassDescription(
"Times between a start time and end time with a fixed time interval.");
22 "time_interval",
"time_interval > 0",
"Time interval between times");
24 "Start time. If not provided, the simulation start time is used.");
25 params.
addParam<
Real>(
"end_time",
"End time. If not provided, the simulation end time is used.");
27 "always_include_end_time",
29 "If true, includes the end time even if the last time interval would be partial");
32 params.
set<
bool>(
"auto_broadcast") =
false;
42 start_time = getParam<Real>(
"start_time");
46 start_time =
transient->getStartTime();
48 mooseError(
"If the parameter 'start_time' is not provided, the executioner type must be " 55 end_time = getParam<Real>(
"end_time");
59 end_time =
transient->endTime();
62 "If the parameter 'end_time' is not provided, the executioner type must be 'Transient'.");
66 mooseError(
"The end time must be greater than the start time.");
68 const auto time_interval = getParam<Real>(
"time_interval");
69 const bool always_include_end_time = getParam<bool>(
"always_include_end_time");
71 _times.push_back(start_time);
74 const auto proposed_new_time =
_times.back() + time_interval;
78 _times.push_back(end_time);
82 _times.push_back(proposed_new_time);
bool absoluteFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Function to check whether two variables are equal within an absolute tolerance.
Times objects are under the hood Reporters, but limited to a vector of Real.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
static InputParameters validParams()
MooseApp & _app
The MOOSE application this is associated with.
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
TimeIntervalTimes(const InputParameters ¶meters)
Times between a start time and end time with a fixed time interval.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
registerMooseObject("MooseApp", TimeIntervalTimes)
bool absoluteFuzzyLessEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Function to check whether a variable is less than or equal to another variable within an absolute tol...
static InputParameters validParams()
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::vector< Real > & _times
The vector holding the times.
bool absoluteFuzzyGreaterThan(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Function to check whether a variable is greater than another variable within an absolute tolerance...