aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-01-14 14:50:16 +0100
committerAdrian Kummerlaender2019-01-14 14:50:16 +0100
commit2d1333f43844b3dca1b93ab04adc98bbd5ee8571 (patch)
treeec7833c330ada6f7f6e47958f3788605acc34c01 /code
parenta60b1a981b6b6ecbe0b390a0e7d6ece1d517f123 (diff)
downloadgrid_refinement_bsc_thesis-2d1333f43844b3dca1b93ab04adc98bbd5ee8571.tar
grid_refinement_bsc_thesis-2d1333f43844b3dca1b93ab04adc98bbd5ee8571.tar.gz
grid_refinement_bsc_thesis-2d1333f43844b3dca1b93ab04adc98bbd5ee8571.tar.bz2
grid_refinement_bsc_thesis-2d1333f43844b3dca1b93ab04adc98bbd5ee8571.tar.lz
grid_refinement_bsc_thesis-2d1333f43844b3dca1b93ab04adc98bbd5ee8571.tar.xz
grid_refinement_bsc_thesis-2d1333f43844b3dca1b93ab04adc98bbd5ee8571.tar.zst
grid_refinement_bsc_thesis-2d1333f43844b3dca1b93ab04adc98bbd5ee8571.zip
Start implementation overview section
Diffstat (limited to 'code')
-rw-r--r--code/grid2d_collide_and_stream.cpp31
1 files changed, 31 insertions, 0 deletions
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$
+ }
+}