diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-08-07 18:15:25 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-08-07 18:15:25 +0200 |
| commit | 15ee0a4a9b398b86001c7a2542e8e98f9dedba70 (patch) | |
| tree | 60636c39dad819388e6fd814a2a9c2efac5dded1 /modules/core | |
| parent | cf3ee2ab8de44160c24da7850955021142f41da8 (diff) | |
| download | libs-lbm-15ee0a4a9b398b86001c7a2542e8e98f9dedba70.tar.gz | |
Environment cleanup. Use this in future sim runsdev
Diffstat (limited to 'modules/core')
| -rw-r--r-- | modules/core/c++/args.hpp | 27 | ||||
| -rw-r--r-- | modules/core/c++/descriptor/d2q5.hpp | 2 | ||||
| -rw-r--r-- | modules/core/c++/environment.hpp | 5 |
3 files changed, 4 insertions, 30 deletions
diff --git a/modules/core/c++/args.hpp b/modules/core/c++/args.hpp deleted file mode 100644 index a0aa941..0000000 --- a/modules/core/c++/args.hpp +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once - -#include <forstio/codec/data.hpp> -#include <forstio/codec/args.hpp> - -namespace kel { -namespace lbm { -namespace sch { -using namespace saw::schema; -} - -template<typename ArgSchema> -saw::error_or<saw::data<ArgSchema>> setup_lbm_env(int argc, char** argv){ - saw::data<ArgSchema,saw::encode::Args> args_data{argc,argv}; - - saw::codec<ArgSchema,saw::encode::Args> args_codec; - - saw::data<ArgSchema> args_decoded; - auto eov = args_codec.decode(args_data,args_decoded); - if(eov.is_error()){ - return eov; - } - - return args_decoded; -} -} -} diff --git a/modules/core/c++/descriptor/d2q5.hpp b/modules/core/c++/descriptor/d2q5.hpp index 74f8b96..fef9c40 100644 --- a/modules/core/c++/descriptor/d2q5.hpp +++ b/modules/core/c++/descriptor/d2q5.hpp @@ -5,7 +5,7 @@ namespace kel { namespace lbm { namespace sch { -using D2Q9 = Descriptor<2u,5u>; +using D2Q5 = Descriptor<2u,5u>; } template<typename T> diff --git a/modules/core/c++/environment.hpp b/modules/core/c++/environment.hpp index ed9cd40..51092d5 100644 --- a/modules/core/c++/environment.hpp +++ b/modules/core/c++/environment.hpp @@ -22,7 +22,7 @@ saw::error_or<environment> init_lbm_env(const saw::data<ArgSch>& args){ namespace fs = std::filesystem; auto& args_n = args.template get<"args">(); - auto& name = args_n.template get<"name">(); + auto& arg_name = args_n.template get<"name">(); const char* home_dir = std::getenv("HOME"); if(not home_dir){ @@ -50,7 +50,8 @@ saw::error_or<environment> init_lbm_env(const saw::data<ArgSch>& args){ } { - env.name_dir = env.data_dir / name.view(); + env.name = arg_name.stl_view(); + env.name_dir = env.data_dir / arg_name.stl_view(); } return env; |
