20 #ifndef TIME_MARKS_HH_ 21 #define TIME_MARKS_HH_ 23 #include <boost/exception/detail/error_info_impl.hpp> 24 #include <boost/exception/info.hpp> 235 {
return type_fixed_time_;}
240 {
return type_output_;}
245 {
return type_input_;}
250 {
return type_balance_output_;}
359 : marks_(marks), it_(it), mask_(mask) {}
362 {
OLD_ASSERT(&marks_ == &it.
marks_,
"Can not assign TimeMarks::iterator of different container.\n");
371 while ( it_ != marks_.end() ) {
373 if (it_->match_mask(mask_))
break;
381 while ( it_ != marks_.begin() ) {
383 if (it_->match_mask(mask_))
break;
391 OLD_ASSERT(it_!= marks_.end(),
"Out of marks vector.\n");
398 OLD_ASSERT(it_!= marks_.end(),
"Out of marks vector.\n");
403 {
return it_ == other.
it_; }
406 {
return it_ != other.
it_; }
TimeMark::Type type_fixed_time()
Type mark_type() const
Getter for mark type.
bool operator<(const TimeMark &another) const
Iterator over TimeMark objects in TimeMarks object (database of TimeMark objects).
TimeMarksIterator & operator=(const TimeMarksIterator &it)
Type mark_type_
The type of the TimeMark.
TimeMark::Type type_output()
TimeMark(double time, Type type)
TimeMark::Type type_balance_output_
Predefined type for balance output.
arma::Mat< Type >::template fixed< resRows, resCols > operator*(const Mat< Type, resRows, commonDimension > &a, const Mat< Type, commonDimension, resCols > &b)
#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.
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.
static const Type every_type
Mark Type with all bits set.
TimeMarksIterator & operator--()
Prefix decrement. Skip non matching marks.
TimeMark::Type mask_
Mask type.
TimeMark::Type type_balance_output()
double time_
The marked time.
Global macros to enhance readability and debugging, general constants.
TimeMarksIterator & operator++()
Prefix increment. Skip non matching marks.
Type(unsigned long int bitmap, unsigned char equation_index)
TimeMarksIterator iterator
Iterator class for iteration over time marks of particular type. This is always const_iterator.
This class is a collection of time marks to manage various events occurring during simulation time...
std::ostream & operator<<(std::ostream &stream, const TimeMark &marks)
bool operator==(const Type &other) const
TimeMark::Type next_mark_type_
MarkType that will be used at next new_time_mark() call.
unsigned char equation_index_
bool match_mask(const TimeMark::Type &mask) const
TimeMark::Type mask()
Returns mask.
TimeMark::Type type_input()
TimeMarksIterator(const std::vector< TimeMark > &marks, const std::vector< TimeMark >::const_iterator &it, const TimeMark::Type &mask)
void add_to_type(const TimeMark::Type &type)
double time() const
Getter for the time of the TimeMark.
std::vector< TimeMark >::const_iterator it_
Iterator over the vector of TimeMark objects.
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_
const std::vector< TimeMark > & marks_
Reference to the vector of TimeMark objects.
Representation of one time step..
TimeMark::Type type_output_
Predefined type for output.
bool operator==(const TimeMark &other_mark) const
For unordered maps and sets, hashing.
Type operator|(const Type &other) const