From 6aa27007996656da995088aabecc273abd97db4b Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Wed, 7 Jan 2026 17:57:52 +0100 Subject: More part collision tests --- examples/particles_gpu/particles_gpu.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'examples/particles_gpu/particles_gpu.cpp') diff --git a/examples/particles_gpu/particles_gpu.cpp b/examples/particles_gpu/particles_gpu.cpp index baae5f3..2f2d691 100644 --- a/examples/particles_gpu/particles_gpu.cpp +++ b/examples/particles_gpu/particles_gpu.cpp @@ -33,7 +33,7 @@ saw::error_or lbm_main(int argc, char** argv){ auto& p_size = part.template get<"size">(); p_size = {0.5f}; - if(j.get() % 2u == 0) acceleration.at({{1u}}) = {-9.81}; + if(j.get() % 2u == 0) acceleration.at({{1u}}) = {9.81}; pos.at({{0u}}) = {i.template cast_to()}; pos.at({{1u}}) = {j.template cast_to()}; @@ -42,11 +42,11 @@ saw::error_or lbm_main(int argc, char** argv){ } } - for(saw::data dt{0u}; dt < saw::data{1024ul*32ul}; ++dt){ + for(saw::data dt{0u}; dt < saw::data{32ul}; ++dt){ for(saw::data i{0u}; i < particles.size(); ++i){ auto& part_i = particles.at(i); - verlet_step_lambda(part_i,{1.0f}); + verlet_step_lambda(part_i,{0.05f}); } for(saw::data i{0u}; i < particles.size(); ++i){ auto& part_i = particles.at(i); @@ -59,6 +59,8 @@ saw::error_or lbm_main(int argc, char** argv){ } } } + auto& pos = particles.at({0u}).template get<"rigid_body">().template get<"position">(); + std::cout<>, saw::encode::Json> j_codec; } -- cgit v1.2.3