OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
StepSizeConfig.h
Go to the documentation of this file.
1 #ifndef STEPSIZECONFIG_H
2 #define STEPSIZECONFIG_H
3 
4 #include "Utility/Inform.h"
5 
6 #include <list>
7 #include <tuple>
8 
10 public:
12 
13  StepSizeConfig(const StepSizeConfig &right);
14 
15  void operator=(const StepSizeConfig &) = delete;
16 
17  void push_back(double dt,
18  double zstop,
19  unsigned long numSteps);
20 
21  void sortAscendingZStop();
22 
23  void resetIterator();
24 
25  bool reachedStart() const;
26 
27  bool reachedEnd() const;
28 
29  void clear();
30 
31  void reverseDirection();
32 
33  StepSizeConfig& advanceToPos(double spos);
34 
36 
38 
39  void shiftZStopRight(double front);
40  void shiftZStopLeft(double back);
41 
42  double getdT() const;
43 
44  double getZStop() const;
45 
46  unsigned long getNumSteps() const;
47 
48  unsigned long long getMaxSteps() const;
49 
50  unsigned long long getNumStepsFinestResolution() const;
51 
52  double getMinTimeStep() const;
53 
54  double getFinalZStop() const;
55 
56  void print(Inform &out) const;
57 
58 private:
59  typedef std::tuple<double, double, unsigned long> entry_t;
60  typedef std::list<entry_t> container_t;
61 
64 };
65 
66 inline
68  configurations_m(),
69  it_m(configurations_m.begin())
70 { }
71 
72 inline
74  configurations_m(right.configurations_m),
75  it_m(configurations_m.begin())
76 { }
77 
78 inline
80  double zstop,
81  unsigned long numSteps) {
82  configurations_m.push_back(std::make_tuple(dt, zstop, numSteps));
83 }
84 
85 inline
87  it_m = configurations_m.begin();
88 }
89 
90 inline
92  return (it_m == configurations_m.begin());
93 }
94 
95 inline
97  return (it_m == configurations_m.end());
98 }
99 
100 inline
102  configurations_m.clear();
103  it_m = configurations_m.begin();
104 }
105 
106 #endif
double getMinTimeStep() const
bool reachedEnd() const
std::list< entry_t > container_t
void operator=(const StepSizeConfig &)=delete
void sortAscendingZStop()
unsigned long long getNumStepsFinestResolution() const
bool reachedStart() const
unsigned long long getMaxSteps() const
double getFinalZStop() const
StepSizeConfig & operator--()
std::tuple< double, double, unsigned long > entry_t
double getdT() const
void shiftZStopRight(double front)
void shiftZStopLeft(double back)
void push_back(double dt, double zstop, unsigned long numSteps)
void print(Inform &out) const
double getZStop() const
void resetIterator()
unsigned long getNumSteps() const
std::string::iterator iterator
Definition: MSLang.h:16
StepSizeConfig & advanceToPos(double spos)
Definition: Inform.h:41
StepSizeConfig & operator++()
container_t configurations_m
container_t::iterator it_m