108 OLD_ASSERT(dt > numeric_limits<double>::epsilon(),
"TimeMark's step less then machine precision.\n");
111 for (
unsigned int i = 0; i<=n_steps;i++) {
112 auto mark =
TimeMark(time+i*dt, type);
124 if (mark.match_mask(filter_type)) mark.add_to_type(add_type);
144 auto it =
last(time_step, mask);
146 else return this->
end(mask);
158 while ( ! tg.
step().
lt(first_ge->time()) || ! first_ge->match_mask(mask) ) {
160 if (first_ge ==
marks_[eq_index].
end()) { --first_ge;
break; }
171 while ( ! time_step.
ge(first_ge->time()) || ! first_ge->match_mask(mask) ) {
222 stream <<
"==============================" << endl;
223 stream <<
"time marks:" << endl;
224 for(
unsigned int i=0; i<marks.
marks_.size(); ++i) {
225 stream <<
"------------------------------" << endl;
226 stream <<
"equation_index: " << i << endl;
228 stream << *
it << endl;
230 stream <<
"==============================" << 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).
bool lt(double other_time) const
IntFormatSpec< int, TypeSpec<'x'> > hex(int value)
Type mark_type_
The type of the TimeMark.
bool contains(double other_time) const
TimeMarks::iterator begin(TimeMark::Type mask) const
Iterator for the begin mimics container-like of TimeMarks.
ostream & operator<<(ostream &stream, const TimeMark &mark)
TimeMark::Type type_balance_output_
Predefined type for balance output.
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library...
TimeMark::Type type_input_
Predefined type for change of boundary condition.
const TimeStep & step(int index=-1) const
Basic time management functionality for unsteady (and steady) solvers (class Equation).
static const Type none_type
Mark Type with all bits unset.
std::vector< std::vector< TimeMark > > marks_
TimeMarks list sorted according to the their time.
Basic time management class.
TimeMarks::iterator last(const TimeStep &time_step, const TimeMark::Type &mask) const
static const Type every_type
Mark Type with all bits set.
Global macros to enhance readability and debugging, general constants.
bool ge(double other_time) const
static const double time_step_precision
TimeMark::Type equation_mark_type() const
friend std::ostream & operator<<(std::ostream &stream, const TimeMarks &marks)
Friend output operator.
TimeMark::Type new_mark_type()
This class is a collection of time marks to manage various events occurring during simulation time...
TimeMark add(const TimeMark &mark)
TimeMark::Type next_mark_type_
MarkType that will be used at next new_time_mark() call.
unsigned char equation_index_
void add_to_type_all(TimeMark::Type filter_type, TimeMark::Type add_type)
double time() const
Getter for the time of the TimeMark.
TimeMarks::iterator end(TimeMark::Type mask) const
Iterator for the end mimics container-like of TimeMarks.
TimeMarks::iterator current(const TimeStep &time_step, const TimeMark::Type &mask) const
Class used for marking specified times at which some events occur.
TimeMark::Type type_fixed_time_
Predefined type for fixed time.
unsigned long int bitmap_
static const double inf_time
Infinity time used for steady case.
Representation of one time step..
TimeMark::Type type_output_
Predefined type for output.