From b89b56b6b93d6b8df61954235c2ce6bd04bfd714 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Tue, 15 Jan 2019 12:05:50 +0100 Subject: Conclude refinement method implementation section --- code/fineCoupler2d_couple_extract.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 code/fineCoupler2d_couple_extract.cpp (limited to 'code/fineCoupler2d_couple_extract.cpp') diff --git a/code/fineCoupler2d_couple_extract.cpp b/code/fineCoupler2d_couple_extract.cpp new file mode 100644 index 0000000..089ed02 --- /dev/null +++ b/code/fineCoupler2d_couple_extract.cpp @@ -0,0 +1,18 @@ +for (int y=1; y < this->_coarseSize-2; ++y) { + const auto rho = order4interpolation(_c2f_rho, y); // Siehe Listing $\ref{lst:ipol4ord}$ + const auto u = order4interpolation(_c2f_u, y); + const auto fneq = order4interpolation(_c2f_fneq, y); + + const T uSqr = u*u; + + const auto finePos = this->getFineLatticeR(1+2*y); + Cell fineCell; + fineLattice.get(finePos, fineCell); + + for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) { + fineCell[iPop] = lbHelpers::equilibrium(iPop, rho[0], u.data, uSqr) + + this->getScalingFactor() * fneq[iPop]; + } + + fineLattice.set(finePos, fineCell); +} -- cgit v1.2.3