PFASST++
imex_sweeper.hpp
Go to the documentation of this file.
1 #ifndef _PFASST_ENCAP_IMEX_SWEEPER_HPP_
2 #define _PFASST_ENCAP_IMEX_SWEEPER_HPP_
3 
4 #include <memory>
5 #include <vector>
6 
9 
10 using namespace std;
11 
12 namespace pfasst
13 {
14  namespace encap
15  {
17 
33  template<typename time = time_precision>
35  : public pfasst::encap::EncapSweeper<time>
36  {
37  protected:
38 
40 
43  vector<shared_ptr<Encapsulation<time>>> s_integrals;
44 
49  vector<shared_ptr<Encapsulation<time>>> fs_expl;
50  shared_ptr<Encapsulation<time>> fs_expl_start;
51 
56  vector<shared_ptr<Encapsulation<time>>> fs_impl;
58 
62  virtual void integrate_end_state(time dt);
63 
64  public:
66  IMEXSweeper() = default;
67  virtual ~IMEXSweeper() = default;
69 
71 
74  virtual void setup(bool coarse) override;
75 
84  virtual void predict(bool initial) override;
85 
92  virtual void sweep() override;
93 
97  virtual void advance() override;
98 
102  virtual void reevaluate(bool initial_only) override;
103 
110  virtual void integrate(time dt, vector<shared_ptr<Encapsulation<time>>> dst) const override;
111 
118  virtual void residual(time dt, vector<shared_ptr<Encapsulation<time>>> dst) const override;
120 
122 
132  virtual void f_expl_eval(shared_ptr<Encapsulation<time>> f_expl_encap,
133  shared_ptr<Encapsulation<time>> u_encap,
134  time t);
135 
149  virtual void f_impl_eval(shared_ptr<Encapsulation<time>> f_impl_encap,
150  shared_ptr<Encapsulation<time>> u_encap,
151  time t);
152 
169  virtual void impl_solve(shared_ptr<Encapsulation<time>> f_encap,
170  shared_ptr<Encapsulation<time>> u_encap,
171  time t, time dt,
172  shared_ptr<Encapsulation<time>> rhs_encap);
174 
175  private:
176  virtual void predict_with_left(bool initial);
177  virtual void predict_without_left(bool initial);
178  virtual void sweep_with_left();
179  virtual void sweep_without_left();
180  };
181  } // ::pfasst::encap
182 } // ::pfasst
183 
185 
186 #endif
Semi-implicit IMEX sweeper.
Host based encapsulated base sweeper.
void setup(shared_ptr< WrapperInterface< scalar, time >> wrapper)
shared_ptr< Encapsulation< time > > fs_expl_start
STL namespace.
vector< shared_ptr< Encapsulation< time > > > s_integrals
Node-to-node integrals of \( F(t,u) \) at all time nodes of the current iteration.
vector< shared_ptr< Encapsulation< time > > > fs_expl
Values of the explicit part of the right hand side \( F_{expl}(t,u) \) at all time nodes of the curre...
Data/solution encapsulation.
tuple t
Definition: plot.py:12
vector< shared_ptr< Encapsulation< time > > > fs_impl
Values of the implicit part of the right hand side \( F_{impl}(t,u) \) at all time nodes of the curre...
float dt
Definition: plot.py:10