33 #ifndef TIME_MARKS_HH_
34 #define TIME_MARKS_HH_
64 typedef unsigned long int Type;
89 inline double time()
const {
305 {
ASSERT(&
marks_ == &it.
marks_,
"Can not assign TimeMarks::iterator of different container.\n");
346 {
return it_ == other.
it_; }
349 {
return it_ != other.
it_; }
void add_time_marks(double time, double dt, double end_time, TimeMark::Type type)
TimeMark::Type type_fixed_time()
Type mark_type() const
Getter for mark type.
bool operator<(const TimeMark &another) const
TimeMarks::iterator next(const TimeGovernor &tg, const TimeMark::Type &mask) const
Iterator over TimeMark objects in TimeMarks object (database of TimeMark objects).
TimeMarks::iterator begin(TimeMark::Type mask=TimeMark::every_type) const
Iterator for the begin mimics container-like of TimeMarks.
TimeMarksIterator & operator=(const TimeMarksIterator &it)
Type mark_type_
The type of the TimeMark.
bool operator==(const TimeMarksIterator &other) const
TimeMark::Type type_output()
TimeMark(double time, Type type)
TimeMark::Type type_input_
Predefined type for change of boundary condition.
Basic time management functionality for unsteady (and steady) solvers (class Equation).
static const Type none_type
Mark Type with all bits unset.
bool operator!=(const TimeMarksIterator &other) const
static const Type every_type
Mark Type with all bits set.
TimeMarksIterator & operator--()
Prefix decrement. Skip non matching marks.
TimeMark::Type mask_
Mask type.
double time_
The marked time.
void add(const TimeMark &mark)
Global macros to enhance readability and debugging, general constants.
TimeMarksIterator & operator++()
Prefix increment. Skip non matching marks.
bool is_current(const TimeGovernor &tg, const TimeMark::Type &mask) const
std::vector< TimeMark > marks_
TimeMarks list sorted according to the their time.
friend std::ostream & operator<<(std::ostream &stream, const TimeMarks &marks)
Friend output operator.
TimeMarksIterator iterator
Iterator class for iteration over time marks of particular type. This is always const_iterator.
TimeMark::Type new_mark_type()
This class is a collection of time marks to manage various events occurring during simulation time...
STREAM & operator<<(STREAM &s, UpdateFlags u)
TimeMark::Type next_mark_type_
MarkType that will be used at next new_time_mark() call.
bool match_mask(const TimeMark::Type &mask) const
TimeMark::Type mask()
Returns mask.
TimeMark::Type type_input()
TimeMarksIterator(const std::vector< TimeMark > &marks, const std::vector< TimeMark >::const_iterator &it, const TimeMark::Type &mask)
void add_to_type(const TimeMark::Type &type)
double time() const
Getter for the time of the TimeMark.
const TimeMark * operator->() const
-> dereference operator
std::vector< TimeMark >::const_iterator it_
Iterator over the vector of TimeMark objects.
Class used for marking specified times at which some events occur.
const TimeMark & operator*() const
TimeMarks::iterator end(TimeMark::Type mask=TimeMark::every_type) const
Iterator for the end mimics container-like of TimeMarks.
TimeMark::Type type_fixed_time_
Predefined type for fixed time.
const std::vector< TimeMark > & marks_
Reference to the vector of TimeMark objects.
TimeMark::Type type_output_
Predefined type for output.
TimeMarks::iterator last(const TimeGovernor &tg, const TimeMark::Type &mask) const