srAlmende::Space3DUnit Class Reference

#include <Space3DUnit.h>

Collaboration diagram for srAlmende::Space3DUnit:
Collaboration graph
[legend]

List of all members.

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

Space3Dspace
 The Space which these Space3DUnits occupy.
arrayProducts products
 The products are stored in an array with each product type on a fixed position.

Detailed Description

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.


Constructor & Destructor Documentation

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().

Here is the call graph for this function:


Member Function Documentation

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().

Here is the call graph for this function:

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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations

Generated on Thu Feb 4 16:32:07 2010 for Delta3D Plugin by  doxygen 1.6.1