diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-09-22 17:24:22 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-09-22 17:24:22 +0200 |
| commit | ef0e7d1104077082663c3ce3374eb5778008f545 (patch) | |
| tree | 85f311050e1f438bbfeb2e0347bf4343ea02150c | |
| parent | 79196db2ac3d31543056b3b7abe90ad609c51b4f (diff) | |
| download | libs-lbm-dev.tar.gz | |
Clog workdev
| -rw-r--r-- | default.nix | 5 | ||||
| -rw-r--r-- | examples/throat_clog_2d/.nix/derivation.nix (renamed from examples/throat_clog/.nix/derivation.nix) | 0 | ||||
| -rw-r--r-- | examples/throat_clog_2d/SConscript (renamed from examples/throat_clog/SConscript) | 2 | ||||
| -rw-r--r-- | examples/throat_clog_2d/SConstruct (renamed from examples/throat_clog/SConstruct) | 0 | ||||
| -rw-r--r-- | examples/throat_clog_2d/common.hpp (renamed from examples/throat_clog/common.hpp) | 0 | ||||
| -rw-r--r-- | examples/throat_clog_2d/init.hpp (renamed from examples/throat_clog/init.hpp) | 20 | ||||
| -rw-r--r-- | examples/throat_clog_2d/sim.cpp (renamed from examples/throat_clog/sim.cpp) | 6 | ||||
| -rw-r--r-- | examples/throat_clog_2d/step.hpp (renamed from examples/throat_clog/step.hpp) | 0 |
8 files changed, 29 insertions, 4 deletions
diff --git a/default.nix b/default.nix index b945aab..3c8ed41 100644 --- a/default.nix +++ b/default.nix @@ -232,6 +232,11 @@ in rec { inherit pname version stdenv forstio adaptive-cpp; inherit kel; }; + + throat_2d = pkgs.callPackage ./examples/throat_clog_2d/.nix/derivation.nix { + inherit pname version stdenv forstio adaptive-cpp; + inherit kel; + }; heterogeneous_computing = pkgs.callPackage ./examples/heterogeneous_computing/.nix/derivation.nix { inherit pname version stdenv forstio adaptive-cpp; diff --git a/examples/throat_clog/.nix/derivation.nix b/examples/throat_clog_2d/.nix/derivation.nix index 4dfce2a..4dfce2a 100644 --- a/examples/throat_clog/.nix/derivation.nix +++ b/examples/throat_clog_2d/.nix/derivation.nix diff --git a/examples/throat_clog/SConscript b/examples/throat_clog_2d/SConscript index b33b7ae..9efb101 100644 --- a/examples/throat_clog/SConscript +++ b/examples/throat_clog_2d/SConscript @@ -23,7 +23,7 @@ env.headers += examples_env.headers; # Cavity2D examples_objects = []; examples_env.add_source_files(examples_objects, ['sim.cpp'], shared=False); -examples_env.poiseulle_2d_gpu = examples_env.Program('#bin/stdkr_2d', [examples_objects]); +examples_env.poiseulle_2d_gpu = examples_env.Program('#bin/throat_2d', [examples_objects]); # Set Alias env.examples = [ diff --git a/examples/throat_clog/SConstruct b/examples/throat_clog_2d/SConstruct index 0611b67..0611b67 100644 --- a/examples/throat_clog/SConstruct +++ b/examples/throat_clog_2d/SConstruct diff --git a/examples/throat_clog/common.hpp b/examples/throat_clog_2d/common.hpp index be9a538..be9a538 100644 --- a/examples/throat_clog/common.hpp +++ b/examples/throat_clog_2d/common.hpp diff --git a/examples/throat_clog/init.hpp b/examples/throat_clog_2d/init.hpp index af7eb89..69225be 100644 --- a/examples/throat_clog/init.hpp +++ b/examples/throat_clog_2d/init.hpp @@ -34,6 +34,26 @@ saw::error_or<void> init( info_f.get_dims(), {{1u,1u}} ); + + iterator<Desc::D>::apply( + [&](auto& index){ + auto dims = info_f.get_dims(); + auto width = dims.at({{0u}}); + auto height = dims.at({{1u}}); + // + auto w2 = width / 2; + auto h4 = height / 4; + // Circle Top + saw::data<sch::FixedArray<sch::Int64,2u>> top_pos{{w2.get(),(height+h4).get()}}; + + // Circle Bot + saw::data<sch::FixedArray<sch::Int64,2u>> bot_pos{{w2.get(),-h4.get()}}; + + }, + {}, + info_f.get_dims(), + {} + ); // Inflow iterator<Desc::D>::apply( diff --git a/examples/throat_clog/sim.cpp b/examples/throat_clog_2d/sim.cpp index 59f61d9..9a21a96 100644 --- a/examples/throat_clog/sim.cpp +++ b/examples/throat_clog_2d/sim.cpp @@ -34,7 +34,7 @@ saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){ } auto& lbm_dir = eo_lbm_dir.get_value(); - auto out_dir = lbm_dir / "stdkr_2d_gpu" / an.template get<"coupling">().stl_view(); + auto out_dir = lbm_dir / "throat_clog_2d" / an.template get<"coupling">().stl_view(); { std::error_code ec; @@ -186,13 +186,13 @@ saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){ } } { - auto eov = write_vtk_file(out_dir,std::string{"stdkr_2d_"}+an.template get<"coupling">().stl_string(),time_steps.get(), *lbm_macro_data_ptr); + auto eov = write_vtk_file(out_dir,std::string{"throat_clog_2d_"}+an.template get<"coupling">().stl_string(),time_steps.get(), *lbm_macro_data_ptr); if(eov.is_error()){ return eov; } } { - auto eov = write_csv_file(out_dir,"stdkr_2d",time_steps.get(), *lbm_macro_data_ptr); + auto eov = write_csv_file(out_dir,"throat_clog_2d",time_steps.get(), *lbm_macro_data_ptr); if(eov.is_error()){ return eov; } diff --git a/examples/throat_clog/step.hpp b/examples/throat_clog_2d/step.hpp index beb123b..beb123b 100644 --- a/examples/throat_clog/step.hpp +++ b/examples/throat_clog_2d/step.hpp |
