#include <CellwiseData.hpp>
Public Member Functions | |
virtual | ~CellwiseData () |
double | GetValue (TissueCell &rCell, unsigned variableNumber=0) |
void | SetValue (double value, Node< DIM > *pNode, unsigned variableNumber=0) |
void | SetTissue (MeshBasedTissue< DIM > &rTissue) |
MeshBasedTissue< DIM > & | rGetTissue () |
void | SetNumNodesAndVars (unsigned numNodes, unsigned numVars) |
void | SetConstantDataForTesting (std::vector< double > &rValues) |
bool | IsSetUp () |
void | ReallocateMemory () |
Static Public Member Functions | |
static CellwiseData * | Instance () |
static void | Destroy () |
Protected Member Functions | |
CellwiseData () | |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Private Attributes | |
MeshBasedTissue< DIM > * | mpTissue |
bool | mAllocatedMemory |
unsigned | mNumberOfVariables |
std::vector< double > | mData |
std::vector< double > | mConstantDataForTesting |
bool | mUseConstantDataForTesting |
Static Private Attributes | |
static CellwiseData * | mpInstance = NULL |
Friends | |
class | TestCellwiseData |
class | boost::serialization::access |
A singleton object for storing data that certain cell cycle models need to know about, e.g. nutrient concentrations computed via some PDE for use in nutrient based cell cycle models.
Definition at line 44 of file CellwiseData.hpp.
CellwiseData< DIM >::CellwiseData | ( | ) | [inline, protected] |
Protected constuctor. Not to be called, use Instance() instead.
Definition at line 47 of file CellwiseData.cpp.
References CellwiseData< DIM >::mpInstance.
CellwiseData< DIM >::~CellwiseData | ( | ) | [inline, virtual] |
Destructor.
Definition at line 59 of file CellwiseData.cpp.
void CellwiseData< DIM >::Destroy | ( | ) | [inline, static] |
Destroy the current instance. Should be called at the end of a simulation.
Definition at line 65 of file CellwiseData.cpp.
References CellwiseData< DIM >::mpInstance.
double CellwiseData< DIM >::GetValue | ( | TissueCell & | rCell, | |
unsigned | variableNumber = 0 | |||
) | [inline] |
Get the value of CellwiseData for a given cell and variable number.
rCell | the cell | |
variableNumber | the index of CellwiseData whose value is required (defaults to zero) |
Definition at line 76 of file CellwiseData.cpp.
References CellwiseData< DIM >::IsSetUp(), CellwiseData< DIM >::mAllocatedMemory, CellwiseData< DIM >::mConstantDataForTesting, CellwiseData< DIM >::mData, CellwiseData< DIM >::mNumberOfVariables, CellwiseData< DIM >::mpTissue, and CellwiseData< DIM >::mUseConstantDataForTesting.
CellwiseData< DIM > * CellwiseData< DIM >::Instance | ( | ) | [inline, static] |
Get an instance of the object
Definition at line 36 of file CellwiseData.cpp.
References CellwiseData< DIM >::mpInstance.
bool CellwiseData< DIM >::IsSetUp | ( | ) | [inline] |
Is the instance in existence and fully set up
Definition at line 144 of file CellwiseData.cpp.
References CellwiseData< DIM >::mAllocatedMemory, CellwiseData< DIM >::mpInstance, and CellwiseData< DIM >::mpTissue.
Referenced by CellwiseData< DIM >::GetValue(), and CellwiseData< DIM >::SetValue().
void CellwiseData< DIM >::ReallocateMemory | ( | ) | [inline] |
Reallocate size of mData. Needed because of growth/death. Reallocates according to the number of nodes in the mesh in the Tissue member variable
Definition at line 151 of file CellwiseData.cpp.
References CellwiseData< DIM >::mAllocatedMemory, CellwiseData< DIM >::mData, CellwiseData< DIM >::mNumberOfVariables, and CellwiseData< DIM >::mpTissue.
MeshBasedTissue< DIM > & CellwiseData< DIM >::rGetTissue | ( | ) | [inline] |
Definition at line 118 of file CellwiseData.cpp.
References CellwiseData< DIM >::mpTissue.
void CellwiseData< DIM >::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Archive the object and its member variables.
archive | the archive | |
version | the current version of this class |
Definition at line 80 of file CellwiseData.hpp.
References CellwiseData< DIM >::mAllocatedMemory, CellwiseData< DIM >::mConstantDataForTesting, CellwiseData< DIM >::mData, CellwiseData< DIM >::mNumberOfVariables, CellwiseData< DIM >::mpTissue, and CellwiseData< DIM >::mUseConstantDataForTesting.
void CellwiseData< DIM >::SetConstantDataForTesting | ( | std::vector< double > & | rValues | ) | [inline] |
Force the data to return given values for all cells (only for testing).
rValues | vector of CellwiseData values |
Definition at line 166 of file CellwiseData.cpp.
References CellwiseData< DIM >::mConstantDataForTesting, and CellwiseData< DIM >::mUseConstantDataForTesting.
void CellwiseData< DIM >::SetNumNodesAndVars | ( | unsigned | numNodes, | |
unsigned | numVars | |||
) | [inline] |
Set the number of variables to be stored per cell. The constructor assumes 1 variable so only really needs to be called if numVars > 1.
numNodes | number of nodes in the tissue | |
numVars | number of variables |
Definition at line 125 of file CellwiseData.cpp.
References CellwiseData< DIM >::mAllocatedMemory, CellwiseData< DIM >::mData, CellwiseData< DIM >::mNumberOfVariables, and CellwiseData< DIM >::mpTissue.
void CellwiseData< DIM >::SetTissue | ( | MeshBasedTissue< DIM > & | rTissue | ) | [inline] |
Set the Tissue. Must be called before GetValue().
rTissue | reference to the Tissue |
Definition at line 106 of file CellwiseData.cpp.
References CellwiseData< DIM >::mAllocatedMemory, and CellwiseData< DIM >::mpTissue.
void CellwiseData< DIM >::SetValue | ( | double | value, | |
Node< DIM > * | pNode, | |||
unsigned | variableNumber = 0 | |||
) | [inline] |
Set the value for a given node and variable number.
value | the value to set | |
pNode | pointer to the Node | |
variableNumber | the index of CellwiseData whose value is set (defaults to zero) |
Definition at line 96 of file CellwiseData.cpp.
References Node< SPACE_DIM >::GetIndex(), CellwiseData< DIM >::IsSetUp(), CellwiseData< DIM >::mData, and CellwiseData< DIM >::mNumberOfVariables.
friend class boost::serialization::access [friend] |
Needed for serialization.
Definition at line 72 of file CellwiseData.hpp.
bool CellwiseData< DIM >::mAllocatedMemory [private] |
Allocated memory for mData object
Definition at line 57 of file CellwiseData.hpp.
Referenced by CellwiseData< DIM >::GetValue(), CellwiseData< DIM >::IsSetUp(), CellwiseData< DIM >::ReallocateMemory(), CellwiseData< DIM >::serialize(), CellwiseData< DIM >::SetNumNodesAndVars(), and CellwiseData< DIM >::SetTissue().
std::vector<double> CellwiseData< DIM >::mConstantDataForTesting [private] |
Helper member storing constant data. Used in tests.
Definition at line 66 of file CellwiseData.hpp.
Referenced by CellwiseData< DIM >::GetValue(), CellwiseData< DIM >::serialize(), and CellwiseData< DIM >::SetConstantDataForTesting().
std::vector<double> CellwiseData< DIM >::mData [private] |
Store of the data
Definition at line 63 of file CellwiseData.hpp.
Referenced by CellwiseData< DIM >::GetValue(), CellwiseData< DIM >::ReallocateMemory(), CellwiseData< DIM >::serialize(), CellwiseData< DIM >::SetNumNodesAndVars(), and CellwiseData< DIM >::SetValue().
unsigned CellwiseData< DIM >::mNumberOfVariables [private] |
Number of variables per node to be stored
Definition at line 60 of file CellwiseData.hpp.
Referenced by CellwiseData< DIM >::GetValue(), CellwiseData< DIM >::ReallocateMemory(), CellwiseData< DIM >::serialize(), CellwiseData< DIM >::SetNumNodesAndVars(), and CellwiseData< DIM >::SetValue().
CellwiseData< DIM > * CellwiseData< DIM >::mpInstance = NULL [inline, static, private] |
The single instance of the singleton object
Definition at line 51 of file CellwiseData.hpp.
Referenced by CellwiseData< DIM >::CellwiseData(), CellwiseData< DIM >::Destroy(), CellwiseData< DIM >::Instance(), and CellwiseData< DIM >::IsSetUp().
MeshBasedTissue<DIM>* CellwiseData< DIM >::mpTissue [private] |
A pointer to a Tissue so a cell's node can be found
Definition at line 54 of file CellwiseData.hpp.
Referenced by CellwiseData< DIM >::GetValue(), CellwiseData< DIM >::IsSetUp(), CellwiseData< DIM >::ReallocateMemory(), CellwiseData< DIM >::rGetTissue(), CellwiseData< DIM >::serialize(), CellwiseData< DIM >::SetNumNodesAndVars(), and CellwiseData< DIM >::SetTissue().
bool CellwiseData< DIM >::mUseConstantDataForTesting [private] |
Helper member storing whether mConstantDataForTesting is used.
Definition at line 69 of file CellwiseData.hpp.
Referenced by CellwiseData< DIM >::GetValue(), CellwiseData< DIM >::serialize(), and CellwiseData< DIM >::SetConstantDataForTesting().