diff options
Diffstat (limited to 'examples/poiseulle_particles_2d_gpu')
| -rw-r--r-- | examples/poiseulle_particles_2d_gpu/sim.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/examples/poiseulle_particles_2d_gpu/sim.cpp b/examples/poiseulle_particles_2d_gpu/sim.cpp index 305ef80..f9ee85b 100644 --- a/examples/poiseulle_particles_2d_gpu/sim.cpp +++ b/examples/poiseulle_particles_2d_gpu/sim.cpp @@ -7,8 +7,8 @@ namespace kel { namespace lbm { -constexpr uint64_t dim_x = 2048u; -constexpr uint64_t dim_y = 1024u; +constexpr uint64_t dim_x = 1024u; +constexpr uint64_t dim_y = 512u; namespace sch { using namespace saw::schema; @@ -119,7 +119,15 @@ saw::error_or<void> step( // Need nicer things to handle the flow. I see improvement here component<T,Desc,cmpt::BGK,encode::Sycl<saw::encode::Native>> collision{0.6}; component<T,Desc,cmpt::BounceBack,encode::Sycl<saw::encode::Native>> bb; - component<T,Desc,cmpt::ZouHeHorizontal<true>,encode::Sycl<saw::encode::Native>> flow_in{1.01}; + component<T,Desc,cmpt::ZouHeHorizontal<true>,encode::Sycl<saw::encode::Native>> flow_in{ + [&](){ + uint64_t target_t_i = 128u; + if(t_i.get() < target_t_i){ + return 1.0 + (0.001 / target_t_i) * t_i.get(); + } + return 1.001; + }() + }; component<T,Desc,cmpt::ZouHeHorizontal<false>,encode::Sycl<saw::encode::Native>> flow_out{1.0}; h.parallel_for(acpp::sycl::range<Desc::D>{dim_x,dim_y}, [=](acpp::sycl::id<Desc::D> idx){ @@ -236,7 +244,7 @@ saw::error_or<void> lbm_main(int argc, char** argv){ } } sycl_q.wait(); - saw::data<sch::UInt64> time_steps{256ul}; + saw::data<sch::UInt64> time_steps{512ul}; for(saw::data<sch::UInt64> i{0u}; i < time_steps; ++i){ { |
