diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-02-04 16:52:18 +0100 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-02-04 16:52:18 +0100 |
| commit | 6aff1078884c820b110f1355c9b0d04a9dd45cc2 (patch) | |
| tree | 4a27ff02fa848e53961ca0517b4a2911b23808d2 /examples/poiseulle_particles_2d_gpu/sim.cpp | |
| parent | ba9c23e4177ab9309f69155601578b118b2fd782 (diff) | |
| download | libs-lbm-6aff1078884c820b110f1355c9b0d04a9dd45cc2.tar.gz | |
Semi working state. Broken vtk ordering
Diffstat (limited to 'examples/poiseulle_particles_2d_gpu/sim.cpp')
| -rw-r--r-- | examples/poiseulle_particles_2d_gpu/sim.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/examples/poiseulle_particles_2d_gpu/sim.cpp b/examples/poiseulle_particles_2d_gpu/sim.cpp index 3084bca..bdd93b0 100644 --- a/examples/poiseulle_particles_2d_gpu/sim.cpp +++ b/examples/poiseulle_particles_2d_gpu/sim.cpp @@ -83,7 +83,7 @@ saw::error_or<void> setup_initial_conditions( {{0u,1u}} ); // - auto& df_f = fields.template get<"dfs">(); + auto& df_f = fields.template get<"dfs_old">(); auto& rho_f = macros.template get<"density">(); auto& vel_f = macros.template get<"velocity">(); @@ -249,6 +249,15 @@ saw::error_or<void> lbm_main(int argc, char** argv){ } } { + std::string file_name = "tmp/df_"; + file_name += std::to_string(i.get()); + file_name += ".vtk"; + auto eov = write_vtk_file(file_name, *lbm_data_ptr); + if(eov.is_error()){ + return eov; + } + } + { auto eov = step<T,Desc>(lsd_view,lsdm_view,i,dev); if(eov.is_error()){ return eov; @@ -276,9 +285,14 @@ saw::error_or<void> lbm_main(int argc, char** argv){ if(eov.is_error()){ return eov; } - auto eov2 = write_vtk_file((std::string{"tmp/df_"}+std::to_string(time_steps.get())+std::string{".vtk"}), *lbm_data_ptr); - if(eov2.is_error()){ - return eov2; + } + { + std::string file_name = "tmp/df_"; + file_name += std::to_string(time_steps.get()); + file_name += ".vtk"; + auto eov = write_vtk_file(file_name, *lbm_data_ptr); + if(eov.is_error()){ + return eov; } } |
