Flow123d  release_2.2.0-41-g0958a8d
output_time_set.hh
Go to the documentation of this file.
1 /*
2  * output_time_set.hh
3  *
4  * Created on: Jul 11, 2016
5  * Author: jb
6  */
7 
8 #ifndef SRC_IO_OUTPUT_TIME_SET_HH_
9 #define SRC_IO_OUTPUT_TIME_SET_HH_
10 
11 
12 //#include "boost/unordered_set.hpp"
13 #include "tools/time_marks.hh"
14 #include <set>
15 
16 class TimeGovernor;
17 
18 
19 /**
20  * Set of times. Simple extension of std::set<double> providing
21  * initialization by an array of time grids.
22  * TODO: replace by std::set with non-member read and initialize functions.
23  *
24  * Finally we store just doubles, since it is like a set of the time marks with same type.
25  * So we need not to save the type.
26  */
28 public:
29 
30  /**
31  *
32  */
33  static const Input::Type::Array get_input_type();
34  /**
35  *
36  */
37  void read_from_input(Input::Array in_array, const TimeGovernor &tg);
38  void read_from_input(Input::Array in_array, const TimeGovernor &tg, TimeMark::Type mark_type);
39  /**
40  *
41  */
42  bool contains(TimeMark mark) const;
43 
44  void add(double begin, TimeMark::Type mark_type);
45  void add(double begin, double step, double end, TimeMark::Type mark_type);
46 
47 
48 
49 private:
50  std::set<double> times_;
51 };
52 
53 
54 
55 
56 
57 #endif /* SRC_IO_OUTPUT_TIME_SET_HH_ */
Accessor to input data conforming to declared Array.
Definition: accessors.hh:567
void read_from_input(Input::Array in_array, const TimeGovernor &tg)
bool contains(TimeMark mark) const
Basic time management functionality for unsteady (and steady) solvers (class Equation).
Class for declaration of inputs sequences.
Definition: type_base.hh:345
std::set< double > times_
static const Input::Type::Array get_input_type()
Class used for marking specified times at which some events occur.
Definition: time_marks.hh:36
void add(double begin, TimeMark::Type mark_type)