|
| ParticleContainer (double bBoxMin[3], double bBoxMax[3]) |
| The constructor. More...
|
|
| ParticleContainer () |
| Default constructor.
|
|
virtual | ~ParticleContainer () |
| The destructor.
|
|
virtual void | readXML (XMLfileUnits &xmlconfig)=0 |
|
virtual bool | rebuild (double bBoxMin[3], double bBoxMax[3]) |
| rebuild the datastructure More...
|
|
virtual void | update ()=0 |
| do necessary updates resulting from changed particle positions More...
|
|
virtual bool | addParticle (Molecule &particle, bool inBoxCheckedAlready=false, bool checkWhetherDuplicate=false, const bool &rebuildCaches=false)=0 |
| add a single Molecule to the ParticleContainer. More...
|
|
virtual bool | addHaloParticle (Molecule &particle, bool inBoxCheckedAlready=false, bool checkWhetherDuplicate=false, const bool &rebuildCaches=false) |
| add a single Molecule to the ParticleContainer, ensures that it is added in the halo. More...
|
|
virtual void | addParticles (std::vector< Molecule > &particles, bool checkWhetherDuplicate=false)=0 |
| adds a whole vector of particles More...
|
|
virtual void | traverseCells (CellProcessor &cellProcessor)=0 |
| traverse pairs which are close to each other More...
|
|
virtual void | traverseNonInnermostCells (CellProcessor &cellProcessor)=0 |
|
virtual void | traversePartialInnermostCells (CellProcessor &cellProcessor, unsigned int stage, int stageCount)=0 |
|
virtual ParticleIterator | iterator (ParticleIterator::Type t)=0 |
|
virtual RegionParticleIterator | regionIterator (const double startCorner[3], const double endCorner[3], ParticleIterator::Type t)=0 |
|
virtual unsigned long | getNumberOfParticles ()=0 |
|
virtual double | getBoundingBoxMin (int dimension) const |
| returns one coordinate of the lower corner of the bounding box More...
|
|
virtual bool | isInBoundingBox (double r[3]) const |
| checks, whether given coordinates are within the bounding box More...
|
|
virtual int | getHaloWidthNumCells () |
|
virtual double | getBoundingBoxMax (int dimension) const |
| returns one coordinate of the higher corner of the bounding box More...
|
|
virtual void | clear ()=0 |
| Delete all molecules in container. More...
|
|
virtual void | deleteOuterParticles ()=0 |
| delete all Particles which are not within the bounding box More...
|
|
virtual double | get_halo_L (int index) const =0 |
| returns the width of the halo stripe (for the given dimension index) More...
|
|
virtual double | getCutoff () const =0 |
|
virtual double | getSkin () const |
|
virtual void | deleteMolecule (ParticleIterator &moleculeIter, const bool &rebuildCaches)=0 |
|
virtual double | getEnergy (ParticlePairsHandler *particlePairsHandler, Molecule *m1, CellProcessor &cellProcessor)=0 |
|
virtual void | updateInnerMoleculeCaches ()=0 |
| Update the caches of the molecules, that lie in inner cells. The caches of boundary and halo cells is not updated. This method is used for a multi-step scheme of overlapping mpi communication. More...
|
|
virtual void | updateBoundaryAndHaloMoleculeCaches ()=0 |
| Update the caches of the molecules, that lie in the boundary or halo cells. The caches of boundary and halo cells is updated, the caches of the inner cells are not updated. This method is used for a multi-step scheme of overlapping mpi communication. More...
|
|
virtual void | updateMoleculeCaches ()=0 |
| Update the caches of the molecules. More...
|
|
virtual std::variant< ParticleIterator, SingleCellIterator< ParticleCell > > | getMoleculeAtPosition (const double pos[3])=0 |
| Gets a molecule by its position. More...
|
|
virtual bool | requiresForceExchange () const |
|
virtual unsigned long | initCubicGrid (std::array< unsigned long, 3 > numMoleculesPerDimension, std::array< double, 3 > simBoxLength, size_t seed_offset)=0 |
|
virtual double * | getCellLength ()=0 |
|
virtual double * | getHaloSize () |
|
virtual std::vector< unsigned long > | getParticleCellStatistics () |
|
virtual void | setCutoff (double rc) |
|
virtual std::vector< Molecule > | getInvalidParticles () |
|
virtual bool | isInvalidParticleReturner () |
|
virtual std::string | getConfigurationAsString ()=0 |
|
virtual size_t | getTotalSize ()=0 |
|
virtual void | printSubInfo (int offset)=0 |
|
virtual std::string | getName ()=0 |
|
This Interface is used to get access to particles and pairs of particles.
- Author
- Martin Buchholz
A particleContainer is used to store Particles with a short-range potential in a way that the access to pairs of neighbouring particles is efficient. Neighbouring particles are particles which have a distance shorter than a given cutoff radius. A common task when using a PariticleContainer is to do something for all particles. This can be done using the methods begin, next and end, e.g.:
for(partPtr = partContPtr->begin(); partPtr != partContPtr->end(); partPtr = partContPtr->next()){
partPtr->doSomething();
}
FullMolecule modeled as LJ sphere with point polarities.
Definition: FullMolecule.h:18
This Interface is used to get access to particles and pairs of particles.
Definition: ParticleContainer.h:69
Particles stored in this container can either belong to the local process or they can be duplicates (from neighbouring processes or periodic boundary). As the simulated regions are often cuboids, a bounding box is defined through two opposing corners (_boundingBoxMin[3] and _boundingBoxMax[3]). Particles inside this bounding box belong to this process, those outside don't. An exception to this is when particles are moved in a time step. It has to be ensured that particles which leave the bounding box are properly handled.
For non-cuboid regions, the bounding box still has to be defined as it gives an approximation for the region that is covered by the ParticleContainer.
This interface doesn't implement the datastructure, it just tells which methods a class implementing this kind of datastructure has to provide to be used by the framework. Such a class should be implemented as a subclass of this class.
virtual void ParticleContainer::traverseCells |
( |
CellProcessor & |
cellProcessor | ) |
|
|
pure virtual |
traverse pairs which are close to each other
Only interactions between particles which have a distance which is not larger than the cutoff radius are to be considered.
This method has to be implemented in derived classes Precondition: All Particles of the process + halo molecules are stored Task: Run over all pairs (Each pair exactely once!) of particles (within cutoffradius) Important: Some pairs might be "duplicated": All pairs which cross the boundary occur twice (second time at the periodic image). Those pairs are from the point of view of the datastructure two different pairs, but they both times connect the same particles. For a pair which occurs twice, it has to be made sure, that one gets the status "original pair" and the other one "duplicated pair". For each pair found, there is an action executed, but it is a different action for original and duplicated pairs. Details about how to handle pairs can be found in the documentation for the class ParticlePairsHandler
- Parameters
-
particlePairsHandler | specified concrete action to be done for each pair |
Implemented in AutoPasContainer, LinkedCells, and ParticleContainerToBasisWrapper.