20 #ifndef TIME_MARKS_HH_
21 #define TIME_MARKS_HH_
362 {
ASSERT(&
marks_ == &
it.marks_).error(
"Can not assign TimeMarks::iterator of different container.\n");
403 {
return it_ == other.
it_; }
406 {
return it_ != other.
it_; }
Basic time management functionality for unsteady (and steady) solvers (class Equation).
Class used for marking specified times at which some events occur.
bool operator<(const TimeMark &another) const
Type mark_type() const
Getter for mark type.
bool operator==(const TimeMark &other_mark) const
For unordered maps and sets, hashing.
void add_to_type(const TimeMark::Type &type)
bool match_mask(const TimeMark::Type &mask) const
double time_
The marked time.
static const Type every_type
Mark Type with all bits set.
Type mark_type_
The type of the TimeMark.
TimeMark(double time, Type type)
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).
const std::vector< TimeMark > & marks_
Reference to the vector of TimeMark objects.
TimeMarksIterator & operator=(const TimeMarksIterator &it)
TimeMark::Type mask_
Mask type.
const TimeMark & operator*() const
bool operator!=(const TimeMarksIterator &other) const
const TimeMark * operator->() const
-> dereference operator
bool operator==(const TimeMarksIterator &other) const
TimeMarksIterator(const std::vector< TimeMark > &marks, const std::vector< TimeMark >::const_iterator &it, const TimeMark::Type &mask)
TimeMark::Type mask()
Returns mask.
TimeMarksIterator & operator++()
Prefix increment. Skip non matching marks.
std::vector< TimeMark >::const_iterator it_
Iterator over the vector of TimeMark objects.
TimeMarksIterator & operator--()
Prefix decrement. Skip non matching marks.
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.
TimeMark::Type type_balance_output()
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.
TimeMark::Type type_output()
TimeMark::Type type_fixed_time()
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.
TimeMarksIterator iterator
Iterator class for iteration over time marks of particular type. This is always const_iterator.
TimeMark::Type new_mark_type()
friend std::ostream & operator<<(std::ostream &stream, const TimeMarks &marks)
Friend output operator.
TimeMark::Type type_input()
TimeMark add(const TimeMark &mark)
TimeMarks::iterator next(const TimeGovernor &tg, const TimeMark::Type &mask) const
Representation of one time step..
Global macros to enhance readability and debugging, general constants.
unsigned char equation_index_
Type(unsigned long int bitmap, unsigned char equation_index)
Type operator|(const Type &other) const
unsigned long int bitmap_
bool operator==(const Type &other) const
std::ostream & operator<<(std::ostream &stream, const TimeMark &marks)