108 ASSERT_GT(dt, numeric_limits<double>::epsilon()).error(
"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;
#define ASSERT_GT(a, b)
Definition of comparative assert macro (Greater Than) only for debug mode.
Basic time management functionality for unsteady (and steady) solvers (class Equation).
static const double time_step_precision
TimeMark::Type equation_mark_type() const
const TimeStep & step(int index=-1) const
static const double inf_time
Infinity time used for steady case.
Class used for marking specified times at which some events occur.
Type mark_type() const
Getter for mark type.
static const Type every_type
Mark Type with all bits set.
Type mark_type_
The type of the TimeMark.
double time() const
Getter for the time of the TimeMark.
static const Type none_type
Mark Type with all bits unset.
Iterator over TimeMark objects in TimeMarks object (database of TimeMark objects).
This class is a collection of time marks to manage various events occurring during simulation time.
TimeMarks::iterator begin(TimeMark::Type mask) const
Iterator for the begin mimics container-like of TimeMarks.
TimeMark::Type next_mark_type_
MarkType that will be used at next new_time_mark() call.
TimeMark::Type type_balance_output_
Predefined type for balance output.
std::vector< std::vector< TimeMark > > marks_
TimeMarks list sorted according to the their time.
TimeMark::Type type_output_
Predefined type for output.
TimeMark::Type type_fixed_time_
Predefined type for fixed time.
TimeMarks::iterator last(const TimeStep &time_step, const TimeMark::Type &mask) const
void add_time_marks(double time, double dt, double end_time, TimeMark::Type type)
TimeMarks::iterator end(TimeMark::Type mask) const
Iterator for the end mimics container-like of TimeMarks.
void add_to_type_all(TimeMark::Type filter_type, TimeMark::Type add_type)
TimeMarks::iterator current(const TimeStep &time_step, const TimeMark::Type &mask) const
TimeMark::Type type_input_
Predefined type for change of boundary condition.
TimeMark::Type new_mark_type()
TimeMark add(const TimeMark &mark)
TimeMarks::iterator next(const TimeGovernor &tg, const TimeMark::Type &mask) const
Representation of one time step..
bool ge(double other_time) const
bool lt(double other_time) const
bool contains(double other_time) const
Global macros to enhance readability and debugging, general constants.
IntFormatSpec< int, TypeSpec< 'x'> > hex(int value)
unsigned char equation_index_
unsigned long int bitmap_
Basic time management class.
ostream & operator<<(ostream &stream, const TimeMark &mark)