diff options
Diffstat (limited to 'c++/particle/particle.hpp')
-rw-r--r-- | c++/particle/particle.hpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/c++/particle/particle.hpp b/c++/particle/particle.hpp index 35196ce..4aa6a0a 100644 --- a/c++/particle/particle.hpp +++ b/c++/particle/particle.hpp @@ -26,7 +26,8 @@ using ParticleMask = Struct< template<typename T, uint64_t D> using Particle = Struct< Member<ParticleRigidBody<T,D>, "rigid_body">, - Member<ParticleMask<Float32,D>, "mask"> + Member<ParticleMask<Float32,D>, "mask">, + Member<T, "size"> >; } @@ -69,9 +70,10 @@ public: return size; } + /* saw::data<sch::Particle<T,D>>& get_particle(saw::data<sch::UInt64> id){ - } + */ void step(saw::data<T> time_step_delta){ for(saw::data<sch::UInt64> i{0u}; i < particles_.size(); ++i){ @@ -82,9 +84,19 @@ public: template<typename LbmLattice> void update_particle_border(saw::data<LbmLattice>& latt){ for(auto& iter : particles_){ + auto& par = iter; + + auto& body = par.template get<"rigid_body">(); + auto& size = par.template get<"size">(); + + } } + saw::data<sch::UInt64> size() const { + return particles_.size(); + } + /** * Mostly meant for unforeseen use cases. */ |