Flow123d  JS_before_hm-1880-gdd969e4e2
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_ */
Input
Abstract linear system class.
Definition: balance.hh:40
OutputTimeSet::add
void add(double begin, TimeMark::Type mark_type)
Definition: output_time_set.cc:77
OutputTimeSet::contains
bool contains(TimeMark mark) const
Definition: output_time_set.cc:72
type_base.hh
TimeMark
Class used for marking specified times at which some events occur.
Definition: time_marks.hh:45
TimeGovernor
Basic time management functionality for unsteady (and steady) solvers (class Equation).
Definition: time_governor.hh:310
TimeMark::Type
Definition: time_marks.hh:60
OutputTimeSet::read_from_input
void read_from_input(Input::Array in_array, const TimeGovernor &tg)
Definition: output_time_set.cc:35
OutputTimeSet::get_input_type
static const Input::Type::Array get_input_type()
Definition: output_time_set.cc:17
Input::Type::Array
Class for declaration of inputs sequences.
Definition: type_base.hh:339
Input::Array
Accessor to input data conforming to declared Array.
Definition: accessors.hh:566
time_marks.hh
OutputTimeSet::times_
std::set< double > times_
Definition: output_time_set.hh:52
OutputTimeSet
Definition: output_time_set.hh:28