MaMiCo 1.2
|
provides access to the coupling cells. Base class for the class coupling::datastructures::LinkedCellContainer More...
#include <CellContainer.h>
Classes | |
class | Iterator |
Provides iterator functionality (increment, access as <*cell, index> pair, equality) More... | |
Public Member Functions | |
CellContainer (std::vector< coupling::datastructures::CouplingCell< dim > * > couplingCells) | |
coupling::datastructures::CouplingCell< dim > * | operator[] (CellIndexT index) const |
void | operator<< (coupling::datastructures::CouplingCell< dim > *couplingCell) |
unsigned int | size () const |
Iterator | begin () const |
Iterator | end () const |
Protected Attributes | |
std::vector< coupling::datastructures::CouplingCell< dim > * > | _couplingCells |
provides access to the coupling cells. Base class for the class coupling::datastructures::LinkedCellContainer
The CellContainer is intended to be used for a fixed indexing domain. Once created, it is assumed to hold all cells in that domain. For example, a CellContainer created with template parameter I02 is expected to contain all cells that are accessible by iterating through I02. CellContainers do not capture relevant cells automatically. It is the responsibility of the calling function to allocate the cells and populate the container completely before using it. Due to this complete and contiguous nature of the datastructure, direct indexing is allowed, and the cell container is expected to start at location 0 of the indexing domain it was initialized with. CellContainers contain pointers to coupling cells, the cells are not owned by the container, hence the calling function must delete the cells later.
dim | Number of dimensions; it can be 1, 2 or 3 |
|
inline |
Provides pointer to beginning of iterator of this container
|
inline |
Provides pointer to end of iterator of this container
|
inline |
Adds a new coupling cell to the datastructure at the next index (will only work if the data structure is not yet full)
cell | a pointer to the cell to be inserted |
|
inline |
Index based access, returns a pointer to the coupling cell
index | index An index of type CellIndexT i.e. from the initializing subdomain |
|
inline |
Returns size of the underlying container.
This size is notably not the number of cells in the index domain. However, in practice the two numbers should be identical, as accessing contents of an incomplete cotnainer is not allowed.
|
protected |
Holds pointers to all coupling cells. This is used for interfacing to send-recv operations.