PFASST++
implicit_sweeper.hpp
Go to the documentation of this file.
1 #ifndef _PFASST_ENCAP_IMPLICIT_SWEEPER_HPP_
2 #define _PFASST_ENCAP_IMPLICIT_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 
23  template<typename time = time_precision>
25  : public pfasst::encap::EncapSweeper<time>
26  {
27  protected:
29 
32  vector<shared_ptr<Encapsulation<time>>> s_integrals;
33 
38  vector<shared_ptr<Encapsulation<time>>> fs_impl;
40 
42 
43  void set_end_state();
44 
45  public:
47  ImplicitSweeper() = default;
48  virtual ~ImplicitSweeper() = default;
50 
52 
55  virtual void setup(bool coarse) override;
56 
65  virtual void predict(bool initial) override;
66 
73  virtual void sweep() override;
74 
78  virtual void advance() override;
79 
83  virtual void reevaluate(bool initial_only) override;
84 
91  virtual void integrate(time dt, vector<shared_ptr<Encapsulation<time>>> dst) const override;
93 
95 
108  virtual void f_impl_eval(shared_ptr<Encapsulation<time>> f_impl_encap,
109  shared_ptr<Encapsulation<time>> u_encap,
110  time t)
111  {
112  UNUSED(f_impl_encap); UNUSED(u_encap); UNUSED(t);
113  throw NotImplementedYet("implicit (f_impl_eval)");
114  }
115 
131  virtual void impl_solve(shared_ptr<Encapsulation<time>> f_encap,
132  shared_ptr<Encapsulation<time>> u_encap,
133  time t, time dt,
134  shared_ptr<Encapsulation<time>> rhs_encap)
135  {
136  UNUSED(f_encap); UNUSED(u_encap); UNUSED(t); UNUSED(dt); UNUSED(rhs_encap);
137  throw NotImplementedYet("implicit (impl_solve)");
138  }
140  };
141 
142  } // ::pfasst::encap
143 } // ::pfasst
144 
146 
147 #endif
Host based encapsulated base sweeper.
void setup(shared_ptr< WrapperInterface< scalar, time >> wrapper)
Not implemented yet exception.
Definition: interfaces.hpp:29
STL namespace.
virtual void impl_solve(shared_ptr< Encapsulation< time >> f_encap, shared_ptr< Encapsulation< time >> u_encap, time t, time dt, shared_ptr< Encapsulation< time >> rhs_encap)
Solve \( U - \Delta t F_{\rm impl}(U) = RHS \) for \( U \).
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...
virtual void f_impl_eval(shared_ptr< Encapsulation< time >> f_impl_encap, shared_ptr< Encapsulation< time >> u_encap, time t)
Evaluate the implicit part of the ODE.
Data/solution encapsulation.
tuple t
Definition: plot.py:12
#define UNUSED(expr)
Denoting unused function parameters for omitting compiler warnings.
Definition: globals.hpp:32
vector< shared_ptr< Encapsulation< time > > > s_integrals
Node-to-node integrals of \( F(t,u) \) at all time nodes of the current iteration.
Eigen::Matrix< scalar, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > Matrix
float dt
Definition: plot.py:10