Hi!
I'm in the design phase of a particle system simulator.
It will use some low order time integration on CPU.
The data structure for the particle list is inspired by how they do it in Ogre3D, i.e a pool of (pointers to) particles with an "active particles" list.
Now the problem. In the papers I have read (e.g SIGGRAPH01, notesc, Witkin et. al.), in preparation for the system to be advanced in time by the ode solver, they build a state vector, x(t), with positions and velocities for the particles.
This state vector is sent to the solver and output from the solver is a result state vector, x(t+dt), which is scattered into the corresponding particles.
This method involves a lot of transfer of data and allocation of extra memory for the state vectors.
An alternative is to directly loop over the particles and apply the solver on each particle at a time (after having accumulated all the forces).
Can anyone tell me the benefit of the first approach, and also, can you tell me which method is more common?
I will do this in a serial way, i.e not parallelized.
Edit: I will look for particle system simulations today, researching different solutions. If you know a good library with source please tell! (I don't look for GPU solutions like nVidias nbodies at the moment.)
Particle System on CPU, assemble and scatter state vector?
-
- Posts: 1
- Joined: Tue Aug 31, 2010 6:24 am