Class SBSNeighborSearchParticleSystemGrid#
ClassList > SBSNeighborSearchParticleSystemGrid
#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#
Type | Name |
---|---|
virtual void | print (unsigned int offset=0) const Prints debugging information. |
virtual | ~SBSNeighborSearch () |
Public Functions inherited from 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#
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#
Type | Name |
---|---|
SBSNeighborSearch () |
Protected Functions inherited from 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#
Implements SBSNeighborSearchParticleSystem::initializeNeighborLists
function onDynamicalEvent#
function print#
Prints debugging information.
Implements SBSNeighborSearchParticleSystem::print
function updateNeighborLists#
Implements SBSNeighborSearchParticleSystem::updateNeighborLists
function ~SBSNeighborSearchParticleSystemGrid#
Protected Attributes Documentation#
variable grid#
variable gridKeyVector#
variable neighborMap#
Hashmap which caches whether two atoms are neighbors.