Closed pabloalcain closed 6 years ago
We cannot add f
and a
as two different arrays, it would duplicate information.
We cannot either remove f from the particles, since it is the variable we want to actually set from outside.
I see two different choices:
f
as a parameter in the evolution (this would be, all other things the same, what LAMMS does in src/fix_nve.cpp
).a
as a property in Particles that always returns f/mass, but does not allocate anything.From a design point of view, number 2 is much neater, but implementation should be thought deeply, because we don't want to be calculating a
everytime in the evolution, rather prefetch it. It could become cumbersome when we finally implement domain decomposition.
I chose N2, but it is susceptible to changes.
Either we pass forces to the evolution or put acceleration as the property of particles.