MSD to Volumetric Bodies

When we handle volumetric bodies the MSD complexity grows up. Each mass can have a variable number of neighbors, as we can see in the image below.


The object is modeled as a tetrahedral mesh, resulting in three structures:
Position of each particle in 3D space;
Neighborhood of the particles;
And the triangle mesh, that makes the surface.
The neighborhood defines the connectivity between the particles, ie the springs.
We start reading the object files and allocating memory for its structures.
When running in CPU, we do the MSD calculations and collision detection tests. For each N calculations one rendering pass is performed to minimize the graphical delay.
When running in GPU, we do de same things! The difference is that when a rendering pass is needed, the structure containing the vertexes positions is copied from the GPU memory to the system RAM, as shown in the figure below.
In the calculation step the positions are copied to an auxiliary structure, thus we can read from the copy and write right to the original structure, avoiding read after write hazards and concurrent access between the threads.

Last edited Mar 3, 2010 at 5:25 PM by Lenna, version 7


No comments yet.