aboutsummaryrefslogtreecommitdiff
path: root/code/fineCoupler2d_couple_extract.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'code/fineCoupler2d_couple_extract.cpp')
-rw-r--r--code/fineCoupler2d_couple_extract.cpp18
1 files changed, 18 insertions, 0 deletions
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<T,DESCRIPTOR> fineCell;
+ fineLattice.get(finePos, fineCell);
+
+ for (int iPop=0; iPop < DESCRIPTOR<T>::q; ++iPop) {
+ fineCell[iPop] = lbHelpers<T,DESCRIPTOR>::equilibrium(iPop, rho[0], u.data, uSqr)
+ + this->getScalingFactor() * fneq[iPop];
+ }
+
+ fineLattice.set(finePos, fineCell);
+}