#include <WntConcentration.hpp>
Public Member Functions | |
virtual | ~WntConcentration () |
double | GetWntLevel (double height) |
double | GetWntLevel (TissueCell *pCell) |
c_vector< double, 2 > | GetWntGradient (c_vector< double, 2 > location) |
c_vector< double, 2 > | GetWntGradient (TissueCell *pCell) |
void | SetTissue (AbstractTissue< 2 > &rTissue) |
WntConcentrationType | GetType () |
void | SetType (WntConcentrationType type) |
void | SetConstantWntValueForTesting (double value) |
bool | IsWntSetUp () |
Static Public Member Functions | |
static WntConcentration * | Instance () |
static void | Destroy () |
Protected Member Functions | |
WntConcentration () | |
Private Member Functions | |
template<class Archive> | |
void | serialize (Archive &archive, const unsigned int version) |
Private Attributes | |
CancerParameters * | mpCancerParams |
WntConcentrationType | mWntType |
AbstractTissue< 2 > * | mpTissue |
bool | mTypeSet |
double | mConstantWntValueForTesting |
bool | mUseConstantWntValueForTesting |
Static Private Attributes | |
static WntConcentration * | mpInstance = NULL |
Friends | |
class | boost::serialization::access |
Definition at line 58 of file WntConcentration.hpp.
WntConcentration::WntConcentration | ( | ) | [protected] |
Protected constuctor. Not to be called, use Instance() instead.
Definition at line 45 of file WntConcentration.cpp.
References mpInstance.
WntConcentration::~WntConcentration | ( | ) | [virtual] |
Destructor - frees up the singleton instance.
Definition at line 57 of file WntConcentration.cpp.
void WntConcentration::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Archive the object and its member variables.
archive | ||
version |
Definition at line 106 of file WntConcentration.hpp.
References CancerParameters::Instance(), mConstantWntValueForTesting, mpCancerParams, mpTissue, mTypeSet, mUseConstantWntValueForTesting, and mWntType.
WntConcentration * WntConcentration::Instance | ( | ) | [static] |
Return a pointer to the WntConcentration object. The first time this is called, the object is created.
Definition at line 35 of file WntConcentration.cpp.
References mpInstance.
Referenced by CryptSimulation2d::ApplyTissueBoundaryConditions(), WntCellCycleModel::Initialise(), IngeWntSwatCellCycleModel::Initialise(), SimpleWntCellCycleModel::InitialiseDaughterCell(), TissueSimulationArchiver< DIM, SIM >::Load(), TissueSimulationArchiver< DIM, SIM >::Save(), WntCellCycleModel::SolveOdeToTime(), IngeWntSwatCellCycleModel::SolveOdeToTime(), and SimpleWntCellCycleModel::UpdateCellCyclePhase().
void WntConcentration::Destroy | ( | ) | [static] |
Destroy the current WntConcentration instance. Should be called at the end of a simulation.
Definition at line 62 of file WntConcentration.cpp.
References mpInstance.
Referenced by CryptSimulation2d::ApplyTissueBoundaryConditions().
double WntConcentration::GetWntLevel | ( | double | height | ) |
Get the Wnt level at a given height in the crypt. Note the CancerParameters::CryptLength() is used for this.
height | the height of the cell at which we want the Wnt concentration |
Definition at line 138 of file WntConcentration.cpp.
References CancerParameters::GetCryptLength(), CancerParameters::GetTopOfLinearWntConcentration(), mpCancerParams, and mWntType.
Referenced by GetWntLevel(), WntCellCycleModel::SolveOdeToTime(), IngeWntSwatCellCycleModel::SolveOdeToTime(), and SimpleWntCellCycleModel::UpdateCellCyclePhase().
double WntConcentration::GetWntLevel | ( | TissueCell * | pCell | ) |
Get the Wnt level at a given cell in the crypt. The crypt must be set for this. Note the CancerParameters::CryptLength() is used for this.
pCell | pointer to the cell at which we want the Wnt concentration |
Definition at line 72 of file WntConcentration.cpp.
References CancerParameters::GetCryptProjectionParameterA(), CancerParameters::GetCryptProjectionParameterB(), AbstractTissue< DIM >::GetLocationOfCellCentre(), GetWntLevel(), CancerParameters::Instance(), mConstantWntValueForTesting, mpTissue, mTypeSet, mUseConstantWntValueForTesting, and mWntType.
c_vector< double, 2 > WntConcentration::GetWntGradient | ( | c_vector< double, 2 > | location | ) |
Get the Wnt gradient at a given location in the crypt. Note the CancerParameters::CryptLength() is used for this.
location | the location at which we want the Wnt gradient |
Definition at line 169 of file WntConcentration.cpp.
References CancerParameters::GetCryptLength(), CancerParameters::GetCryptProjectionParameterA(), CancerParameters::GetCryptProjectionParameterB(), CancerParameters::GetTopOfLinearWntConcentration(), CancerParameters::Instance(), mpCancerParams, and mWntType.
Referenced by GetWntGradient().
c_vector< double, 2 > WntConcentration::GetWntGradient | ( | TissueCell * | pCell | ) |
Get the Wnt gradient at a given cell in the crypt. The crypt must be set for this. Note the CancerParameters::CryptLength() is used for this.
pCell | pointer to the cell at which we want the Wnt gradient |
Definition at line 99 of file WntConcentration.cpp.
References AbstractTissue< DIM >::GetLocationOfCellCentre(), GetWntGradient(), mpTissue, mTypeSet, and mUseConstantWntValueForTesting.
void WntConcentration::SetTissue | ( | AbstractTissue< 2 > & | rTissue | ) |
Set the crypt. Must be called before GetWntLevel().
rTissue | reference to the tissue |
Definition at line 115 of file WntConcentration.cpp.
References mpTissue.
WntConcentrationType WntConcentration::GetType | ( | ) |
Get the type of Wnt concentration.
Definition at line 121 of file WntConcentration.cpp.
References mWntType.
Referenced by SimpleWntCellCycleModel::UpdateCellCyclePhase().
void WntConcentration::SetType | ( | WntConcentrationType | type | ) |
Set the type of Wnt concentration. Must be called before GetWntLevel().
type | the type of Wnt concentration |
Definition at line 127 of file WntConcentration.cpp.
void WntConcentration::SetConstantWntValueForTesting | ( | double | value | ) |
Force the Wnt concentration to return a given value for all cells. Only for testing.
value | the constant value to set the Wnt concentration to be |
Definition at line 218 of file WntConcentration.cpp.
References mConstantWntValueForTesting, mTypeSet, mUseConstantWntValueForTesting, and mWntType.
bool WntConcentration::IsWntSetUp | ( | ) |
Whether a Wnt concentration has been set up.
For archiving, and to let a TissueSimulation find out whether whether a WntConcentration has been set up or not, i.e. whether stem cells should be motile.
Definition at line 207 of file WntConcentration.cpp.
References mpTissue, mTypeSet, and mWntType.
Referenced by CryptSimulation2d::ApplyTissueBoundaryConditions(), and TissueSimulationArchiver< DIM, SIM >::Save().
friend class boost::serialization::access [friend] |
Needed for serialization.
Definition at line 98 of file WntConcentration.hpp.
WntConcentration * WntConcentration::mpInstance = NULL [static, private] |
Pointer to the singleton instance of WntConcentration
Pointer to the single instance
Definition at line 63 of file WntConcentration.hpp.
Referenced by Destroy(), Instance(), and WntConcentration().
CancerParameters* WntConcentration::mpCancerParams [private] |
The cancer parameters
Definition at line 66 of file WntConcentration.hpp.
Referenced by GetWntGradient(), GetWntLevel(), and serialize().
WntConcentrationType WntConcentration::mWntType [private] |
The type of WntConcentration current options are NONE - returns zero everywhere LINEAR - decreases from 1 to zero at height specified by CancerParameters::mTopOfLinearWntConcentration RADIAL - decreases from 1 to zero at height specified by CancerParameters::mTopOfLinearWntConcentration
Definition at line 74 of file WntConcentration.hpp.
Referenced by GetType(), GetWntGradient(), GetWntLevel(), IsWntSetUp(), serialize(), SetConstantWntValueForTesting(), and SetType().
AbstractTissue<2>* WntConcentration::mpTissue [private] |
The tissue in which the WntConcentration occurs.
Definition at line 79 of file WntConcentration.hpp.
Referenced by GetWntGradient(), GetWntLevel(), IsWntSetUp(), serialize(), and SetTissue().
bool WntConcentration::mTypeSet [private] |
Whether this WntConcentration object has had its type set.
Definition at line 84 of file WntConcentration.hpp.
Referenced by GetWntGradient(), GetWntLevel(), IsWntSetUp(), serialize(), SetConstantWntValueForTesting(), and SetType().
double WntConcentration::mConstantWntValueForTesting [private] |
A value to return for testing purposes.
Definition at line 89 of file WntConcentration.hpp.
Referenced by GetWntLevel(), serialize(), and SetConstantWntValueForTesting().
bool WntConcentration::mUseConstantWntValueForTesting [private] |
Whether to return the testing value (when false WntConcentration works with Tissue).
Definition at line 95 of file WntConcentration.hpp.
Referenced by GetWntGradient(), GetWntLevel(), serialize(), and SetConstantWntValueForTesting().