diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-05-22 16:18:52 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-05-22 16:18:52 +0200 |
| commit | 28aa0cdc4694b5364ca4b9f35ad6106d8e2f3149 (patch) | |
| tree | ca60cea2e670904be47878cc71ce1420489e197e /lib/core/c++/particle | |
| parent | b5d8593b9a2f0f58cb228444dcd09a2c5002e039 (diff) | |
| download | libs-lbm-28aa0cdc4694b5364ca4b9f35ad6106d8e2f3149.tar.gz | |
Danglingdev
Diffstat (limited to 'lib/core/c++/particle')
| -rw-r--r-- | lib/core/c++/particle/particle.hpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/core/c++/particle/particle.hpp b/lib/core/c++/particle/particle.hpp index 5110893..938131b 100644 --- a/lib/core/c++/particle/particle.hpp +++ b/lib/core/c++/particle/particle.hpp @@ -79,7 +79,8 @@ saw::data<sch::ParticleGroup<T,D, sch::ParticleCollisionSpheroid<T,radius>>> cre mask_dims.at({i}) = mask_resolution; } saw::data<sch::Scalar<T>> mask_step; - saw::data<T> dia_d{radius*2}; + saw::data<T> rad_d{radius}; + saw::data<T> dia_d = rad_d * 2; mask_step.at({}) = dia_d / mask_resolution.template cast_to<T>(); mask = {mask_dims}; @@ -89,6 +90,16 @@ saw::data<sch::ParticleGroup<T,D, sch::ParticleCollisionSpheroid<T,radius>>> cre com.at({{i}}) = {}; } saw::data<sch::UInt64> ele_ctr{0u}; + + // Radius ^ 2 + saw::data<sch::Scalar<T>> rad_2_d; + rad_2_d.at({}) = rad_d * rad_d; + + saw::data<sch::Vector<T,D>> center; + for(uint64_t i = 0u; i < D; ++i){ + com.at({{i}}) = ; + } + iterator<D>::apply([&](const auto& index){ ++ele_ctr; |
