#include <Cell.h>
Public Member Functions | |
| Cell () | |
| Constructor. | |
| virtual | ~Cell () |
| Destructor. | |
| virtual Cell * | Clone () |
| Smart copy function. | |
| virtual void | Clear () |
| Clears the cell memory space (contents, neighbors, ghosts). | |
| virtual void | ClearContents () |
| Clears the contents of teh cell. | |
| virtual void | Print (std::ostream &os) |
| Prints the contents of the cell. | |
| virtual void | Insert (ObjectInCellList *) |
| Inserts an object at the back of the cell. | |
| virtual void | Remove (ObjectInCellList *) |
| Removes an object from the cell. | |
| int | GetNumberOfObjects () |
| Returns the number of objects in the cell. | |
| ObjectInCellList * | operator[] (int) |
| Indexing operator. | |
| ObjectInCellList * | GetObject (int) |
| Gets the object at index "i". | |
| void | AddNeighbor (Cell *) |
| Add a neighboring cell to the list of neighbors. | |
| int | GetNumberOfNeighbors () |
| Returns the number of neighboring cells. | |
| Cell * | GetNeighbor (int) |
| Returns a pointer to a neighboring cell at index "i". | |
| bool | IsBoundaryCell () const |
| Returns whether or not the cell is on the boundary of the box. | |
| void | SetSequencer (int) |
| Sets the sequencer, which is like a cell id. | |
| int | GetSequencer () |
| Returns the sequencer. | |
| void | SetParentCellList (CellList *) |
| Set a pointer to the CellList containing the cell. | |
| void | SetBoundaryMultiplier (glotz_vec &) |
| Sets the boundary conditions factor. | |
| void | SetIsBoundaryCell (bool) |
| Indicates whether the cell is a boundary cel. | |
Static Public Member Functions | |
| static void | InitializeStaticVariables () |
| Initializes all static member variables. | |
Public Attributes | |
| std::vector< Cell * > | xNeighbor |
| List containing the neighboring cells of a cell. | |
| std::vector < ObjectInCellList * > | xObject |
| A container to hold the objects in the cell. | |
Protected Attributes | |
| std::map< int, int > | mIndexOf |
| glotz_vec | mBoundaryMultiplier |
| Index of an object in the cell. | |
| int | mSequencer |
| An integer indicating the cell-id. | |
| bool | mIsBoundaryCell |
| Indicates whether or not the cell is on the boundary of the box. | |
Private Attributes | |
| CellList * | mParentCellList |
| A pointer to the CellList containing the cell. | |
Friends | |
| glotz_vec | compute_boundary_correction (const Cell *, const Cell *) |
| Special function to get the boundary conditions correction for two cells. | |
Cell represents one cell in class CellList, which contains and manages many Cells
| glotzopt::Cell::Cell | ( | ) |
Constructor.
| glotzopt::Cell::~Cell | ( | ) | [virtual] |
Destructor.
| Cell * glotzopt::Cell::Clone | ( | ) | [virtual] |
Smart copy function.
| void glotzopt::Cell::Clear | ( | ) | [virtual] |
Clears the cell memory space (contents, neighbors, ghosts).
Clears the contents of the cell and the cell neighbors.
| void glotzopt::Cell::ClearContents | ( | ) | [virtual] |
Clears the contents of teh cell.
Clears the contents of the cells only (i.e., all objects contained in the cell).
| void glotzopt::Cell::Print | ( | std::ostream & | os | ) | [virtual] |
Prints the contents of the cell.
| os | is the output stream that is printed to |
| void glotzopt::Cell::Insert | ( | ObjectInCellList * | object | ) | [virtual] |
Inserts an object at the back of the cell.
| object | is the object to be inserted |
| void glotzopt::Cell::Remove | ( | ObjectInCellList * | object | ) | [virtual] |
Removes an object from the cell.
| object | is the object to be removed |
| int glotzopt::Cell::GetNumberOfObjects | ( | ) |
Returns the number of objects in the cell.
| ObjectInCellList * glotzopt::Cell::operator[] | ( | int | i | ) |
Indexing operator.
Returns the "i"th object contained in the cell
| i | is the index of the object to be returned |
| ObjectInCellList * glotzopt::Cell::GetObject | ( | int | i | ) |
Gets the object at index "i".
Returns the "i"th object contained in the cell
| i | is the index of the object to be returned |
| void glotzopt::Cell::AddNeighbor | ( | Cell * | nbr | ) |
Add a neighboring cell to the list of neighbors.
| nbr | is a pointer to the cell to be added to the neighbor list of current cell |
| int glotzopt::Cell::GetNumberOfNeighbors | ( | ) |
Returns the number of neighboring cells.
| Cell * glotzopt::Cell::GetNeighbor | ( | int | i | ) |
Returns a pointer to a neighboring cell at index "i".
Returns the index of the cell neighbor at position "i" in xNeighbor array
| i | is the index of the cell neighbor in xNeighbor array |
| bool glotzopt::Cell::IsBoundaryCell | ( | ) | const |
Returns whether or not the cell is on the boundary of the box.
| void glotzopt::Cell::SetSequencer | ( | int | number | ) |
Sets the sequencer, which is like a cell id.
is the integer value of the seqencer
| int glotzopt::Cell::GetSequencer | ( | ) |
Returns the sequencer.
| void glotzopt::Cell::SetParentCellList | ( | CellList * | cellList | ) |
Set a pointer to the CellList containing the cell.
| cellList | is the parent cell list containing the cell |
| static void glotzopt::Cell::InitializeStaticVariables | ( | ) | [static] |
Initializes all static member variables.
| void glotzopt::Cell::SetBoundaryMultiplier | ( | glotz_vec & | pbc | ) |
Sets the boundary conditions factor.
is a vector that, when multiplied by the box size, gives the periodic boundary conditions
| void glotzopt::Cell::SetIsBoundaryCell | ( | bool | val | ) |
Indicates whether the cell is a boundary cel.
is a boolean value indicating whether or not the cell is a boundary cell
Special function to get the boundary conditions correction for two cells.
| std::vector<Cell*> glotzopt::Cell::xNeighbor |
List containing the neighboring cells of a cell.
| std::vector<ObjectInCellList*> glotzopt::Cell::xObject |
A container to hold the objects in the cell.
std::map<int, int> glotzopt::Cell::mIndexOf [protected] |
glotz_vec glotzopt::Cell::mBoundaryMultiplier [protected] |
Index of an object in the cell.
When multiplied by the box size this variable gives the boundary correction
int glotzopt::Cell::mSequencer [protected] |
An integer indicating the cell-id.
bool glotzopt::Cell::mIsBoundaryCell [protected] |
Indicates whether or not the cell is on the boundary of the box.
CellList* glotzopt::Cell::mParentCellList [private] |
A pointer to the CellList containing the cell.
1.5.3