summaryrefslogtreecommitdiff
path: root/examples/meta_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/meta_2d.cpp')
-rw-r--r--examples/meta_2d.cpp11
1 files changed, 8 insertions, 3 deletions
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">()});