summaryrefslogtreecommitdiff
path: root/examples/moving_poiseulle_particles_2d_fplbm_gpu/sim.cpp
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-08-07 18:15:25 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-08-07 18:15:25 +0200
commit15ee0a4a9b398b86001c7a2542e8e98f9dedba70 (patch)
tree60636c39dad819388e6fd814a2a9c2efac5dded1 /examples/moving_poiseulle_particles_2d_fplbm_gpu/sim.cpp
parentcf3ee2ab8de44160c24da7850955021142f41da8 (diff)
downloadlibs-lbm-15ee0a4a9b398b86001c7a2542e8e98f9dedba70.tar.gz
Environment cleanup. Use this in future sim runsdev
Diffstat (limited to 'examples/moving_poiseulle_particles_2d_fplbm_gpu/sim.cpp')
-rw-r--r--examples/moving_poiseulle_particles_2d_fplbm_gpu/sim.cpp26
1 files changed, 19 insertions, 7 deletions
diff --git a/examples/moving_poiseulle_particles_2d_fplbm_gpu/sim.cpp b/examples/moving_poiseulle_particles_2d_fplbm_gpu/sim.cpp
index c82f632..328f6e2 100644
--- a/examples/moving_poiseulle_particles_2d_fplbm_gpu/sim.cpp
+++ b/examples/moving_poiseulle_particles_2d_fplbm_gpu/sim.cpp
@@ -256,13 +256,25 @@ saw::error_or<void> lbm_main(int argc, char** argv){
using dfi = df_info<T,Desc>;
- auto eo_lbm_dir = output_directory();
- if(eo_lbm_dir.is_error()){
- return std::move(eo_lbm_dir.get_error());
+ saw::data<sch::LbmArgs> args;
+ {
+ auto& args_n = args.template get<"args">();
+ auto& name = args_n.template get<"name">();
+ name.set("moving_poiseulle_particles_2d_fplbm_gpu");
+ }
+ {
+ auto eov = saw::parse_args(args,argc,argv);
+ if(eov.is_error()){
+ return eov;
+ }
+ }
+ auto eo_lbm_env = init_lbm_env(args);
+ if(eo_lbm_env.is_error()){
+ return std::move(eo_lbm_env.get_error());
}
- auto& lbm_dir = eo_lbm_dir.get_value();
+ const auto& lbm_env = eo_lbm_env.get_value();
- auto out_dir = lbm_dir / "moving_poiseulle_particles_2d_fplbm_imp_gpu";
+ auto& out_dir = lbm_env.name_dir;
{
std::error_code ec;
@@ -424,13 +436,13 @@ saw::error_or<void> lbm_main(int argc, char** argv){
}
}
{
- auto eov = write_vtk_file(out_dir,"m",time_steps.get(), *lbm_macro_data_ptr);
+ auto eov = write_vtk_file(out_dir,lbm_env.name,time_steps.get(), *lbm_macro_data_ptr);
if(eov.is_error()){
return eov;
}
}
{
- auto eov = write_csv_file(out_dir,"m",time_steps.get(), *lbm_macro_data_ptr);
+ auto eov = write_csv_file(out_dir,lbm_env.name,time_steps.get(), *lbm_macro_data_ptr);
if(eov.is_error()){
return eov;
}