ls1-MarDyn
ls1-MarDyn molecular dynamics code
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
ParticleCellBase Class Referenceabstract

ParticleCellBase defines the interface for cells used by the LinkedCells data structure to store molecule data. More...

#include <ParticleCellBase.h>

Inheritance diagram for ParticleCellBase:
Cell FullParticleCell ParticleCellRMM

Public Member Functions

virtual void deallocateAllParticles ()=0
 
virtual bool addParticle (Molecule &particle, bool checkWhetherDuplicate=false)=0
 Add a particle to the cell. More...
 
virtual bool isEmpty () const =0
 Check if current cell contains no molecules. More...
 
bool isNotEmpty () const
 Check if current cell contains molecules. More...
 
bool deleteMoleculeByID (unsigned long molid)
 Remove moleulce from the cell based on molecule ID. More...
 
virtual bool deleteMoleculeByIndex (size_t index)=0
 
virtual int getMoleculeCount () const =0
 
virtual void preUpdateLeavingMolecules ()=0
 
virtual void updateLeavingMoleculesBase (ParticleCellBase &otherCell)=0
 
virtual void postUpdateLeavingMolecules ()=0
 
virtual void getRegion (double lowCorner[3], double highCorner[3], std::vector< Molecule * > &particlePtrs, bool removeFromContainer=false)=0
 
virtual void buildSoACaches ()=0
 
virtual void increaseMoleculeStorage (size_t numMols)=0
 
virtual bool testPointInCell (const double point[3]) const
 
virtual bool testInBox (const Molecule &particle) const
 
virtual size_t getMoleculeVectorDynamicSize () const =0
 
virtual void prefetchForForce () const
 
unsigned long initCubicGrid (std::array< unsigned long, 3 > numMoleculesPerDimension, std::array< double, 3 > simBoxLength, Random &RNG)
 
virtual void moleculesAtNew (size_t i, Molecule *&multipurposePointer)=0
 
virtual void moleculesAtConstNew (size_t i, Molecule *&multipurposePointer) const =0
 
virtual void getLeavingMolecules (std::vector< Molecule > &appendBuffer)
 
bool isHaloCell () const final
 
bool isBoundaryCell () const final
 
bool isInnerCell () const final
 
bool isInnerMostCell () const final
 
void assignCellToHaloRegion ()
 
void assignCellToBoundaryRegion ()
 
void assignCellToInnerRegion ()
 
void assignCellToInnerMostAndInnerRegion ()
 
void skipCellFromHaloRegion ()
 
void skipCellFromBoundaryRegion ()
 
void skipCellFromInnerRegion ()
 
void skipCellFromInnerMostRegion ()
 
double getBoxMin (int d) const
 
double getBoxMax (int d) const
 
std::array< double, 3 > getBoxMinArray () const
 
std::array< double, 3 > getBoxMaxArray () const
 
void setBoxMin (const double b[3])
 
void setBoxMax (const double b[3])
 
- Public Member Functions inherited from Cell
unsigned long getCellIndex () const
 
void setCellIndex (unsigned long cellIndex)
 

Static Public Attributes

static CellBorderAndFlagManager _cellBorderAndFlagManager
 

Protected Member Functions

virtual bool findMoleculeByID (size_t &index, unsigned long molid) const =0
 Find the index of a molecule in a cell based on its molecule ID. More...
 

Additional Inherited Members

- Protected Attributes inherited from Cell
unsigned long _cellIndex
 the index of a cell. On one process every index must be unique.
 

Detailed Description

ParticleCellBase defines the interface for cells used by the LinkedCells data structure to store molecule data.

Member Function Documentation

◆ addParticle()

virtual bool ParticleCellBase::addParticle ( Molecule particle,
bool  checkWhetherDuplicate = false 
)
pure virtual

Add a particle to the cell.

Parameters
particlethe particle to be added
checkWhetherDuplicateif true, check if a molecule with the same molecule IDs already exists in the cell
Returns
true, if inserted

Implemented in FullParticleCell, and ParticleCellRMM.

◆ assignCellToBoundaryRegion()

void ParticleCellBase::assignCellToBoundaryRegion ( )
inlinevirtual

Implements Cell.

◆ assignCellToHaloRegion()

void ParticleCellBase::assignCellToHaloRegion ( )
inlinevirtual

Implements Cell.

◆ assignCellToInnerMostAndInnerRegion()

void ParticleCellBase::assignCellToInnerMostAndInnerRegion ( )
inlinevirtual

Implements Cell.

◆ assignCellToInnerRegion()

void ParticleCellBase::assignCellToInnerRegion ( )
inlinevirtual

Implements Cell.

◆ deallocateAllParticles()

virtual void ParticleCellBase::deallocateAllParticles ( )
pure virtual

Implemented in FullParticleCell.

◆ deleteMoleculeByID()

bool ParticleCellBase::deleteMoleculeByID ( unsigned long  molid)

Remove moleulce from the cell based on molecule ID.

Parameters
molidmolecule ID of the molecule to be deleted
Returns
true if molecules was deleted

◆ findMoleculeByID()

virtual bool ParticleCellBase::findMoleculeByID ( size_t &  index,
unsigned long  molid 
) const
protectedpure virtual

Find the index of a molecule in a cell based on its molecule ID.

Parameters
indexindex of the molecule in the cell data structure
molidmolecule ID of the molecule to be searched in the cell
Returns
true if molecule was found

Implemented in FullParticleCell, and ParticleCellRMM.

◆ getBoxMax()

double ParticleCellBase::getBoxMax ( int  d) const
inlinevirtual

Implements Cell.

◆ getBoxMin()

double ParticleCellBase::getBoxMin ( int  d) const
inlinevirtual

Implements Cell.

◆ getMoleculeCount()

virtual int ParticleCellBase::getMoleculeCount ( ) const
pure virtual

Implemented in FullParticleCell.

◆ isBoundaryCell()

bool ParticleCellBase::isBoundaryCell ( ) const
inlinefinalvirtual

Implements Cell.

◆ isEmpty()

virtual bool ParticleCellBase::isEmpty ( ) const
pure virtual

Check if current cell contains no molecules.

Returns
true if no molecules are in the cell, false otherwise

Implemented in FullParticleCell, and ParticleCellRMM.

◆ isHaloCell()

bool ParticleCellBase::isHaloCell ( ) const
inlinefinalvirtual

Implements Cell.

◆ isInnerCell()

bool ParticleCellBase::isInnerCell ( ) const
inlinefinalvirtual

Implements Cell.

◆ isInnerMostCell()

bool ParticleCellBase::isInnerMostCell ( ) const
inlinefinalvirtual

Implements Cell.

◆ isNotEmpty()

bool ParticleCellBase::isNotEmpty ( ) const
inline

Check if current cell contains molecules.

Returns
true if molecules are in the cell, false otherwise

◆ setBoxMax()

void ParticleCellBase::setBoxMax ( const double  b[3])
inlinevirtual

Implements Cell.

◆ setBoxMin()

void ParticleCellBase::setBoxMin ( const double  b[3])
inlinevirtual

Implements Cell.

◆ skipCellFromBoundaryRegion()

void ParticleCellBase::skipCellFromBoundaryRegion ( )
inlinevirtual

Implements Cell.

◆ skipCellFromHaloRegion()

void ParticleCellBase::skipCellFromHaloRegion ( )
inlinevirtual

Implements Cell.

◆ skipCellFromInnerMostRegion()

void ParticleCellBase::skipCellFromInnerMostRegion ( )
inlinevirtual

Implements Cell.

◆ skipCellFromInnerRegion()

void ParticleCellBase::skipCellFromInnerRegion ( )
inlinevirtual

Implements Cell.


The documentation for this class was generated from the following files: