diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-12-21 20:53:50 +0100 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-12-21 20:53:50 +0100 |
| commit | b1d61c67c28a9ba4a1de834e401d97cfc9e84764 (patch) | |
| tree | f84727c98f5bd41d6937d7936272120a2821e669 /lib/core/tests/particles.dummy | |
| parent | 3077dce642f110a3e010d154a9687310ab71de43 (diff) | |
| download | libs-lbm-b1d61c67c28a9ba4a1de834e401d97cfc9e84764.tar.gz | |
Reworking some structures. adding particle tests again
Diffstat (limited to 'lib/core/tests/particles.dummy')
| -rw-r--r-- | lib/core/tests/particles.dummy | 114 |
1 files changed, 0 insertions, 114 deletions
diff --git a/lib/core/tests/particles.dummy b/lib/core/tests/particles.dummy deleted file mode 100644 index cbbeefa..0000000 --- a/lib/core/tests/particles.dummy +++ /dev/null @@ -1,114 +0,0 @@ -#include <forstio/test/suite.hpp> - -#include <iostream> -//#include "../c++/particle/geometry/circle.hpp" - - -namespace { -namespace sch { -using namespace kel::lbm::sch; - -using T = Float64; -} -SAW_TEST("Verlet step 2D - Planar"){ -/* - using namespace kel; - - - saw::data<sch::Particle<sch::T,2u>> 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<sch::T,2u>(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("Collision spheroid Test"){ - using namespace kel; - - saw::data<sch::Particle<sch::T,2u> part_a; - saw::data<sch::Particle<sch::T,2u> part_b; -} - -/* -SAW_TEST("Minor Test for mask"){ - using namespace kel; - - lbm::particle_circle_geometry<sch::T> geo; - - auto mask = geo.generate_mask<sch::T>(9u,1u); - - auto& grid = mask.template get<"grid">(); - - for(saw::data<sch::UInt64> i{0u}; i < grid.template get_dim_size<0>(); ++i){ - for(saw::data<sch::UInt64> j{0u}; j < grid.template get_dim_size<1>(); ++j){ - std::cout<<grid.at({{i,j}}).get()<<" "; - } - std::cout<<"\n"; - } - std::cout<<std::endl; - - //saw::data<sch::Array<sch::T,2>> reference_mask{{{4+2,4+2}}}; - //reference_mask.at({{0,0}}); -} -*/ -/* -SAW_TEST("Verlet integration test 2D"){ - using namespace kel; - lbm::particle_system<sch::T,2,sch::Particle<sch::T,2>> system; - - { - saw::data<sch::Particle<sch::T,2>> particle; - auto& rb = particle.template get<"rigid_body">(); - auto& acc = rb.template get<"acceleration">(); - auto& pos = rb.template get<"position">(); - auto& pos_old = rb.template get<"position_old">(); - pos = {{1e-1,1e-1}}; - pos_old = {{0.0, 0.0}}; - acc = {{0.0,-1e1}}; - - auto eov = system.add_particle(std::move(particle)); - SAW_EXPECT(eov.is_value(), "Expected no error :)"); - } - { - auto& p = system.at({0u}); - auto& rb = p.template get<"rigid_body">(); - auto& pos = rb.template get<"position">(); - - for(saw::data<sch::UInt64> i{0u}; i < saw::data<sch::UInt64>{2u}; ++i){ - std::cout<<pos.at(i).get()<<" "; - } - std::cout<<std::endl; - } - - for(uint64_t i = 0u; i < 36u; ++i){ - system.step(saw::data<sch::T>{1e-1}); - - { - auto& p = system.at({0u}); - auto& rb = p.template get<"rigid_body">(); - auto& pos = rb.template get<"position">(); - - for(saw::data<sch::UInt64> i{0u}; i < saw::data<sch::UInt64>{2u}; ++i){ - std::cout<<pos.at(i).get()<<" "; - } - std::cout<<"\n"; - - if(pos.at({1u}).get() < 0.0){ - break; - } - } - - } -} -*/ -} |
