Chaste  Build::
LatticeBasedMigrationRule< DIM > Class Template Reference

#include <LatticeBasedMigrationRule.hpp>

+ Inheritance diagram for LatticeBasedMigrationRule< DIM >:
+ Collaboration diagram for LatticeBasedMigrationRule< DIM >:

Public Member Functions

 LatticeBasedMigrationRule ()
 
virtual ~LatticeBasedMigrationRule ()
 
virtual std::vector< int > GetIndices (const std::vector< boost::shared_ptr< VesselNode< DIM > > > &rNodes)
 
void SetMovementProbability (double movementProbability)
 
- Public Member Functions inherited from AbstractMigrationRule< DIM >
 AbstractMigrationRule ()
 
virtual ~AbstractMigrationRule ()
 
virtual std::vector< DimensionalChastePoint< DIM > > GetDirections (const std::vector< boost::shared_ptr< VesselNode< DIM > > > &rNodes)
 
void SetIsSprouting (bool isSprouting=true)
 
void SetDiscreteContinuumSolver (boost::shared_ptr< AbstractDiscreteContinuumSolver< DIM > > pSolver)
 
void SetNetwork (boost::shared_ptr< VesselNetwork< DIM > > pNetwork)
 
void SetBoundingDomain (boost::shared_ptr< Part< DIM > > pPart)
 
void SetGrid (boost::shared_ptr< RegularGrid< DIM > > pGrid)
 
void SetCellPopulation (boost::shared_ptr< AbstractCellPopulation< DIM > > pCellPopulation)
 

Static Public Member Functions

static boost::shared_ptr< LatticeBasedMigrationRule< DIM > > Create ()
 
- Static Public Member Functions inherited from AbstractMigrationRule< DIM >
static boost::shared_ptr< AbstractMigrationRule< DIM > > Create ()
 

Protected Member Functions

virtual std::vector< double > GetNeighbourMovementProbabilities (boost::shared_ptr< VesselNode< DIM > > pNode, std::vector< unsigned > neighbourIndices, unsigned gridIndex)
 
virtual int GetNeighbourMovementIndex (std::vector< double > movementProbabilities, std::vector< unsigned > neighbourIndices)
 

Protected Attributes

double mMovementProbability
 
- Protected Attributes inherited from AbstractMigrationRule< DIM >
boost::shared_ptr< AbstractDiscreteContinuumSolver< DIM > > mpSolver
 
boost::shared_ptr< VesselNetwork< DIM > > mpVesselNetwork
 
bool mIsSprouting
 
boost::shared_ptr< AbstractCellPopulation< DIM > > mpCellPopulation
 
boost::shared_ptr< RegularGrid< DIM > > mpGrid
 
boost::shared_ptr< Part< DIM > > mpBoundingDomain
 

Detailed Description

template<unsigned DIM>
class LatticeBasedMigrationRule< DIM >

A simple random direction lattice based migration rule. Not physical, but useful for code testing.

Definition at line 49 of file LatticeBasedMigrationRule.hpp.

Constructor & Destructor Documentation

template<unsigned DIM>
LatticeBasedMigrationRule< DIM >::LatticeBasedMigrationRule ( )

Constructor.

Definition at line 41 of file LatticeBasedMigrationRule.cpp.

template<unsigned DIM>
LatticeBasedMigrationRule< DIM >::~LatticeBasedMigrationRule ( )
virtual

Destructor.

Definition at line 56 of file LatticeBasedMigrationRule.cpp.

Member Function Documentation

template<unsigned DIM>
boost::shared_ptr< LatticeBasedMigrationRule< DIM > > LatticeBasedMigrationRule< DIM >::Create ( )
static

Construct a new instance of the class and return a shared pointer to it.

Returns
a pointer to a new instance of the class

Definition at line 49 of file LatticeBasedMigrationRule.cpp.

template<unsigned DIM>
std::vector< int > LatticeBasedMigrationRule< DIM >::GetIndices ( const std::vector< boost::shared_ptr< VesselNode< DIM > > > &  rNodes)
virtual

Calculate the grid index that each migrating node will move into. Set to -1 if the node does not move.

Parameters
rNodesnodes to calculate indices
Returns
a vector of grid indices to move nodes into

Reimplemented from AbstractMigrationRule< DIM >.

Reimplemented in Owen2011MigrationRule< DIM >, and CellPopulationMigrationRule< DIM >.

Definition at line 133 of file LatticeBasedMigrationRule.cpp.

References LatticeBasedMigrationRule< DIM >::GetNeighbourMovementIndex(), LatticeBasedMigrationRule< DIM >::GetNeighbourMovementProbabilities(), AbstractMigrationRule< DIM >::mpGrid, and AbstractMigrationRule< DIM >::mpVesselNetwork.

Referenced by Owen2011MigrationRule< DIM >::GetIndices().

template<unsigned DIM>
int LatticeBasedMigrationRule< DIM >::GetNeighbourMovementIndex ( std::vector< double >  movementProbabilities,
std::vector< unsigned >  neighbourIndices 
)
protectedvirtual

Get the index of the neighbour to move into. This can be over-written for custom movement rules.

Parameters
movementProbabilitiesthe movement probabilities corresponding to each neighbour index
neighbourIndicesthe grid indices of the neighbour nodes
Returns
the neighbour index to move into

Definition at line 93 of file LatticeBasedMigrationRule.cpp.

Referenced by LatticeBasedMigrationRule< DIM >::GetIndices(), and CellPopulationMigrationRule< DIM >::GetIndices().

template<unsigned DIM>
std::vector< double > LatticeBasedMigrationRule< DIM >::GetNeighbourMovementProbabilities ( boost::shared_ptr< VesselNode< DIM > >  pNode,
std::vector< unsigned >  neighbourIndices,
unsigned  gridIndex 
)
protectedvirtual

Get the probabilities for movement into each lattice point in the node's neighbourhood. This can be over-written for custom movement rules.

Parameters
pNodethe sprouting node
neighbourIndicesthe grid indices of the neighbour nodes
gridIndexthe grid index
Returns
a vector of movement probabilities corresponding to each neighbour index

Reimplemented in Owen2011MigrationRule< DIM >, and CellPopulationMigrationRule< DIM >.

Definition at line 62 of file LatticeBasedMigrationRule.cpp.

References LatticeBasedMigrationRule< DIM >::mMovementProbability, and AbstractMigrationRule< DIM >::mpGrid.

Referenced by LatticeBasedMigrationRule< DIM >::GetIndices().

template<unsigned DIM>
void LatticeBasedMigrationRule< DIM >::SetMovementProbability ( double  movementProbability)

Set the movement probability

Parameters
movementProbabilitythe movement probability

Definition at line 127 of file LatticeBasedMigrationRule.cpp.

References LatticeBasedMigrationRule< DIM >::mMovementProbability.

Member Data Documentation


The documentation for this class was generated from the following files: