diff options
Diffstat (limited to 'examples/cavity_2d.cpp')
-rw-r--r-- | examples/cavity_2d.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/examples/cavity_2d.cpp b/examples/cavity_2d.cpp index ca291d3..ca42894 100644 --- a/examples/cavity_2d.cpp +++ b/examples/cavity_2d.cpp @@ -259,7 +259,7 @@ void lbm_step( switch(info({0u}).get()){ case 1u: { - coll.apply(latt, {{i,j}}, time_step); + coll.apply(latt, {{i,j}}, time_step+1u); break; } case 2u: { @@ -270,13 +270,30 @@ void lbm_step( case 3u: { auto& df = even_step ? cell.template get<"dfs_old">() : cell.template get<"dfs">(); // bb_two.apply(df); - bb.apply(latt, {{i,j}}, time_step); + // bb.apply(latt, {{i,j}}, time_step); break; } + default: + break; } } } + apply_for_cells([&](auto cell, size_t i, size_t j){ + auto& info = cell.template get<"info">(); + + auto info_v = info({0u}).get(); + switch(info_v){ + case 3u: { + auto& df = even_step ? cell.template get<"dfs_old">() : cell.template get<"dfs">(); + bb_two.apply(df); + break; + } + default: + break; + } + },latt); + // Stream for(uint64_t i = 1u; (i+1u) < latt.template get_dim_size<0>().get(); ++i){ for(uint64_t j = 1u; (j+1u) < latt.template get_dim_size<1>().get(); ++j){ |