#include <Space3DUnit.h>

Public Member Functions | |
| Space3DUnit () | |
| void | Init () |
| std::list< Space3DUnit * > | getNeighbours () |
| A cell's neighbours are returned as a list of pointers to other Space3DUnits. | |
| int | sumProductQuantities () |
Public Attributes | |
| Space3D * | space |
| The Space which these Space3DUnits occupy. | |
| arrayProducts | products |
| The products are stored in an array with each product type on a fixed position. | |
The Space3DUnit objects are created in one bunch in the Space3D::Init method with ldim as dimension parameter. This is done with boost::multi_array in the Boost library. To make using the Boost library not too complicated Location3D is not an argument for the constructor. It needs to be set separately after construction.
Definition at line 43 of file Space3DUnit.h.
| srAlmende::Space3DUnit::Space3DUnit | ( | ) |
A Space3D object contains a fixed amount of Space3DUnits. For example a space can consists out of 5x5x5 units. Not every unit need to contain a node. In the current setup it is assumed that a unit may contain maximal one node.
Definition at line 23 of file Space3DUnit.cpp.
References Init().

| std::list< Space3DUnit * > srAlmende::Space3DUnit::getNeighbours | ( | ) |
A cell's neighbours are returned as a list of pointers to other Space3DUnits.
The list of neighbours of a Space3DUnit is of size 3 for a corner, size 4 for a rim, and size 6 for all other Space3DUnits.
Definition at line 47 of file Space3DUnit.cpp.
References srAlmende::Space3D::getSpace3DUnit(), srAlmende::Space3D::radius, space, and srAlmende::Location3D::toString().

| void srAlmende::Space3DUnit::Init | ( | ) |
In the case you succeed somehow to create a Space3DUnit using not the constructor of above you have a second change with this Init routine.
Definition at line 31 of file Space3DUnit.cpp.
References products.
Referenced by Space3DUnit().
| int srAlmende::Space3DUnit::sumProductQuantities | ( | ) |
The total cell product quantity can be calculated using this routine. It can for example be used to check if diffusion does preserve the total amount of products in the entire Space3D.
Definition at line 89 of file Space3DUnit.cpp.
References products.
1.6.1