ls1-MarDyn
ls1-MarDyn molecular dynamics code
Public Member Functions | List of all members
FullParticleCell Class Reference

FullParticleCell data structure. Renamed from ParticleCell. More...

#include <FullParticleCell.h>

Inheritance diagram for FullParticleCell:
ParticleCellBase Cell

Public Member Functions

 FullParticleCell ()
 Initialize data pointers to 0. More...
 
 ~FullParticleCell ()
 Destructor. More...
 
SingleCellIterator< FullParticleCelliterator ()
 
void deallocateAllParticles () override
 removes and deallocates all elements More...
 
bool addParticle (Molecule &particle, bool checkWhetherDuplicate=false) override
 insert a single molecule into this cell More...
 
bool isEmpty () const override
 Check if current cell contains no molecules. More...
 
bool deleteMoleculeByIndex (size_t index) override
 
int getMoleculeCount () const override
 return the number of molecules contained in this cell More...
 
CellDataSoAgetCellDataSoA ()
 Get the structure of arrays for VectorizedCellProcessor. More...
 
void preUpdateLeavingMolecules () override
 
void updateLeavingMoleculesBase (ParticleCellBase &otherCell) override
 
void postUpdateLeavingMolecules () override
 
void getRegion (double lowCorner[3], double highCorner[3], std::vector< Molecule * > &particlePtrs, bool removeFromContainer=false) override
 
void buildSoACaches () override
 
void increaseMoleculeStorage (size_t numExtraMols) override
 
virtual size_t getMoleculeVectorDynamicSize () const override
 
void moleculesAtNew (size_t i, Molecule *&multipurposePointer) override
 
void moleculesAtConstNew (size_t i, Molecule *&multipurposePointer) const override
 
bool findMoleculeByID (size_t &index, unsigned long molid) const override
 Find the index of a molecule in a cell based on its molecule ID. More...
 
- Public Member Functions inherited from ParticleCellBase
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 testPointInCell (const double point[3]) const
 
virtual bool testInBox (const Molecule &particle) const
 
virtual void prefetchForForce () const
 
unsigned long initCubicGrid (std::array< unsigned long, 3 > numMoleculesPerDimension, std::array< double, 3 > simBoxLength, Random &RNG)
 
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)
 

Additional Inherited Members

- Static Public Attributes inherited from ParticleCellBase
static CellBorderAndFlagManager _cellBorderAndFlagManager
 
- Protected Attributes inherited from Cell
unsigned long _cellIndex
 the index of a cell. On one process every index must be unique.
 

Detailed Description

FullParticleCell data structure. Renamed from ParticleCell.

Author
Martin Buchholz

A FullParticleCell represents a small cuboid area of the domain and stores a list of pointers to the molecules in that area. Depending on the actual position of the cell, it belongs to one of four different regions:

There are three boolean member variables for the last three regions.
If more than one of them is true, there must be an error in the code
If none of them is true, the cell wasn't assigned to any region yet. A cell which is completely outside shouldn't exist, as it completely useless.


(Johannes Heckl)
Also stores data for various CellProcessors.
If you add a new data member, update the _assign() method with deep copy
semantics for the new data member.
Uses the default copy constructor and the default assignment operator despite
having pointer data members. This is because these data members are not controlled
by the FullParticleCell itself, but by the various CellProcessors so FullParticleCell can not
know the proper copy semantics. This should not cause any problems because no copy
actions should be executed during CellProcessor applications.

Constructor & Destructor Documentation

◆ FullParticleCell()

FullParticleCell::FullParticleCell ( )

Initialize data pointers to 0.

Author
Johannes Heckl

◆ ~FullParticleCell()

FullParticleCell::~FullParticleCell ( )

Destructor.

Author
Johannes Heckl

Member Function Documentation

◆ addParticle()

bool FullParticleCell::addParticle ( Molecule particle,
bool  checkWhetherDuplicate = false 
)
overridevirtual

insert a single molecule into this cell

Implements ParticleCellBase.

◆ buildSoACaches()

void FullParticleCell::buildSoACaches ( )
overridevirtual

Implements ParticleCellBase.

◆ deallocateAllParticles()

void FullParticleCell::deallocateAllParticles ( )
overridevirtual

removes and deallocates all elements

Implements ParticleCellBase.

◆ deleteMoleculeByIndex()

bool FullParticleCell::deleteMoleculeByIndex ( size_t  index)
overridevirtual

Implements ParticleCellBase.

◆ findMoleculeByID()

bool FullParticleCell::findMoleculeByID ( size_t &  index,
unsigned long  molid 
) const
overridevirtual

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

Implements ParticleCellBase.

◆ getCellDataSoA()

CellDataSoA& FullParticleCell::getCellDataSoA ( )
inline

Get the structure of arrays for VectorizedCellProcessor.

Author
Johannes Heckl

◆ getMoleculeCount()

int FullParticleCell::getMoleculeCount ( ) const
overridevirtual

return the number of molecules contained in this cell

Implements ParticleCellBase.

◆ getMoleculeVectorDynamicSize()

virtual size_t FullParticleCell::getMoleculeVectorDynamicSize ( ) const
inlineoverridevirtual

Implements ParticleCellBase.

◆ getRegion()

void FullParticleCell::getRegion ( double  lowCorner[3],
double  highCorner[3],
std::vector< Molecule * > &  particlePtrs,
bool  removeFromContainer = false 
)
overridevirtual

Implements ParticleCellBase.

◆ increaseMoleculeStorage()

void FullParticleCell::increaseMoleculeStorage ( size_t  numExtraMols)
overridevirtual

Implements ParticleCellBase.

◆ isEmpty()

bool FullParticleCell::isEmpty ( ) const
overridevirtual

Check if current cell contains no molecules.

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

Implements ParticleCellBase.

◆ moleculesAtConstNew()

void FullParticleCell::moleculesAtConstNew ( size_t  i,
Molecule *&  multipurposePointer 
) const
inlineoverridevirtual

Implements ParticleCellBase.

◆ moleculesAtNew()

void FullParticleCell::moleculesAtNew ( size_t  i,
Molecule *&  multipurposePointer 
)
inlineoverridevirtual

Implements ParticleCellBase.

◆ postUpdateLeavingMolecules()

void FullParticleCell::postUpdateLeavingMolecules ( )
overridevirtual

Implements ParticleCellBase.

◆ preUpdateLeavingMolecules()

void FullParticleCell::preUpdateLeavingMolecules ( )
overridevirtual

Implements ParticleCellBase.

◆ updateLeavingMoleculesBase()

void FullParticleCell::updateLeavingMoleculesBase ( ParticleCellBase otherCell)
overridevirtual

Implements ParticleCellBase.


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