23 virtual ~Times() =
default;
26 const std::vector<Real> &
getTimes()
const;
50 Real getNextTime(
const Real current_time,
const bool error_if_no_next)
const;
virtual void timestepSetup() override
By default, Times will not be modified very regularly.
const bool _need_unique
Whether duplicate times should be removed.
virtual Real & time() const
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...
Reporter object that has a single execution of the "execute" method for for each execute flag...
const std::vector< Real > & getTimes() const
Getter for the full times vector.
virtual void execute() override
By default, we wont execute often but "executing" will mean loading the times.
virtual void initialize() override=0
In charge of computing / loading the times, unless all that could be done there is done in the constr...
Times(const InputParameters ¶meters)
const bool _need_broadcast
Whether generation of times is distributed or not (and therefore needs a broadcast) ...
Times objects are under the hood Reporters, but limited to a vector of Real.
const std::set< Real > getUniqueTimes() const
Getter for a set of the full times.
void clearTimes()
Clear the times vector.
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...
virtual void residualSetup() override
Gets called just before the residual is computed and before this object is asked to do its job...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.
Real getTimeAtIndex(unsigned int index) const
Getter for a single time at a known index.
const Real _unique_tol
Absolute tolerance for performing duplication checks to make the times vector unique.
const InputParameters & parameters() const
Get the parameters of the object.
virtual void finalize() override
In charge of reduction across all ranks.
Real getCurrentTime() const
Get the current time.
virtual void jacobianSetup() override
Gets called just before the Jacobian is computed and before this object is asked to do its job...
std::vector< Real > & _times
The vector holding the times.
const bool _need_sort
Whether times should be sorted, because they come from different sources for example.