diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/core/c++/SConscript | 3 | ||||
| -rw-r--r-- | lib/core/c++/particle/particle.hpp | 13 |
2 files changed, 15 insertions, 1 deletions
diff --git a/lib/core/c++/SConscript b/lib/core/c++/SConscript index 85a078f..91f5b3e 100644 --- a/lib/core/c++/SConscript +++ b/lib/core/c++/SConscript @@ -18,6 +18,8 @@ core_env.headers = sorted(glob.glob(dir_path + "/*.hpp")); core_env.particle_headers = sorted(glob.glob(dir_path + "/particle/*.hpp")); core_env.particle_geometry_headers = sorted(glob.glob(dir_path + "/particle/geometry/*.hpp")); +core_env.math_headers = sorted(glob.glob(dir_path + "/math/*.hpp")); + env.sources += core_env.sources; env.headers += core_env.headers; @@ -30,3 +32,4 @@ env.Install('$prefix/lib/', env.library_static); env.Install('$prefix/include/kel/lbm/', core_env.headers); env.Install('$prefix/include/kel/lbm/particle/', core_env.particle_headers); env.Install('$prefix/include/kel/lbm/particle/geometry/', core_env.particle_geometry_headers); +env.Install('$prefix/include/kel/lbm/math/', core_env.math_headers); diff --git a/lib/core/c++/particle/particle.hpp b/lib/core/c++/particle/particle.hpp index 5110893..938131b 100644 --- a/lib/core/c++/particle/particle.hpp +++ b/lib/core/c++/particle/particle.hpp @@ -79,7 +79,8 @@ saw::data<sch::ParticleGroup<T,D, sch::ParticleCollisionSpheroid<T,radius>>> cre mask_dims.at({i}) = mask_resolution; } saw::data<sch::Scalar<T>> mask_step; - saw::data<T> dia_d{radius*2}; + saw::data<T> rad_d{radius}; + saw::data<T> dia_d = rad_d * 2; mask_step.at({}) = dia_d / mask_resolution.template cast_to<T>(); mask = {mask_dims}; @@ -89,6 +90,16 @@ saw::data<sch::ParticleGroup<T,D, sch::ParticleCollisionSpheroid<T,radius>>> cre com.at({{i}}) = {}; } saw::data<sch::UInt64> ele_ctr{0u}; + + // Radius ^ 2 + saw::data<sch::Scalar<T>> rad_2_d; + rad_2_d.at({}) = rad_d * rad_d; + + saw::data<sch::Vector<T,D>> center; + for(uint64_t i = 0u; i < D; ++i){ + com.at({{i}}) = ; + } + iterator<D>::apply([&](const auto& index){ ++ele_ctr; |
