summaryrefslogtreecommitdiff
path: root/modules/core/c++
diff options
context:
space:
mode:
Diffstat (limited to 'modules/core/c++')
-rw-r--r--modules/core/c++/hlbm.hpp2
-rw-r--r--modules/core/c++/particle/aabb.hpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/core/c++/hlbm.hpp b/modules/core/c++/hlbm.hpp
index d57a2e7..9a89697 100644
--- a/modules/core/c++/hlbm.hpp
+++ b/modules/core/c++/hlbm.hpp
@@ -174,7 +174,7 @@ public:
uint64_t i_opp = dfi::opposite_index[i];
- saw::data<T> dfs_added = dfs.at({i}) + dfs_old_f.at(n_ind_i).at({i_opp});
+ saw::data<T> dfs_added = dfs.at({i}) - dfs_old_f.at(n_ind_i).at({i_opp});
saw::data<sch::Scalar<T>> dfs_added_v;
dfs_added_v.at({}) = dfs_added;
auto ei_dfs = e_i * dfs_added_v;
diff --git a/modules/core/c++/particle/aabb.hpp b/modules/core/c++/particle/aabb.hpp
index 1773dea..18426d5 100644
--- a/modules/core/c++/particle/aabb.hpp
+++ b/modules/core/c++/particle/aabb.hpp
@@ -35,13 +35,13 @@ public:
auto& a = aabb.template get<"a">();
auto& b = aabb.template get<"b">();
- const saw::data<sch::Scalar<T>>& rad_d = p_grp.template get<"collision">().template get<"radius">().at({0u});
+ const saw::data<sch::Scalar<T>>& rad_d = p_grp.template get<"collision">().at({0u}).template get<"radius">();
saw::data<sch::Vector<T,D>> lower;
saw::data<sch::Vector<T,D>> upper;
for(uint64_t i{0u}; i < D; ++i){
- lower.at({{i}}) = pirb_pos.at({{i}}) >= rad_d.at({}) ? (pirb_pos.at({{i}}) - rad_d.at({})) : saw::data<T>{0};
+ lower.at({{i}}) = ((pirb_pos.at({{i}}) >= rad_d.at({})) ? (pirb_pos.at({{i}}) - rad_d.at({})) : saw::data<T>{0});
a.at({i}) = lower.at({{i}}).template cast_to<sch::UInt64>();
upper.at({{i}}) = pirb_pos.at({{i}}) + rad_d.at({});
b.at({i}) = (upper.at({{i}})+saw::data<T>{1}).template cast_to<sch::UInt64>();