Flow123d  release_3.0.0-1182-ga9abfa7
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 <set> // for set
13 #include "input/type_base.hh" // for Array
14 #include "tools/time_marks.hh" // for TimeMark
15 
16 class TimeGovernor;
17 namespace Input { class Array; }
18 
19 
20 /**
21  * Set of times. Simple extension of std::set<double> providing
22  * initialization by an array of time grids.
23  * TODO: replace by std::set with non-member read and initialize functions.
24  *
25  * Finally we store just doubles, since it is like a set of the time marks with same type.
26  * So we need not to save the type.
27  */
29 public:
30 
31  /**
32  *
33  */
34  static const Input::Type::Array get_input_type();
35  /**
36  *
37  */
38  void read_from_input(Input::Array in_array, const TimeGovernor &tg);
39  void read_from_input(Input::Array in_array, const TimeGovernor &tg, TimeMark::Type mark_type);
40  /**
41  *
42  */
43  bool contains(TimeMark mark) const;
44 
45  void add(double begin, TimeMark::Type mark_type);
46  void add(double begin, double step, double end, TimeMark::Type mark_type);
47 
48 
49 
50 private:
51  std::set<double> times_;
52 };
53 
54 
55 
56 
57 
58 #endif /* SRC_IO_OUTPUT_TIME_SET_HH_ */
Accessor to input data conforming to declared Array.
Definition: accessors.hh:567
Abstract linear system class.
Definition: balance.hh:37
Basic time management functionality for unsteady (and steady) solvers (class Equation).
Class for declaration of inputs sequences.
Definition: type_base.hh:346
std::set< double > times_
Class used for marking specified times at which some events occur.
Definition: time_marks.hh:45