aboutsummaryrefslogtreecommitdiff
path: root/code/coupler2d.cpp
blob: 7c78db5c9337d443d0f8497f7a47bbf23047f3a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
template <typename T, template<typename> class DESCRIPTOR>
class Coupler2D {
protected:
  Grid2D<T,DESCRIPTOR>& _coarse;
  Grid2D<T,DESCRIPTOR>& _fine;

  const int  _coarseSize;
  const int  _fineSize;
  const bool _vertical;

  const Vector<T,2> _physOrigin;

  const Vector<int,3>& getFineLatticeR(int y) const;
  const Vector<int,3>& getCoarseLatticeR(int y) const;

  T getScalingFactor() const; // Skalierungsfaktor $(\ref{eq:scaleFactor})$ der Nicht-Equilibriumsverteilung
  T getInvScalingFactor() const;

private:
  std::vector<Vector<int,3>> _coarseLatticeR;
  std::vector<Vector<int,3>> _fineLatticeR;

public:
  Coupler2D(Grid2D<T,DESCRIPTOR>& coarse, Grid2D<T,DESCRIPTOR>& fine,
            Vector<T,2> origin, Vector<T,2> extend);

};