From f11181eafa66546da479cc47ee95231f0609c69d Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 22 Apr 2025 15:07:38 +0200 Subject: Added basic file specification for first position --- examples/config.json | 6 +++--- examples/meta_2d.cpp | 11 ++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/examples/config.json b/examples/config.json index dcd7f91..5ce6b4e 100644 --- a/examples/config.json +++ b/examples/config.json @@ -1,5 +1,5 @@ { - "delta_x" : 0.1, - "delta_t" : 0.1, - "kinematic_viscosity" : 1e-3 + "delta_x" : 0.01, + "delta_t" : 0.05, + "kinematic_viscosity" : 1e-4 } diff --git a/examples/meta_2d.cpp b/examples/meta_2d.cpp index a66f0e9..ac0857b 100644 --- a/examples/meta_2d.cpp +++ b/examples/meta_2d.cpp @@ -5,7 +5,12 @@ int main(int argc, char** argv){ using namespace kel::lbm; - auto eo_conf = load_lbm_config>("config.json"); + std::string_view cfg_file_name = "config.json"; + if(argc > 1){ + cfg_file_name = argv[1]; + } + + auto eo_conf = load_lbm_config>(cfg_file_name); if(eo_conf.is_error()){ auto& err = eo_conf.get_error(); std::cerr<<"[Error]: "< conv{ - {0.1}, - {0.1} + {conf.template get<"delta_x">()}, + {conf.template get<"delta_t">()} }; print_lbm_meta>(conv, {conf.template get<"kinematic_viscosity">()}); -- cgit v1.2.3