summaryrefslogtreecommitdiff
path: root/modules/core/c++
diff options
context:
space:
mode:
Diffstat (limited to 'modules/core/c++')
-rw-r--r--modules/core/c++/fplbm.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/core/c++/fplbm.hpp b/modules/core/c++/fplbm.hpp
index aefc568..b141cae 100644
--- a/modules/core/c++/fplbm.hpp
+++ b/modules/core/c++/fplbm.hpp
@@ -230,8 +230,11 @@ public:
auto& pirb_acc = pirb.template get<"acceleration">();
pirb_acc = global_force_ + force_p / (pg.template get<"total_mass">().at({}));
- for(saw::data<sch::UInt64> i{0u}; i < sub_steps; ++i){
- verlet_step_lambda<T,Descriptor::D>(pi,one / sss);
+ if(sub_steps.get() > 0u){
+ auto sss_inv = one / sss;
+ for(saw::data<sch::UInt64> i{0u}; i < sub_steps; ++i){
+ verlet_step_lambda<T,Descriptor::D>(pi,sss_inv);
+ }
}
}
};