The return of Pyticles

It’s been a while, and I’ve written some code and made some decisions. The first is to make use of python’s object oriented features , and the second is not to let efficiency concerns get in the way of clean design.

In the structure I’ve chosen, a particle object contains the positions, momenta and other properties of n particles (there is no individual particle object). Forces are also objects, and are added to particle systems – this is to allow dynamic adding of multiple forces. Each force has it’s own neighbour list – this might seem inefficient until you notice that long range forces have a much larger list (that needs updating much less often) than short range forces.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: