20#ifndef PARTICLECONTAINER_H_
21#define PARTICLECONTAINER_H_
26#include "ParticleCell.h"
27#include "ParticleIterator.h"
28#include "RegionParticleIterator.h"
29#include "io/MemoryProfiler.h"
30#include "molecules/MoleculeForwardDeclaration.h"
96 virtual bool rebuild(
double bBoxMin[3],
double bBoxMax[3]);
117 virtual bool addParticle(
Molecule& particle,
bool inBoxCheckedAlready =
false,
bool checkWhetherDuplicate =
false,
const bool& rebuildCaches=
false) = 0;
129 virtual bool addHaloParticle(
Molecule& particle,
bool inBoxCheckedAlready =
false,
bool checkWhetherDuplicate =
false,
130 const bool& rebuildCaches =
false);
134 virtual void addParticles(std::vector<Molecule>& particles,
bool checkWhetherDuplicate=
false) = 0;
156 virtual void traverseNonInnermostCells(
CellProcessor& cellProcessor) = 0;
158 virtual void traversePartialInnermostCells(
CellProcessor& cellProcessor,
unsigned int stage,
int stageCount) = 0;
161 virtual RegionParticleIterator regionIterator (
const double startCorner[3],
const double endCorner[3], ParticleIterator::Type t) = 0;
179 virtual int getHaloWidthNumCells();
198 virtual double getCutoff()
const = 0;
200 virtual double getSkin()
const {
return 0.;}
203 virtual void deleteMolecule(
ParticleIterator& moleculeIter,
const bool& rebuildCaches) = 0;
230 virtual bool requiresForceExchange()
const {
return false;}
232 virtual unsigned long initCubicGrid(std::array<unsigned long, 3> numMoleculesPerDimension, std::array<double, 3> simBoxLength,
size_t seed_offset) = 0;
234 virtual double* getCellLength() = 0;
241 return getCellLength();
256 virtual std::vector<Molecule> getInvalidParticles() {
return {}; }
258 virtual bool isInvalidParticleReturner() {
return false; }
Definition: CellProcessor.h:29
FullMolecule modeled as LJ sphere with point polarities.
Definition: FullMolecule.h:18
Definition: MemoryProfiler.h:13
This Interface is used to get access to particles and pairs of particles.
Definition: ParticleContainer.h:69
virtual ~ParticleContainer()
The destructor.
Definition: ParticleContainer.h:83
virtual void setCutoff(double rc)
Definition: ParticleContainer.h:254
virtual double get_halo_L(int index) const =0
returns the width of the halo stripe (for the given dimension index)
virtual std::vector< unsigned long > getParticleCellStatistics()
Definition: ParticleContainer.h:248
virtual double getBoundingBoxMin(int dimension) const
returns one coordinate of the lower corner of the bounding box
Definition: ParticleContainer.cpp:29
virtual std::variant< ParticleIterator, SingleCellIterator< ParticleCell > > getMoleculeAtPosition(const double pos[3])=0
Gets a molecule by its position.
virtual void traverseCells(CellProcessor &cellProcessor)=0
traverse pairs which are close to each other
virtual void updateMoleculeCaches()=0
Update the caches of the molecules.
virtual void updateInnerMoleculeCaches()=0
Update the caches of the molecules, that lie in inner cells. The caches of boundary and halo cells is...
virtual void addParticles(std::vector< Molecule > &particles, bool checkWhetherDuplicate=false)=0
adds a whole vector of particles
ParticleContainer()
Default constructor.
Definition: ParticleContainer.h:81
double _boundingBoxMin[3]
coordinates of the left, lower, front corner of the bounding box
Definition: ParticleContainer.h:274
virtual void deleteOuterParticles()=0
delete all Particles which are not within the bounding box
virtual bool rebuild(double bBoxMin[3], double bBoxMax[3])
rebuild the datastructure
Definition: ParticleContainer.cpp:16
virtual double * getHaloSize()
Definition: ParticleContainer.h:240
virtual bool isInBoundingBox(double r[3]) const
checks, whether given coordinates are within the bounding box
Definition: ParticleContainer.cpp:37
virtual void updateBoundaryAndHaloMoleculeCaches()=0
Update the caches of the molecules, that lie in the boundary or halo cells. The caches of boundary an...
virtual void update()=0
do necessary updates resulting from changed particle positions
virtual bool addParticle(Molecule &particle, bool inBoxCheckedAlready=false, bool checkWhetherDuplicate=false, const bool &rebuildCaches=false)=0
add a single Molecule to the ParticleContainer.
virtual void clear()=0
Delete all molecules in container.
virtual double getBoundingBoxMax(int dimension) const
returns one coordinate of the higher corner of the bounding box
Definition: ParticleContainer.cpp:33
virtual std::string getConfigurationAsString()=0
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.
Definition: ParticleContainer.cpp:50
virtual unsigned long getNumberOfParticles()=0
double _boundingBoxMax[3]
coordinates of the right, upper, back corner of the bounding box
Definition: ParticleContainer.h:276
Definition: ParticleIterator.h:50
interface for defining the action performed when processing a pair
Definition: ParticlePairsHandler.h:38
Definition: RegionParticleIterator.h:33
XML file with unit attributes abstraction.
Definition: xmlfileUnits.h:25
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
Definition: vtk-punstructured.h:270
Definition: FakedOptFFT.h:23