diff options
Diffstat (limited to 'lib/core/c++')
| -rw-r--r-- | lib/core/c++/particle/particle.hpp | 1 | ||||
| -rw-r--r-- | lib/core/c++/particle/particle_opa.hpp | 20 |
2 files changed, 19 insertions, 2 deletions
diff --git a/lib/core/c++/particle/particle.hpp b/lib/core/c++/particle/particle.hpp index 13ed37b..8e75e5a 100644 --- a/lib/core/c++/particle/particle.hpp +++ b/lib/core/c++/particle/particle.hpp @@ -8,6 +8,7 @@ #include "schema.hpp" #include "aabb.hpp" +#include "particle_opa.hpp" namespace kel { namespace lbm { diff --git a/lib/core/c++/particle/particle_opa.hpp b/lib/core/c++/particle/particle_opa.hpp index 470c4e9..4588a55 100644 --- a/lib/core/c++/particle/particle_opa.hpp +++ b/lib/core/c++/particle/particle_opa.hpp @@ -1,6 +1,7 @@ #pragma once -#include "component.hpp" +#include "common.hpp" +#include "../component.hpp" namespace kel { namespace lbm { @@ -12,8 +13,19 @@ template<typename T, typename Descriptor, typename Encode> class component<T,Descriptor,cmpt::OneParticleAt, Encode> final { private: + saw::data<sch::Vector<T,Descriptor::D>> pos_; + saw::data<sch::Scalar<T>> rad_; + saw::data<sch::Scalar<T>> eps_; public: - component() = default; + component( + const saw::data<sch::Vector<T,Descriptor::D>> pos__, + const saw::data<sch::Scalar<T>> rad__, + const saw::data<sch::Scalar<T>> eps__ + ): + pos_{pos__}, + rad_{rad__}, + eps_{eps__} + {} template<typename MacroFieldSchema> void apply(const saw::data<MacroFieldSchema, Encode>& macros, const saw::data<sch::FixedArray<sch::UInt64,Descriptor::D>> index, saw::data<sch::UInt64> time_step) const { @@ -24,6 +36,10 @@ public: auto& porous = porous_f.at(index); + auto pos_ind = saw::math::vectorize_data(index); + + auto diff = pos_ind - pos_; + auto diff_dot = saw::math::dot(diff,diff); } }; } |
