diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-10-08 11:56:20 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-10-08 11:56:20 +0200 |
| commit | a7074a924f9e5f8d99ab9bd6cd1581a2da3f5443 (patch) | |
| tree | 09dee0a067f1e6b67c29658e65889cad315bd857 /examples/throat_clog_2d | |
| parent | 0d77c9879b4b31b975abc5ce7873b8156e25d24c (diff) | |
| download | libs-lbm-a7074a924f9e5f8d99ab9bd6cd1581a2da3f5443.tar.gz | |
Trying to fix throat
Diffstat (limited to 'examples/throat_clog_2d')
| -rw-r--r-- | examples/throat_clog_2d/sim.cpp | 4 | ||||
| -rw-r--r-- | examples/throat_clog_2d/step.hpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/examples/throat_clog_2d/sim.cpp b/examples/throat_clog_2d/sim.cpp index 26ac26b..7fda532 100644 --- a/examples/throat_clog_2d/sim.cpp +++ b/examples/throat_clog_2d/sim.cpp @@ -51,7 +51,7 @@ saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){ {{1.067e-2}} }; - print_lbm_meta<T,Desc>(conv,{1e-3},{1e-4},{0.5 * dim_y}); + print_lbm_meta<T,Desc>(conv,{1e-3},{1e-4},{0.2 * dim_y}); // saw::data<sch::FixedArray<sch::UInt64,Desc::D>> meta{{dim_x,dim_y}}; auto lbm_data_ptr = saw::heap<saw::data<sch::ChunkStruct<T,Desc>>>(); @@ -122,7 +122,7 @@ saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){ auto lsdm_view = make_view(lbm_sycl_macro_data); auto lsdp_view = make_view(lbm_sycl_particle_data); - saw::data<sch::UInt64> time_steps{128u*1024ul}; + saw::data<sch::UInt64> time_steps{256u*512ul}; auto& info_f = lsd_view.template get<"info">(); diff --git a/examples/throat_clog_2d/step.hpp b/examples/throat_clog_2d/step.hpp index 1146890..dcee5fb 100644 --- a/examples/throat_clog_2d/step.hpp +++ b/examples/throat_clog_2d/step.hpp @@ -84,7 +84,7 @@ saw::error_or<void> step( } { auto y_si = conv.meter_lbm_to_si(index.at({{1u}}).template cast_to<T>()).handle(); - vel.at({{0u}}) = conv.velocity_si_to_lbm({{static_cast<typename saw::native_data_type<T>::type>((1.2 / 0.41) * y_si.get() - (1.2 / (0.41*0.41)) * y_si.get() * y_si.get())}}).handle() * scale; + vel.at({{0u}}) = conv.velocity_si_to_lbm({{static_cast<typename saw::native_data_type<T>::type>((1.2 / 0.64) * y_si.get() - (1.2 / (0.64*0.64)) * y_si.get() * y_si.get())}}).handle() * scale; vel.at({{1u}}) = 0.0f; } return vel; @@ -162,7 +162,7 @@ saw::error_or<void> step( saw::data<sch::Vector<T,Desc::D>> vel; { auto y_si = conv.meter_lbm_to_si(index.at({{1u}}).template cast_to<T>()).handle(); - vel.at({{0u}}) = conv.velocity_si_to_lbm({{static_cast<typename saw::native_data_type<T>::type>((1.2 / 0.41) * y_si.get() - (1.2 / (0.41*0.41)) * y_si.get() * y_si.get())}}).handle(); + vel.at({{0u}}) = conv.velocity_si_to_lbm({{static_cast<typename saw::native_data_type<T>::type>((1.2 / 0.64) * y_si.get() - (1.2 / (0.64*0.64)) * y_si.get() * y_si.get())}}).handle(); vel.at({{1u}}) = 0.0f; } return vel; @@ -238,7 +238,7 @@ saw::error_or<void> step( saw::data<sch::Vector<T,Desc::D>> vel; { auto y_si = conv.meter_lbm_to_si(index.at({{1u}}).template cast_to<T>()).handle(); - vel.at({{0u}}) = conv.velocity_si_to_lbm({{static_cast<typename saw::native_data_type<T>::type>((1.2 / 0.41) * y_si.get() - (1.2 / (0.41*0.41)) * y_si.get() * y_si.get())}}).handle(); + vel.at({{0u}}) = conv.velocity_si_to_lbm({{static_cast<typename saw::native_data_type<T>::type>((1.2 / 0.64) * y_si.get() - (1.2 / (0.64*0.64)) * y_si.get() * y_si.get())}}).handle(); vel.at({{1u}}) = 0.0f; } return vel; |
