From 2d1333f43844b3dca1b93ab04adc98bbd5ee8571 Mon Sep 17 00:00:00 2001
From: Adrian Kummerlaender
Date: Mon, 14 Jan 2019 14:50:16 +0100
Subject: Start implementation overview section

---
 code/grid2d_collide_and_stream.cpp | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 code/grid2d_collide_and_stream.cpp

(limited to 'code')

diff --git a/code/grid2d_collide_and_stream.cpp b/code/grid2d_collide_and_stream.cpp
new file mode 100644
index 0000000..4660946
--- /dev/null
+++ b/code/grid2d_collide_and_stream.cpp
@@ -0,0 +1,31 @@
+template <typename T, template<typename> class DESCRIPTOR>
+void Grid2D<T,DESCRIPTOR>::collideAndStream()
+{
+  for ( auto& fineCoupler : _fineCouplers ) {
+    fineCoupler->store(); // Speichern von Werten in $x_{g \to f}^g \in \G$ zu Zeit $t$
+  }
+
+  this->getSuperLattice().collideAndStream(); // Zeitschritt $t \to t+\delta t_g$ auf $\G$
+
+  for ( auto& fineGrid : _fineGrids ) {
+    fineGrid->collideAndStream(); // Zeitschritt $t \to t+\delta t_g / 2$ auf $\F$
+  }
+
+  for ( auto& fineCoupler : _fineCouplers ) {
+    fineCoupler->interpolate(); // Interpolation von Werten in $x_{g \to f}^g \in \G$ zu Zeit $t + \delta t_g / 2$
+    fineCoupler->couple();      // Setzen von $f_{f,i}$ in $x_{g \to f} \in \F$
+  }
+
+  for ( auto& fineGrid : _fineGrids ) {
+    fineGrid->collideAndStream(); // Zeitschritt $t+\delta t_f \to t+2\delta t_f$ auf $\F$
+  }
+
+  for ( auto& fineCoupler : _fineCouplers ) {
+    fineCoupler->store();    // Speichern von Werten in $x_{g \to f}^g \in \G$ zu Zeit $t + \delta t_g$
+    fineCoupler->couple();   // Setzen von $f_{f,i}$ in $x_{g \to f} \in \F$
+  }
+
+  for ( auto& coarseCoupler : _coarseCouplers ) {
+    coarseCoupler->couple(); // Setzen von $f_{g,i}$ in $x_{f \to g} \in \G$
+  }
+}
-- 
cgit v1.2.3