PFASST++
mlsdc.hpp
Go to the documentation of this file.
1 
5 #ifndef _PFASST__CONTROLLER__MLSDC_HPP_
6 #define _PFASST__CONTROLLER__MLSDC_HPP_
7 
8 #include <vector>
9 using namespace std;
10 
12 
13 
14 namespace pfasst
15 {
23  template<typename time = pfasst::time_precision>
24  class MLSDC
25  : public Controller<time>
26  {
27  protected:
28  vector<size_t> nsweeps;
29 
31 
32  bool predict;
33  bool initial;
34  bool converged;
35 
42  void perform_sweeps(size_t level);
43 
44  public:
46  virtual void setup() override;
47 
55  virtual void set_nsweeps(vector<size_t> nsweeps);
56 
62  virtual void run();
63 
64  private:
72  LevelIter cycle_down(LevelIter level_iter);
73 
80  LevelIter cycle_up(LevelIter level_iter);
81 
90  LevelIter cycle_bottom(LevelIter level_iter);
91 
100  LevelIter cycle_v(LevelIter level_iter);
101  };
102 } // ::pfasst
103 
105 
106 #endif // _PFASST__CONTROLLER__MLSDC_HPP_
vector< size_t > nsweeps
How many sweeps should be done on the different levels.
Definition: mlsdc.hpp:28
void setup(shared_ptr< WrapperInterface< scalar, time >> wrapper)
Base SDC/MLSDC/PFASST controller.
Definition: interface.hpp:31
STL namespace.
pfasst::Controller< time >::LevelIter LevelIter
Definition: mlsdc.hpp:30
bool predict
Whether to use a predict sweep.
Definition: mlsdc.hpp:32
Level (MLSDC/PFASST) iterator.
Definition: interface.hpp:306
bool converged
Whether we've converged.
Definition: mlsdc.hpp:34
bool initial
Whether we're sweeping from a new initial condition.
Definition: mlsdc.hpp:33
Multilevel SDC controller.
Definition: mlsdc.hpp:24