diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-04-22 15:07:38 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-04-22 15:07:38 +0200 |
commit | f11181eafa66546da479cc47ee95231f0609c69d (patch) | |
tree | 54eeb12d9689e64e094fa80f00956331ccc4ae65 /examples | |
parent | d7b6dee2db415fc5d0052dca47a45c44b9aaba6d (diff) |
Added basic file specification for first position
Diffstat (limited to 'examples')
-rw-r--r-- | examples/config.json | 6 | ||||
-rw-r--r-- | 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<sch::Float64,sch::Descriptor<2,9>>("config.json"); + std::string_view cfg_file_name = "config.json"; + if(argc > 1){ + cfg_file_name = argv[1]; + } + + auto eo_conf = load_lbm_config<sch::Float64,sch::Descriptor<2,9>>(cfg_file_name); if(eo_conf.is_error()){ auto& err = eo_conf.get_error(); std::cerr<<"[Error]: "<<err.get_category(); @@ -21,8 +26,8 @@ int main(int argc, char** argv){ auto& conf = eo_conf.get_value(); converter<sch::Float64> conv{ - {0.1}, - {0.1} + {conf.template get<"delta_x">()}, + {conf.template get<"delta_t">()} }; print_lbm_meta<sch::Float64,sch::Descriptor<2,9>>(conv, {conf.template get<"kinematic_viscosity">()}); |