Web Analytics Made Easy - Statcounter
Skip to content

Class SBSNeighborSearchParticleSystemGrid#

ClassList > SBSNeighborSearchParticleSystemGrid

More...

  • #include <SBSNeighborSearchParticleSystemGrid.hpp>

Inherits the following classes: SBSNeighborSearchParticleSystem

Public Functions#

Type Name
SBSNeighborSearchParticleSystemGrid (SBParticleSystem * p, const SBQuantity::length & cutoffDistance)
virtual bool areNeighbors (unsigned int i, unsigned int j) override const
Returns whether atoms with indices i andj are neighbors.
virtual bool areNeighbors (SBAtom * atomI, SBAtom * atomJ) override const
Returns whether atoms atomI andatomJ are neighbors.
virtual void getNeighbors (SBVector< SBAtom * > & neighborVector, const SBPosition3 & position, const SBQuantity::length & radius) override const
Appends to neighborVector all atoms that are at a distance smaller than or equal toradius from the specifiedposition .
virtual void getNeighbors (SBVector< SBAtom * > & neighborVector, const SBIAPosition3 & box) override const
Appends to neighborVector all atoms inside thebox .
virtual void initializeNeighborLists () override
void onDynamicalEvent (SBDynamicalEvent * dynamicalEvent)
virtual void print (unsigned int offset=0) override const
Prints debugging information.
virtual void updateNeighborLists () override
virtual ~SBSNeighborSearchParticleSystemGrid ()

Public Functions inherited from SBSNeighborSearchParticleSystem#

See SBSNeighborSearchParticleSystem

Type Name
virtual bool areNeighbors (unsigned int i, unsigned int j) const
Returns whether atoms with indices i andj are neighbors.
virtual bool areNeighbors (SBAtom * atomI, SBAtom * atomJ) const
Returns whether atoms atomI andatomJ are neighbors.
SBVector< SBAtom * > const * getNeighborVector (unsigned int i)
virtual void getNeighbors (SBVector< SBAtom * > & neighborVector, const SBPosition3 & position, const SBQuantity::length & radius) const
Appends to neighborVector all atoms that are at a distance smaller than or equal toradius from the specifiedposition .
virtual void getNeighbors (SBVector< SBAtom * > & neighborVector, const SBIAPosition3 & box) const
Appends to neighborVector all atoms inside thebox .
virtual void initializeNeighborLists ()
void onDynamicalEvent (SBDynamicalEvent * dynamicalEvent)
virtual void print (unsigned int offset=0) override const
Prints debugging information.
virtual void updateNeighborLists ()
virtual ~SBSNeighborSearchParticleSystem ()

Public Functions inherited from SBSNeighborSearch#

See SBSNeighborSearch

Type Name
virtual void print (unsigned int offset=0) const
Prints debugging information.
virtual ~SBSNeighborSearch ()

Public Functions inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTarget ()
unsigned int getMemoryFootprint () const
void printReferencesToOwners () const
virtual ~SBCReferenceTarget ()

Protected Attributes#

Type Name
SBHashMap< GridKey, GridCell *, GridKeyFunctor, GridKeyComparator > * grid
SBVector< GridKey > * gridKeyVector
SBHashMap< std::pair< unsigned int, unsigned int >, bool > * neighborMap
Hashmap which caches whether two atoms are neighbors.

Protected Attributes inherited from SBSNeighborSearchParticleSystem#

See SBSNeighborSearchParticleSystem

Type Name
SBQuantity::squareLength * cutoffDistanceSquared
SBQuantity::inverseLength * inverseCutoffDistance
SBBuffer< SBVector< SBAtom * > * > * neighborVectorBuffer
The buffer containing the neighbor lists associated to each atom.
SBPointer< SBParticleSystem > * particleSystem
The particle system the neighbor search algorithm is attached to.

Protected Attributes inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTargetData * dataPointer

Protected Functions inherited from SBSNeighborSearchParticleSystem#

See SBSNeighborSearchParticleSystem

Type Name
SBSNeighborSearchParticleSystem (SBParticleSystem * p, const SBQuantity::length & cutoffDistance)

Protected Functions inherited from SBSNeighborSearch#

See SBSNeighborSearch

Type Name
SBSNeighborSearch ()

Protected Functions inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTarget (SBCReferenceTargetData * dataPointer)
void removeAllReferenceOwners ()

Detailed Description#

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

Short name: SBNeighborSearchParticleSystemGrid

Public Functions Documentation#

function SBSNeighborSearchParticleSystemGrid#

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

function areNeighbors [1/2]#

Returns whether atoms with indices i andj are neighbors.

virtual bool SBSNeighborSearchParticleSystemGrid::areNeighbors (
    unsigned int i,
    unsigned int j
) override const

Implements SBSNeighborSearchParticleSystem::areNeighbors


function areNeighbors [2/2]#

Returns whether atoms atomI andatomJ are neighbors.

virtual bool SBSNeighborSearchParticleSystemGrid::areNeighbors (
    SBAtom * atomI,
    SBAtom * atomJ
) override const

Implements SBSNeighborSearchParticleSystem::areNeighbors


function getNeighbors [1/2]#

Appends to neighborVector all atoms that are at a distance smaller than or equal toradius from the specifiedposition .

virtual void SBSNeighborSearchParticleSystemGrid::getNeighbors (
    SBVector< SBAtom * > & neighborVector,
    const SBPosition3 & position,
    const SBQuantity::length & radius
) override const

Implements SBSNeighborSearchParticleSystem::getNeighbors


function getNeighbors [2/2]#

Appends to neighborVector all atoms inside thebox .

virtual void SBSNeighborSearchParticleSystemGrid::getNeighbors (
    SBVector< SBAtom * > & neighborVector,
    const SBIAPosition3 & box
) override const

Implements SBSNeighborSearchParticleSystem::getNeighbors


function initializeNeighborLists#

virtual void SBSNeighborSearchParticleSystemGrid::initializeNeighborLists () override

Implements SBSNeighborSearchParticleSystem::initializeNeighborLists


function onDynamicalEvent#

void SBSNeighborSearchParticleSystemGrid::onDynamicalEvent (
    SBDynamicalEvent * dynamicalEvent
) 

function print#

Prints debugging information.

virtual void SBSNeighborSearchParticleSystemGrid::print (
    unsigned int offset=0
) override const

Implements SBSNeighborSearchParticleSystem::print


function updateNeighborLists#

virtual void SBSNeighborSearchParticleSystemGrid::updateNeighborLists () override

Implements SBSNeighborSearchParticleSystem::updateNeighborLists


function ~SBSNeighborSearchParticleSystemGrid#

virtual SBSNeighborSearchParticleSystemGrid::~SBSNeighborSearchParticleSystemGrid () 

Protected Attributes Documentation#

variable grid#

SBHashMap<GridKey, GridCell*, GridKeyFunctor, GridKeyComparator>* grid;

variable gridKeyVector#

SBVector<GridKey>* gridKeyVector;

variable neighborMap#

Hashmap which caches whether two atoms are neighbors.

SBHashMap<std::pair<unsigned int, unsigned int>, bool>* neighborMap;