summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-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
7 files changed, 24 insertions, 4 deletions
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