diff options
Diffstat (limited to 'src/dynamics/solver/interaction_groups.rs')
| -rw-r--r-- | src/dynamics/solver/interaction_groups.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/dynamics/solver/interaction_groups.rs b/src/dynamics/solver/interaction_groups.rs index 0f01798..6b8de5a 100644 --- a/src/dynamics/solver/interaction_groups.rs +++ b/src/dynamics/solver/interaction_groups.rs @@ -157,6 +157,17 @@ impl InteractionGroups { } } + #[cfg(not(feature = "parallel"))] + pub fn clear(&mut self) { + #[cfg(feature = "simd-is-enabled")] + { + self.buckets.clear(); + self.body_masks.clear(); + self.grouped_interactions.clear(); + } + self.nongrouped_interactions.clear(); + } + // FIXME: there is a lot of duplicated code with group_manifolds here. // But we don't refactor just now because we may end up with distinct // grouping strategies in the future. |
