homeresearchrépétitions
Algorithms for particle-based simulation

Particle-based simulation

"Particle-based simulation" is a generic term used to designate any type of simulation in which the solution process involves keeping track of moving discrete points (or particles) in space. This includes mesh-free Lagrangian approaches such as smoothed particle hydrodynamics as well as discrete element method and N-body simulation.

Our objective is to develop computationally efficient algorithms for determining the interaction status of each pair of particles: whether the position and properties of one of them has an impact on the dynamics of the other at a given time.

More precisely, if we can define a finite "interaction volume" for a particle A such that the dynamics of any particle B outside this volume will not be affected by A, then we can efficiently generate an accordingly reduced subset of particle pairs that may lead to an interaction.

Linear kd-trees

Geometrically, our method is a space partitioning technique based on a specific class of kd-trees. The key aspect of the implementation is the particular representation of the tree as a linear associative array, sharing some basic concepts with linear octrees.

A description of the algorithm: technical report (older version)

See our downloads section for library source code. See the bechmarks and videos section for some numerical results and visualizations.

ChangeLog

2010.03.07
Benchmarks A carefully tuned grid can outperform a linear kd-tree by a speed factor 3:1 on most dynamic simulations.
2009.09.16
bsr Implemented first_bit() using x86 bsr instructions. 7% overall gain approx.
2009.08.26
DEM test Third discrete elements test (dem02).
2009.08.25
DEM test Changed source structure: benchmarks and rendering are now in separate directories. DEM parameters now use dedicated argument handling. Second discrete elements test (dem01: mini dam break).
2009.08.19
DEM First test with discrete elements (dem00).
2009.08.12
Benchmarks Added malloc() statistics. Used them in more i7-975 benchmark.
2009.08.03
Snapshot update Put latest snapshot online (adds KDTREE_INDEXED_{ENTRIES|PAIRS} feature)
2009.07.17
i7 benchmarks Partial benchmark results on an i7 quand core HT, 12GB Ram. Up to 20M elements.
2009.07.16
Preprint Preprint v1 online.
2009.06.15
Enhancements
  • enhanced quicksort with insertion sort
  • merge kdtree.c and space.c with pool.c? 0.3% gain. Not adopted.
  • option KDTREE_ENTRIES_IS_UNSIGNED added
  • added const in many different places
  • (TODO?) Try pointers in pair list
  • (TODO?) move support for array.c in pool.c

2009.06.11
Preprint Preprint-zero online.
2009.06.09
kd-tree-2 Implementation of kd-tree-2 with "unique interactions" list.
2009.06.03
Benchmarks First 5M benchmarks available.