44 return ( stream << mark.
time()<<
": 0x" << hex << mark.
mark_type() << dec );
56 : next_mark_type_(0x1)
88 if (first_ge !=
marks_.begin()) {
97 marks_.insert(first_ge, mark);
103 for (
double t = time; t <= end_time*1.001; t += dt) {
119 while ( ! tg.
lt(first_ge->time()) || ! first_ge->match_mask(mask) ) {
128 while ( ! tg.
ge(first_ge->time()) || ! first_ge->match_mask(mask) ) {
162 stream <<
"time marks:" << endl;
164 stream << *it << endl;
void add_time_marks(double time, double dt, double end_time, TimeMark::Type type)
Type mark_type() const
Getter for mark type.
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.
bool is_end() const
Returns true if the actual time is greater than or equal to the end time.
ostream & operator<<(ostream &stream, const TimeMark &mark)
bool ge(double other_time) const
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.
Basic time management class.
static const Type every_type
Mask that matches every type of TimeMark.
void add(const TimeMark &mark)
bool is_current(const TimeGovernor &tg, const TimeMark::Type &mask) const
bool lt(double other_time) const
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 > marks_
TimeMarks list sorted according to the their time.
double time() const
Getter for the time of the TimeMark.
Class used for marking specified times at which some events occur.
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.
static const double inf_time
Infinity time used for steady case.
TimeMark::Type type_output_
Predefined type for output.
TimeMarks::iterator last(const TimeGovernor &tg, const TimeMark::Type &mask) const