11 #include <ddMd/neighbor/CellAtom.h> 12 #include <ddMd/chemistry/Atom.h> 13 #include <util/containers/FSArray.h> 81 static const int MaxNeighborAtom = 2000;
86 static const int MaxNCellCut = 4;
91 static const int OffSetArrayCapacity = (2*MaxNCellCut + 1)*(2*MaxNCellCut + 1) + 3;
122 void setNextCell(
Cell& nextCell);
132 const Cell* nextCellPtr()
const;
148 void setOffsetArray(OffsetArray& offsets);
153 void setIsGhostCell(
bool isGhostCell =
true);
169 void incrementCapacity();
187 void append(
Atom* atomPtr);
204 int atomCapacity()
const;
214 bool isGhostCell()
const;
230 void getNeighbors(NeighborArray& neighbors,
231 bool reverseUpdateFlag =
false)
const;
239 OffsetArray* offsetsPtr_;
278 assert(atomCapacity_ >= 0);
281 return (begin_ + atomCapacity_);
287 assert(nAtom_ < atomCapacity_);
288 begin_[nAtom_].setPtr(atomPtr);
318 {
return nextCellPtr_; }
324 {
return atomCapacity_; }
330 {
return isGhostCell_; }
Data for an atom in a CellList.
CellAtom * atomPtr(int i) const
Return a pointer to atom i.
File containing preprocessor macros for error handling.
FSArray< std::pair< int, int >, OffSetArrayCapacity > OffsetArray
An array of strips of relative ids for columns of neighboring cells.
A point particle in an MD simulation.
Parallel domain decomposition (DD) MD simulation.
void setId(int id)
Set id for this Cell.
int id() const
Get identifier for this Cell.
FSArray< CellAtom *, MaxNeighborAtom > NeighborArray
Static array for holding neighbors in a cell list.
void clear()
Reset to empty before incrementing capacity.
CellAtom * initialize(CellAtom *begin)
Associate the Cell with an array of CellAtom objects.
A fixed capacity (static) contiguous array with a variable logical size.
int nAtom() const
Number of atoms in cell.
Utility classes for scientific computation.
void incrementCapacity()
Increment the capacity counter.
int atomCapacity() const
Capacity of array segment.
bool isGhostCell() const
Is this a ghost cell?
const Cell * nextCellPtr() const
Return a pointer to neighbor cell i.
A single Cell in a CellList.
void append(Atom *atomPtr)
Append an Atom to an initialized cell.