#include <CryptProjectionForce.hpp>
Inherits GeneralisedLinearSpringForce< 2 >.
Public Member Functions | |
CryptProjectionForce () | |
~CryptProjectionForce () | |
double | GetA () const |
double | GetB () const |
double | GetWntChemotaxisStrength () |
void | SetWntChemotaxisStrength (double wntChemotaxisStrength) |
void | SetWntChemotaxis (bool includeWntChemotaxis) |
double | CalculateCryptSurfaceHeightAtPoint (const c_vector< double, 2 > &rNodeLocation) |
double | CalculateCryptSurfaceDerivativeAtPoint (const c_vector< double, 2 > &rNodeLocation) |
void | AddForceContribution (std::vector< c_vector< double, 2 > > &rForces, AbstractCellPopulation< 2 > &rCellPopulation) |
void | OutputForceParameters (out_stream &rParamsFile) |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
void | UpdateNode3dLocationMap (AbstractCellPopulation< 2 > &rCellPopulation) |
c_vector< double, 2 > | CalculateForceBetweenNodes (unsigned nodeAGlobalIndex, unsigned nodeBGlobalIndex, AbstractCellPopulation< 2 > &rCellPopulation) |
Private Attributes | |
double | mA |
double | mB |
bool | mIncludeWntChemotaxis |
double | mWntChemotaxisStrength |
std::map< unsigned, c_vector < double, 3 > > | mNode3dLocationMap |
Friends | |
class | TestCryptProjectionForce |
class | boost::serialization::access |
A force law for use in crypt projection simulations.
Definition at line 40 of file CryptProjectionForce.hpp.
CryptProjectionForce::CryptProjectionForce | ( | ) |
CryptProjectionForce::~CryptProjectionForce | ( | ) |
Destructor.
Definition at line 42 of file CryptProjectionForce.cpp.
void CryptProjectionForce::AddForceContribution | ( | std::vector< c_vector< double, 2 > > & | rForces, | |
AbstractCellPopulation< 2 > & | rCellPopulation | |||
) |
Overridden AddForceContribution method.
rForces | reference to vector of forces on nodes | |
rCellPopulation | reference to the cell population |
Definition at line 243 of file CryptProjectionForce.cpp.
References AbstractCellPopulation< DIM >::Begin(), CalculateForceBetweenNodes(), AbstractCellPopulation< DIM >::End(), EXCEPTION, AbstractCellPopulation< DIM >::GetLocationIndexUsingCell(), mIncludeWntChemotaxis, mWntChemotaxisStrength, MeshBasedCellPopulation< DIM >::SpringsBegin(), MeshBasedCellPopulation< DIM >::SpringsEnd(), and UpdateNode3dLocationMap().
double CryptProjectionForce::CalculateCryptSurfaceDerivativeAtPoint | ( | const c_vector< double, 2 > & | rNodeLocation | ) |
Calculates the derivative df/dr of the crypt surface function z=f(r) at a point whose 2D position is a distance r from the centre of the cell_population, which we assume to be at (0,0).
rNodeLocation | the 2D location of a node |
Definition at line 103 of file CryptProjectionForce.cpp.
Referenced by CalculateForceBetweenNodes().
double CryptProjectionForce::CalculateCryptSurfaceHeightAtPoint | ( | const c_vector< double, 2 > & | rNodeLocation | ) |
Calculates the height of the crypt surface given by z = f(r) = a*r^b at a point whose 2D position is a distance r from the centre of the cell population. This assumes that the cell population is centred at the origin.
rNodeLocation |
Definition at line 98 of file CryptProjectionForce.cpp.
Referenced by UpdateNode3dLocationMap().
c_vector< double, 2 > CryptProjectionForce::CalculateForceBetweenNodes | ( | unsigned | nodeAGlobalIndex, | |
unsigned | nodeBGlobalIndex, | |||
AbstractCellPopulation< 2 > & | rCellPopulation | |||
) | [private] |
Calculates the force between two nodes.
Note that this assumes they are connected and is called by rCalculateVelocitiesOfEachNode()
nodeAGlobalIndex | the index of the first node | |
nodeBGlobalIndex | the index of the second node | |
rCellPopulation | the cell population |
Definition at line 108 of file CryptProjectionForce.cpp.
References CalculateCryptSurfaceDerivativeAtPoint(), MeshBasedCellPopulation< DIM >::CreateCellPair(), AbstractCellPopulation< DIM >::GetCellUsingLocationIndex(), GeneralisedLinearSpringForce< 2 >::GetMeinekeSpringStiffness(), AbstractCellPopulation< DIM >::GetNode(), SimulationTime::GetTimeStep(), SimulationTime::Instance(), MeshBasedCellPopulation< DIM >::IsMarkedSpring(), AbstractTwoBodyInteractionForce< DIM >::mMechanicsCutOffLength, GeneralisedLinearSpringForce< 2 >::mMeinekeDivisionRestingSpringLength, GeneralisedLinearSpringForce< 2 >::mMeinekeSpringGrowthDuration, mNode3dLocationMap, AbstractTwoBodyInteractionForce< DIM >::mUseCutOffLength, MeshBasedCellPopulation< DIM >::UnmarkSpring(), and GeneralisedLinearSpringForce< 2 >::VariableSpringConstantMultiplicationFactor().
Referenced by AddForceContribution().
double CryptProjectionForce::GetA | ( | ) | const |
double CryptProjectionForce::GetB | ( | ) | const |
double CryptProjectionForce::GetWntChemotaxisStrength | ( | ) |
Definition at line 88 of file CryptProjectionForce.cpp.
References mWntChemotaxisStrength.
void CryptProjectionForce::OutputForceParameters | ( | out_stream & | rParamsFile | ) | [virtual] |
Outputs force parameters to file
As this method is pure virtual, it must be overridden in subclasses.
rParamsFile | the file stream to which the parameters are output |
Reimplemented from GeneralisedLinearSpringForce< 2 >.
Definition at line 289 of file CryptProjectionForce.cpp.
References mA, mB, mIncludeWntChemotaxis, and mWntChemotaxisStrength.
void CryptProjectionForce::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 |
Reimplemented from GeneralisedLinearSpringForce< 2 >.
Definition at line 48 of file CryptProjectionForce.hpp.
References mA, mB, mIncludeWntChemotaxis, and mWntChemotaxisStrength.
void CryptProjectionForce::SetWntChemotaxis | ( | bool | includeWntChemotaxis | ) |
Set mIncludeWntChemotaxis.
includeWntChemotaxis | whether to include Wnt-dependent chemotaxis |
Definition at line 93 of file CryptProjectionForce.cpp.
References mIncludeWntChemotaxis.
void CryptProjectionForce::SetWntChemotaxisStrength | ( | double | wntChemotaxisStrength | ) |
Set mWntChemotaxisStrength.
wntChemotaxisStrength | the new value of mWntChemotaxisStrength |
Definition at line 83 of file CryptProjectionForce.cpp.
References mWntChemotaxisStrength.
void CryptProjectionForce::UpdateNode3dLocationMap | ( | AbstractCellPopulation< 2 > & | rCellPopulation | ) | [private] |
Fix up the mappings between node indices and 3D locations.
rCellPopulation | the cell population |
Definition at line 46 of file CryptProjectionForce.cpp.
References AbstractCellPopulation< DIM >::Begin(), CalculateCryptSurfaceHeightAtPoint(), AbstractCellPopulation< DIM >::End(), AbstractCellPopulation< DIM >::GetLocationIndexUsingCell(), AbstractCellPopulation< DIM >::GetLocationOfCellCentre(), and mNode3dLocationMap.
Referenced by AddForceContribution().
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from GeneralisedLinearSpringForce< 2 >.
Definition at line 46 of file CryptProjectionForce.hpp.
double CryptProjectionForce::mA [private] |
The value of the constant a in the definition of the crypt surface z = f(r) = a*r^b.
Definition at line 61 of file CryptProjectionForce.hpp.
Referenced by CalculateCryptSurfaceDerivativeAtPoint(), CalculateCryptSurfaceHeightAtPoint(), CryptProjectionForce(), GetA(), OutputForceParameters(), and serialize().
double CryptProjectionForce::mB [private] |
The value of the constant b in the definition of the crypt surface z = f(r) = a*r^b.
Definition at line 67 of file CryptProjectionForce.hpp.
Referenced by CalculateCryptSurfaceDerivativeAtPoint(), CalculateCryptSurfaceHeightAtPoint(), CryptProjectionForce(), GetB(), OutputForceParameters(), and serialize().
Whether to include Wnt-dependent chemotaxis for stem cells.
Definition at line 72 of file CryptProjectionForce.hpp.
Referenced by AddForceContribution(), OutputForceParameters(), serialize(), and SetWntChemotaxis().
std::map<unsigned, c_vector<double, 3> > CryptProjectionForce::mNode3dLocationMap [private] |
Map node indices to 3D locations on the crypt surface.
Definition at line 82 of file CryptProjectionForce.hpp.
Referenced by CalculateForceBetweenNodes(), and UpdateNode3dLocationMap().
Strength of Wnt-based chemotactic force.
Definition at line 77 of file CryptProjectionForce.hpp.
Referenced by AddForceContribution(), GetWntChemotaxisStrength(), OutputForceParameters(), serialize(), and SetWntChemotaxisStrength().