21 "times",
"The Times object providing the list of times to turn on/off the objects.");
26 "Window / tolerance on the absolute difference between the time step and the simulation");
28 "act_on_time_stepping_across_a_time_point",
30 "Whether to still perform the control action (enable/disable) if a time step went over a " 31 "'time point' in the Times object without stopping near that exact time");
34 "Control for enabling/disabling objects when a certain time is reached.");
41 _times(getUserObject<
Times>(
"times")),
42 _time_window(getParam<
Real>(
"time_window")),
43 _act_on_time_stepping_across_time_point(
44 getParam<bool>(
"act_on_time_stepping_across_a_time_point")),
45 _prev_time_point_current(
std::numeric_limits<
Real>::
max()),
46 _prev_time_point(declareRestartableData<
Real>(
"prev_time",
std::numeric_limits<
Real>::
max())),
47 _t_current(_fe_problem.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.
static InputParameters validParams()
Real getNextTime(const Real current_time, const bool error_if_no_next) const
Find the next time in the times vector for a given time If current_time is also in the times vector w...
const bool _act_on_time_stepping_across_time_point
Whether to consider that going past a time point should trigger the control.
Times objects are under the hood Reporters, but limited to a vector of Real.
auto max(const L &left, const R &right)
const Real _time_window
The tolerance on hitting time points with the current simulation time.
Control for enabling/disabling objects when near or past times from a Times object.
static InputParameters validParams()
Real getPreviousTime(const Real current_time) const
Find the previous time in the times vector for a given time If current_time is also in the times vect...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Times & _times
The time object providing the times.
Real _prev_time_point_current
To keep track of the current threshold to hit.
Real getTimeAtIndex(unsigned int index) const
Getter for a single time at a known index.
Real _t_current
To keep track of the current time step.
Base class for controls that enable/disable object(s) based on some condition.
TimesEnableControl(const InputParameters ¶meters)
virtual bool conditionMet(const unsigned int &i) override
Condition that must be true for an entry of the "enable" list to be enabled and/or an entry of the "d...
Real _prev_time_point
To keep track of the next threshold to hit.
registerMooseObject("MooseApp", TimesEnableControl)