From eeb01452fe46fcb5efdc9c34b660305262097ca4 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Wed, 10 Dec 2025 11:26:13 +0100 Subject: Dangling changes --- lib/core/tests/particles.cpp | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'lib/core/tests') diff --git a/lib/core/tests/particles.cpp b/lib/core/tests/particles.cpp index 277a8d0..60cdc14 100644 --- a/lib/core/tests/particles.cpp +++ b/lib/core/tests/particles.cpp @@ -10,6 +10,25 @@ using namespace kel::lbm::sch; using T = Float64; } +SAW_TEST("Verlet step"){ + using namespace kel; + + + saw::data> particle; + auto& body = particle.template get<"rigid_body">(); + auto& pos = body.template get<"position">(); + auto& pos_old = body.template get<"position_old">(); + + // auto& rot = body.template get<"rotation">(); + auto& acc = body.template get<"acceleration">(); + + acc.at({{0}}).set({1.0}); + + lbm::verlet_step_lambda(particle,{0.5}); + + SAW_EXPECT(pos.at({{0}}).get() == 0.25, std::string{"Incorrect Pos X: "} + std::to_string(pos.at({{0}}).get())); + SAW_EXPECT(pos.at({{1}}).get() == 0.0, std::string{"Incorrect Pos Y: "} + std::to_string(pos.at({{1}}).get())); +} /* SAW_TEST("Minor Test for mask"){ using namespace kel; @@ -31,8 +50,9 @@ SAW_TEST("Minor Test for mask"){ //saw::data> reference_mask{{{4+2,4+2}}}; //reference_mask.at({{0,0}}); } - -SAW_TEST("Verlet integration test"){ +*/ +/* +SAW_TEST("Verlet integration test 2D"){ using namespace kel; lbm::particle_system> system; @@ -79,7 +99,6 @@ SAW_TEST("Verlet integration test"){ } } - } */ } -- cgit v1.2.3