summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/moving_poiseulle_particles_2d_hlbm_gpu/sim.cpp10
-rw-r--r--modules/core/c++/hlbm.hpp2
2 files changed, 10 insertions, 2 deletions
diff --git a/examples/moving_poiseulle_particles_2d_hlbm_gpu/sim.cpp b/examples/moving_poiseulle_particles_2d_hlbm_gpu/sim.cpp
index 75dd666..749c951 100644
--- a/examples/moving_poiseulle_particles_2d_hlbm_gpu/sim.cpp
+++ b/examples/moving_poiseulle_particles_2d_hlbm_gpu/sim.cpp
@@ -150,6 +150,14 @@ saw::error_or<void> setup_initial_conditions(
saw::data<sch::Scalar<T>> dense;
dense.at({}) = 1.0f;
particles = create_spheroid_particle_group<T,Desc::D,1u>(rad,dense,{16u});
+ {
+ auto& rb = particles.template get<"particles">().at({0u}).template get<"rigid_body">();
+ auto& rbp = rb.template get<"position">();
+ rbp.at({0u}) = 0.25 * dim_x;
+ rbp.at({1u}) = 0.5 * dim_y;
+ auto& rbp_old = rbp;
+
+ }
return saw::make_void();
}
@@ -177,8 +185,6 @@ saw::error_or<void> step(
hlbm_one_part.apply(fields,macros,particles,index,t_i);
- // auto aabb = particle_aabb<>::cacl();
-
});
}).wait();
diff --git a/modules/core/c++/hlbm.hpp b/modules/core/c++/hlbm.hpp
index a749035..1c625bb 100644
--- a/modules/core/c++/hlbm.hpp
+++ b/modules/core/c++/hlbm.hpp
@@ -133,6 +133,8 @@ public:
auto eo_aabb = particle_aabb<typename ParticleSchema::ValueType>::calculate(part_spheroid_group,index,mvel.meta());
if(eo_aabb.is_error()){
+ std::cerr<<"Prepping error"<<std::endl;
+ std::cerr<<eo_aabb.get_error().get_category()<<std::endl;
return;
}
auto& aabb = eo_aabb.get_value();