From fc006b5b5012520e730e84f80651a3eea0f8dd3c Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Mon, 14 Jan 2019 16:25:06 +0100 Subject: Preliminarily conclude implementation overview section --- code/coarseCoupler2d.cpp | 8 ++++++++ code/coupler2d.cpp | 27 +++++++++++++++++++++++++++ code/fineCoupler2d.cpp | 15 +++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 code/coarseCoupler2d.cpp create mode 100644 code/coupler2d.cpp create mode 100644 code/fineCoupler2d.cpp (limited to 'code') diff --git a/code/coarseCoupler2d.cpp b/code/coarseCoupler2d.cpp new file mode 100644 index 0000000..9bc5383 --- /dev/null +++ b/code/coarseCoupler2d.cpp @@ -0,0 +1,8 @@ +template class DESCRIPTOR> +class CoarseCoupler2D : public Coupler2D { +public: + CoarseCoupler2D(Grid2D& coarse, Grid2D& fine, + Vector origin, Vector extend); + + void couple(); +}; diff --git a/code/coupler2d.cpp b/code/coupler2d.cpp new file mode 100644 index 0000000..7f2b8a8 --- /dev/null +++ b/code/coupler2d.cpp @@ -0,0 +1,27 @@ +template class DESCRIPTOR> +class Coupler2D { +protected: + Grid2D& _coarse; + Grid2D& _fine; + + const int _coarseSize; + const int _fineSize; + const bool _vertical; + + Vector _physOrigin; + + const Vector& getFineLatticeR(int y) const; + const Vector& getCoarseLatticeR(int y) const; + + T getScalingFactor() const; + T getInvScalingFactor() const; + +private: + std::vector> _coarseLatticeR; + std::vector> _fineLatticeR; + +public: + Coupler2D(Grid2D& coarse, Grid2D& fine, + Vector origin, Vector extend); + +}; diff --git a/code/fineCoupler2d.cpp b/code/fineCoupler2d.cpp new file mode 100644 index 0000000..4cde254 --- /dev/null +++ b/code/fineCoupler2d.cpp @@ -0,0 +1,15 @@ +template class DESCRIPTOR> +class FineCoupler2D : public Coupler2D { +private: + std::vector _c2f_rho; + std::vector> _c2f_u; + std::vector::q>> _c2f_fneq; + +public: + FineCoupler2D(Grid2D& coarse, Grid2D& fine, + Vector origin, Vector extend); + + void store(); + void interpolate(); + void couple(); +}; -- cgit v1.2.3