Project

General

Profile

Task #685641

move force flags/signals/logic in separate class

Added by Daniel Kirchner 5 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

At the moment the force computation is governed by a set of flags in particle (force_zero_, force_dirty_, aux_dirty_, aux_enabled_) and signals (on_prepend_force_, on_force_, on_append_force_). An update function is passed to the
force-related particle-arrays that binds the parent particle instance and calls update_force_ when needed.

A potentially cleaner implementation would move this force-related module to a separate class of which particle creates
an instance on construction. This separate class would then be passed to the force-related particle arrays instead of the
update function.

In the future this new separate class could be used to implement more complex interactions with the force modules.

Also available in: Atom PDF