aboutsummaryrefslogtreecommitdiff
path: root/code/fineCoupler2d_couple_extract.cpp
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-01-15 12:05:50 +0100
committerAdrian Kummerlaender2019-01-15 12:05:50 +0100
commitb89b56b6b93d6b8df61954235c2ce6bd04bfd714 (patch)
treed6394cd232bcc28cce9c32907bd716b92c591808 /code/fineCoupler2d_couple_extract.cpp
parent3b90a476f0a8d978a13b862f43bfdaf05d281429 (diff)
downloadgrid_refinement_bsc_thesis-b89b56b6b93d6b8df61954235c2ce6bd04bfd714.tar
grid_refinement_bsc_thesis-b89b56b6b93d6b8df61954235c2ce6bd04bfd714.tar.gz
grid_refinement_bsc_thesis-b89b56b6b93d6b8df61954235c2ce6bd04bfd714.tar.bz2
grid_refinement_bsc_thesis-b89b56b6b93d6b8df61954235c2ce6bd04bfd714.tar.lz
grid_refinement_bsc_thesis-b89b56b6b93d6b8df61954235c2ce6bd04bfd714.tar.xz
grid_refinement_bsc_thesis-b89b56b6b93d6b8df61954235c2ce6bd04bfd714.tar.zst
grid_refinement_bsc_thesis-b89b56b6b93d6b8df61954235c2ce6bd04bfd714.zip
Conclude refinement method implementation section
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);
+}