25 params.
addParam<std::vector<Real>>(
"start_time",
26 "The time at which the objects are to be enabled/disabled.");
27 params.
addParam<std::vector<Real>>(
"end_time",
28 "The time at which the objects are to be enable/disabled.");
30 "set_sync_times",
false,
"Set the start and end time as execute sync times.");
39 _start_time = getParam<std::vector<Real>>(
"start_time");
45 _end_time = getParam<std::vector<Real>>(
"end_time");
56 if (getParam<bool>(
"set_sync_times"))
67 return MooseUtils::absoluteFuzzyGreaterEqual(
_t,
_start_time[i]) &&
68 MooseUtils::absoluteFuzzyLessThan(
_t,
_end_time[i]);
registerMooseObject("MooseApp", TimePeriod)
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
MooseApp & _app
The MOOSE application this is associated with.
std::set< Real > & getSyncTimes()
Return the sync times for all objects.
Base class for basic control for disabling objects for a portion of the simulation.
std::vector< Real > _end_time
The time to stop enabling the supplied object tags (defaults to the end of the simulation)
std::vector< Real > _start_time
The time to begin enabling the supplied object tags (defaults to the simulation start time)
static InputParameters validParams()
Class constructor.
void setupTimes()
Helper base method to set start and end times for controls.
A basic control for disabling objects for a portion of the simulation.
void initialSetup() override
If enabled, this injects the start/end times into the TimeStepper sync times.
TimePeriod(const InputParameters ¶meters)
static InputParameters validParams()
Class constructor.
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...