Flow123d  DF_patch_fe_data_tables-3227f73
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  */
39  void read_from_input(Input::Array in_array, const TimeGovernor &tg);
40  void read_from_input(Input::Array in_array, const TimeGovernor &tg, TimeMark::Type mark_type);
41  /**
42  *
43  */
44  bool contains(TimeMark mark) const;
45 
46  void add(double begin, TimeMark::Type mark_type);
47  void add(double begin, double step, double end, TimeMark::Type mark_type);
48 
49 
50 
51 private:
52  std::set<double> times_;
53 };
54 
55 
56 
57 
58 
59 #endif /* SRC_IO_OUTPUT_TIME_SET_HH_ */
Accessor to input data conforming to declared Array.
Definition: accessors.hh:566
Class for declaration of inputs sequences.
Definition: type_base.hh:339
static const Input::Type::Array get_input_type()
void read_from_input(Input::Array in_array, const TimeGovernor &tg)
std::set< double > times_
void add(double begin, TimeMark::Type mark_type)
bool contains(TimeMark mark) const
Basic time management functionality for unsteady (and steady) solvers (class Equation).
Class used for marking specified times at which some events occur.
Definition: time_marks.hh:45
Abstract linear system class.
Definition: balance.hh:40