SBSNeighborSearchParticleSystemGrid Class Reference

This class describes a grid-based neighbor search algorithm that can be applied to particle systems.

Protected Attributes

SBHashMap< std::pair< unsigned int, unsigned int >, bool > * neighborMap
 Hashmap which caches whether two particles are neighbors.
 
SBHashMap< GridKey, GridCell *, GridKeyFunctor, GridKeyComparator > * grid
 
SBVector< GridKey > * gridKeyVector
 
- Protected Attributes inherited from SBSNeighborSearchParticleSystem
SBQuantity::squareLengthcutoffDistanceSquared
 
SBQuantity::inverseLengthinverseCutoffDistance
 
SBPointer< SBParticleSystem > * particleSystem
 The particle system the neighbor search algorithm is attached to.
 
SBBuffer< SBVector< SBStructuralParticle * > * > * neighborVectorBuffer
 The buffer containing the neighbor lists associated to each particle.
 
- Protected Attributes inherited from SBCReferenceTarget
SBCReferenceTargetData * dataPointer
 

Destructor

 SBSNeighborSearchParticleSystemGrid (SBParticleSystem *, const SBQuantity::length &cutoffDistance)
 
virtual ~SBSNeighborSearchParticleSystemGrid ()
 

Neighbor lists

virtual void initializeNeighborLists ()
 
virtual void updateNeighborLists ()
 

Neighbor search

virtual bool areNeighbors (unsigned int i, unsigned int j) const
 Returns whether particles with indices i and j are neighbors.
 
virtual bool areNeighbors (SBStructuralParticle *structuralParticleI, SBStructuralParticle *structuralParticleJ) const
 Returns whether structural particles structuralParticleI and structuralParticleJ are neighbors.
 
virtual void getNeighbors (SBVector< SBStructuralParticle *> &neighborVector, const SBPosition3 &position, const SBQuantity::length &radius) const
 Appends to neighborVector all structural particles that are at a distance smaller than or equal to radius from the specified position.
 
virtual void getNeighbors (SBVector< SBStructuralParticle *> &neighborVector, const SBIAPosition3 &box) const
 Appends to neighborVector all structural particles inside the box.
 

Event handling

void onDynamicalEvent (SBDynamicalEvent *dynamicalEvent)
 

Debugging

virtual void print (unsigned int offset=0) const
 

Additional Inherited Members

- Public Member Functions inherited from SBSNeighborSearchParticleSystem
virtual ~SBSNeighborSearchParticleSystem ()
 
SBVector< SBStructuralParticle * > const * getNeighborVector (unsigned int i)
 
void onDynamicalEvent (SBDynamicalEvent *dynamicalEvent)
 
- Public Member Functions inherited from SBCReferenceTarget
 SBCReferenceTarget ()
 
virtual ~SBCReferenceTarget ()
 
unsigned int getMemoryFootprint () const
 
void printReferencesToOwners () const
 
- Protected Member Functions inherited from SBSNeighborSearchParticleSystem
 SBSNeighborSearchParticleSystem (SBParticleSystem *, const SBQuantity::length &cutoffDistance)
 
- Protected Member Functions inherited from SBCReferenceTarget
void removeAllReferenceOwners ()
 
 SBCReferenceTarget (SBCReferenceTargetData *dataPointer)