33 #ifndef TIME_MARKS_HH_
34 #define TIME_MARKS_HH_
59 typedef unsigned long int Type;
84 inline double time()
const {
294 {
ASSERT(&
marks_ == &it.
marks_,
"Can not assign TimeMarks::iterator of different container.\n");
335 {
return it_ == other.
it_; }
338 {
return it_ != other.
it_; }
348 vector<TimeMark>::const_iterator
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)
TimeMarksIterator(const vector< TimeMark > &marks, const vector< TimeMark >::const_iterator &it, const TimeMark::Type &mask)
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
Mask that matches no type of TimeMark.
bool operator!=(const TimeMarksIterator &other) const
static const Type every_type
Mask that matches every type of TimeMark.
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
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...
TimeMark::Type next_mark_type_
MarkType that will be used at next new_time_mark() call.
vector< TimeMark >::const_iterator it_
Iterator over the vector of TimeMark objects.
bool match_mask(const TimeMark::Type &mask) const
TimeMark::Type mask()
Returns mask.
const vector< TimeMark > & marks_
Reference to the vector of TimeMark objects.
vector< TimeMark > marks_
TimeMarks list sorted according to the their time.
TimeMark::Type type_input()
void add_to_type(const TimeMark::Type &type)
double time() const
Getter for the time of the TimeMark.
const TimeMark * operator->() const
-> dereference operator
ostream & operator<<(ostream &stream, const TimeMark &marks)
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.
friend ostream & operator<<(ostream &stream, const TimeMarks &marks)
Friend output operator.
TimeMark::Type type_output_
Predefined type for output.
TimeMarks::iterator last(const TimeGovernor &tg, const TimeMark::Type &mask) const