6.2. No Surprises
Bob: No real surprises here. Everything looks very familiar, as if it
could have been lifted straight from a previous code.
Alice: As it should, since previous codes were all written from a
3-D perspective. This is the only 3-D part in an otherwise 4-D code.
The main difference really is the way that we take a snapshot,
something that happens in methods that are part of the WorldEra
Class. Once a WorldSnapshot object has been obtained, it behaves
for all intents and purposes like a NBody object.
Bob: Can you remind me why we did not call it an NBody object then?
I see that the WorldSnapshot class is a subclass of NBody.
What's the difference?
Alice: Good question. Let's see. I believe it is mainly an alias,
a new name to remind us that we are no longer dealing with a simple
N-body system. Ah, yes, I remember now. By calling it a snapshot,
we wanted to emphasize the fact that we are conducting any dynamics
within this class.
To put it more formally, we are calculating only the right-hand side
of the equations of motion, what is often called the force calculations,
acceleration and jerk in the case of the Hermite scheme. The integration
of the left-hand side, the actual particle pushing, is done in other
classes, specifically in WorldLine, and orchestrated by World
through the intermediate class WorldEra.
Bob: So the term WorldSnaphot merely is meant to stress the modularity
of our approach, isn't it?
Alice: Yes, but `merely' is an understatement. When writing large codes,
modularity is more important than anything else.
Bob: I have heard you saying this before. Well, we'll see.