summaryrefslogtreecommitdiff
path: root/modules/core/c++/hlbm.hpp
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-07-16 17:23:34 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-07-16 17:23:34 +0200
commit879188f7c55b4f8383002b6bf09ef32dd592ab90 (patch)
tree32e8e1c4816337fa6457f30c51ddf996e888aeb0 /modules/core/c++/hlbm.hpp
parent91f75c895fb2c344805ddcb91439b93bba0293c4 (diff)
parentbd9f266756849a7381d7a4ff575d5f1ccc6e28bb (diff)
downloadlibs-lbm-879188f7c55b4f8383002b6bf09ef32dd592ab90.tar.gz
Merge branch 'dev'
Diffstat (limited to 'modules/core/c++/hlbm.hpp')
-rw-r--r--modules/core/c++/hlbm.hpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/modules/core/c++/hlbm.hpp b/modules/core/c++/hlbm.hpp
index eccc2cd..1c625bb 100644
--- a/modules/core/c++/hlbm.hpp
+++ b/modules/core/c++/hlbm.hpp
@@ -103,16 +103,13 @@ public:
template<typename T, typename Desc, typename Encode>
class component<T, Desc, cmpt::HlbmParticle, Encode> final {
private:
+/*
template<typename CellFieldSchema, typename MacroFieldSchema, typename ParticleSchema, uint64_t i>
void apply_i(const saw::data<CellFieldSchema, Encode>& field, const saw::data<MacroFieldSchema,Encode>& macros, const saw::data<ParticleSchema,Encode>& part_groups, saw::data<sch::FixedArray<sch::UInt64,1u>> index, saw::data<sch::UInt64> time_step) const {
// if constexpr ( i < )
- }
+ }
+*/
public:
- /*
- template<typename CellFieldSchema, typename MacroFieldSchema, typename ParticleSchema, uint64_t i>
- void apply_i()
- */
-
template<typename CellFieldSchema, typename MacroFieldSchema, typename ParticleSchema>
void apply(const saw::data<CellFieldSchema, Encode>& field, const saw::data<MacroFieldSchema,Encode>& macros, const saw::data<ParticleSchema,Encode>& part_group, saw::data<sch::FixedArray<sch::UInt64,1u>> index, saw::data<sch::UInt64> time_step) const {
/// Figure out how to access the particle list
@@ -125,7 +122,7 @@ public:
auto& mvel = macros.template get<"velocity">();
{
auto& parts = part_spheroid_group.template get<"particles">();
- auto parts_size = parts.dims().at({0u});
+ auto parts_size = parts.meta().at({0u});
auto& pi = parts.at(index);
auto& pirb = pi.template get<"rigid_body">();
@@ -134,7 +131,14 @@ public:
saw::data<sch::FixedArray<sch::UInt64,Desc::D>> start;
saw::data<sch::FixedArray<sch::UInt64,Desc::D>> stop;
- auto aabb = particle_aabb<ParticleSchema>::calculate(part_spheroid_group,index,mvel.meta());
+ 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();
+
/// Ok, I iterate over the space which covers our particle? So lower bounds to upper bounds
start = aabb.template get<"a">();
stop = aabb.template get<"b">();