Chaste
Build::
|
#include <BaseUnits.hpp>
Public Member Functions | |
units::quantity< unit::time > | GetReferenceTimeScale () |
units::quantity< unit::length > | GetReferenceLengthScale () |
units::quantity< unit::concentration > | GetReferenceConcentrationScale () |
void | SetReferenceTimeScale (units::quantity< unit::time > referenceTimeScale) |
void | SetReferenceLengthScale (units::quantity< unit::length > referenceLengthScale) |
void | SetReferenceConcentrationScale (units::quantity< unit::concentration > referenceConcentrationScale) |
Static Public Member Functions | |
static BaseUnits * | Instance () |
static boost::shared_ptr< BaseUnits > | SharedInstance () |
static void | Destroy () |
Protected Member Functions | |
BaseUnits () | |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Private Attributes | |
units::quantity< unit::time > | mTime |
units::quantity< unit::length > | mLength |
units::quantity< unit::concentration > | mConcentration |
Static Private Attributes | |
static boost::shared_ptr< BaseUnits > | mpInstance = boost::shared_ptr<BaseUnits>() |
Friends | |
class | boost::serialization::access |
This singleton manages base units of time and length. Its use needs some care.
The default values are Length: microns, Time: minutes, Concentration: micro Molar
After a length unit is set any features (Dimensional Chaste Point, Readers, Writers, Solvers) created after that point will use the length base unit as their reference length scale. Any already existing features won't be changed. It is better to explicitly set reference scales in a feature rather than changing this value often in a simulation.
After a time unit is set any timers depending on SimulationTime will use it as the reference time scale. Extra care should be taken if this value is changed during a simulation looping over solvers, to make sure it is changed back when needed.
Definition at line 59 of file BaseUnits.hpp.
|
protected |
Default constructor, force instantiation through factory method.
Definition at line 63 of file BaseUnits.cpp.
References mpInstance.
Referenced by Instance(), and SharedInstance().
|
static |
Destroy the current BaseUnits instance
Definition at line 102 of file BaseUnits.cpp.
References mpInstance.
Referenced by Instance(), and SharedInstance().
units::quantity< unit::concentration > BaseUnits::GetReferenceConcentrationScale | ( | ) |
Definition at line 92 of file BaseUnits.cpp.
References mConcentration.
units::quantity< unit::length > BaseUnits::GetReferenceLengthScale | ( | ) |
Definition at line 82 of file BaseUnits.cpp.
References mLength.
Referenced by OffLatticeMigrationRule< DIM >::GetDirectionsForSprouts(), VesselNetwork< DIM >::GetExtents(), and AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::SetIsotropicDiffusionConstant().
units::quantity< unit::time > BaseUnits::GetReferenceTimeScale | ( | ) |
Definition at line 72 of file BaseUnits.cpp.
References mTime.
Referenced by LQRadiotherapyCellKiller< DIM >::CheckAndLabelSingleCellForApoptosis(), AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::ComputeConstantInUSourceTerm(), LinearSteadyStateDiffusionReactionPde< ELEMENT_DIM, SPACE_DIM >::ComputeLinearInUCoeffInSourceTerm(), FiniteDifferenceSolver< DIM >::DoLinearSolve(), Owen11CaUpdateRule< DIM >::EvaluateProbability(), OffLatticeMigrationRule< DIM >::GetDirections(), OffLatticeMigrationRule< DIM >::GetDirectionsForSprouts(), Owen2011MigrationRule< DIM >::GetNeighbourMovementProbabilities(), Owen2011SproutingRule< DIM >::GetSprouts(), LatticeBasedSproutingRule< DIM >::GetSprouts(), OffLatticeSproutingRule< DIM >::GetSprouts(), AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::SetIsotropicDiffusionConstant(), FiniteDifferenceSolver< DIM >::Solve(), and GreensFunctionSolver< DIM >::Solve().
|
static |
This method is used for compatibility with Chaste serialization. In other cases it is advised to work with the shared instance.
Definition at line 53 of file BaseUnits.cpp.
References BaseUnits(), Destroy(), and mpInstance.
Referenced by LQRadiotherapyCellKiller< DIM >::CheckAndLabelSingleCellForApoptosis(), AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::ComputeConstantInUSourceTerm(), LinearSteadyStateDiffusionReactionPde< ELEMENT_DIM, SPACE_DIM >::ComputeLinearInUCoeffInSourceTerm(), FiniteDifferenceSolver< DIM >::DoLinearSolve(), Owen11CaUpdateRule< DIM >::EvaluateProbability(), OffLatticeMigrationRule< DIM >::GetDirections(), OffLatticeMigrationRule< DIM >::GetDirectionsForSprouts(), VesselNetwork< DIM >::GetExtents(), Owen2011MigrationRule< DIM >::GetNeighbourMovementProbabilities(), Owen2011SproutingRule< DIM >::GetSprouts(), LatticeBasedSproutingRule< DIM >::GetSprouts(), OffLatticeSproutingRule< DIM >::GetSprouts(), AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::SetIsotropicDiffusionConstant(), FiniteDifferenceSolver< DIM >::Solve(), GreensFunctionSolver< DIM >::Solve(), and Owen11CellPopulationGenerator< DIM >::Update().
|
inlineprivate |
Serialization of a BaseUnits object must be done with care. Do not serialize this singleton directly. Instead, serialize the object returned by GetSerializationWrapper.
archive | the archive |
version | the current version of this class |
Definition at line 155 of file BaseUnits.hpp.
References mConcentration, mLength, and mTime.
void BaseUnits::SetReferenceConcentrationScale | ( | units::quantity< unit::concentration > | referenceConcentrationScale | ) |
Sets reference concentration scale
referenceConcentrationScale | the reference concentration scale |
Definition at line 97 of file BaseUnits.cpp.
References mConcentration.
void BaseUnits::SetReferenceLengthScale | ( | units::quantity< unit::length > | referenceLengthScale | ) |
Sets reference length scale
referenceLengthScale | the reference length scale |
Definition at line 87 of file BaseUnits.cpp.
References mLength.
void BaseUnits::SetReferenceTimeScale | ( | units::quantity< unit::time > | referenceTimeScale | ) |
Sets reference time scale
referenceTimeScale | the reference time scale |
Definition at line 77 of file BaseUnits.cpp.
References mTime.
|
static |
Definition at line 43 of file BaseUnits.cpp.
References BaseUnits(), Destroy(), and mpInstance.
|
friend |
Needed for serialization.
Definition at line 144 of file BaseUnits.hpp.
|
private |
The concentration unit
Definition at line 79 of file BaseUnits.hpp.
Referenced by GetReferenceConcentrationScale(), serialize(), and SetReferenceConcentrationScale().
|
private |
The length unit
Definition at line 74 of file BaseUnits.hpp.
Referenced by GetReferenceLengthScale(), serialize(), and SetReferenceLengthScale().
A pointer to the singleton instance of this class.
Pointer to the single instance
Definition at line 64 of file BaseUnits.hpp.
Referenced by BaseUnits(), Destroy(), Instance(), and SharedInstance().
|
private |
The time unit for increments
Definition at line 69 of file BaseUnits.hpp.
Referenced by GetReferenceTimeScale(), serialize(), and SetReferenceTimeScale().