summaryrefslogtreecommitdiff
path: root/c++/particle
diff options
context:
space:
mode:
Diffstat (limited to 'c++/particle')
-rw-r--r--c++/particle/geometry/circle.hpp2
-rw-r--r--c++/particle/particle.hpp16
2 files changed, 15 insertions, 3 deletions
diff --git a/c++/particle/geometry/circle.hpp b/c++/particle/geometry/circle.hpp
index e7b78f1..77fa9d8 100644
--- a/c++/particle/geometry/circle.hpp
+++ b/c++/particle/geometry/circle.hpp
@@ -12,7 +12,7 @@ public:
particle_circle_geometry()
{}
- template<typename MT>
+ template<typename MT = T>
saw::data<sch::ParticleMask<MT,2>> generate_mask(uint64_t resolution, uint64_t boundary_nodes = 0) const {
saw::data<sch::ParticleMask<MT,2>> mask;
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.
*/