Chaste
Release::3.4
|
#include <AbstractOnLatticeCellPopulation.hpp>
Public Member Functions | |
AbstractOnLatticeCellPopulation (AbstractMesh< DIM, DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >(), bool deleteMesh=false) | |
virtual | ~AbstractOnLatticeCellPopulation () |
virtual void | UpdateCellLocations (double dt)=0 |
bool | GetUpdateNodesInRandomOrder () |
void | SetUpdateNodesInRandomOrder (bool updateNodesInRandomOrder) |
void | SetIterateRandomlyOverUpdateRuleCollection (bool iterateRandomly) |
bool | GetIterateRandomlyOverUpdateRuleCollection () |
void | SetNode (unsigned index, ChastePoint< DIM > &rNewLocation) |
std::set< unsigned > | GetNeighbouringNodeIndices (unsigned index) |
virtual void | OutputCellPopulationParameters (out_stream &rParamsFile) |
Public Member Functions inherited from AbstractCellPopulation< DIM > | |
AbstractCellPopulation (AbstractMesh< ELEMENT_DIM, ELEMENT_DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >()) | |
virtual | ~AbstractCellPopulation () |
void | InitialiseCells () |
void | SetDataOnAllCells (const std::string &rDataName, double dataValue) |
AbstractMesh< ELEMENT_DIM, ELEMENT_DIM > & | rGetMesh () |
std::list< CellPtr > & | rGetCells () |
virtual unsigned | GetNumNodes ()=0 |
virtual c_vector< double, ELEMENT_DIM > | GetLocationOfCellCentre (CellPtr pCell)=0 |
virtual Node< ELEMENT_DIM > * | GetNode (unsigned index)=0 |
virtual void | SetNode (unsigned nodeIndex, ChastePoint< ELEMENT_DIM > &rNewLocation)=0 |
virtual bool | IsCellAssociatedWithADeletedLocation (CellPtr pCell)=0 |
virtual CellPtr | AddCell (CellPtr pNewCell, const c_vector< double, ELEMENT_DIM > &rCellDivisionVector, CellPtr pParentCell=CellPtr())=0 |
virtual unsigned | RemoveDeadCells ()=0 |
virtual void | Update (bool hasHadBirthsOrDeaths=true)=0 |
std::vector< unsigned > | GetCellMutationStateCount () |
std::vector< unsigned > | GetCellProliferativeTypeCount () |
std::vector< unsigned > | GetCellCyclePhaseCount () |
unsigned | GetNumRealCells () |
unsigned | GetNumAllCells () |
void | SetCellAncestorsToLocationIndices () |
std::set< unsigned > | GetCellAncestors () |
virtual CellPtr | GetCellUsingLocationIndex (unsigned index) |
std::set< CellPtr > | GetCellsUsingLocationIndex (unsigned index) |
bool | IsCellAttachedToLocationIndex (unsigned index) |
void | SetCellUsingLocationIndex (unsigned index, CellPtr pCell) |
virtual void | AddCellUsingLocationIndex (unsigned index, CellPtr pCell) |
virtual void | RemoveCellUsingLocationIndex (unsigned index, CellPtr pCell) |
void | MoveCellInLocationMap (CellPtr pCell, unsigned old_index, unsigned new_index) |
unsigned | GetLocationIndexUsingCell (CellPtr pCell) |
boost::shared_ptr < CellPropertyRegistry > | GetCellPropertyRegistry () |
void | SetDefaultCellMutationStateAndProliferativeTypeOrdering () |
virtual double | GetWidth (const unsigned &rDimension)=0 |
virtual double | GetVolumeOfCell (CellPtr pCell)=0 |
virtual std::set< unsigned > | GetNeighbouringLocationIndices (CellPtr pCell)=0 |
c_vector< double, ELEMENT_DIM > | GetCentroidOfCellPopulation () |
virtual void | UpdateCellProcessLocation () |
virtual void | OpenWritersFiles (OutputFileHandler &rOutputFileHandler) |
void | CloseWritersFiles () |
virtual void | WriteResultsToFiles (const std::string &rDirectory) |
virtual void | AcceptPopulationWriter (boost::shared_ptr< AbstractCellPopulationWriter< ELEMENT_DIM, ELEMENT_DIM > > pPopulationWriter)=0 |
virtual void | AcceptPopulationCountWriter (boost::shared_ptr< AbstractCellPopulationCountWriter< ELEMENT_DIM, ELEMENT_DIM > > pPopulationCountWriter)=0 |
virtual void | AcceptCellWriter (boost::shared_ptr< AbstractCellWriter< ELEMENT_DIM, ELEMENT_DIM > > pCellWriter, CellPtr pCell)=0 |
void | OutputCellPopulationInfo (out_stream &rParamsFile) |
bool | GetOutputResultsForChasteVisualizer () |
void | AddPopulationWriter () |
void | AddPopulationWriter (boost::shared_ptr< AbstractCellPopulationWriter< ELEMENT_DIM, ELEMENT_DIM > > pPopulationWriter) |
void | AddCellWriter () |
void | AddCellWriter (boost::shared_ptr< AbstractCellWriter< ELEMENT_DIM, ELEMENT_DIM > > pCellWriter) |
void | AddCellPopulationCountWriter () |
void | AddCellPopulationCountWriter (boost::shared_ptr< AbstractCellPopulationCountWriter< ELEMENT_DIM, ELEMENT_DIM > > pCellPopulationCountWriter) |
bool | HasWriter () const |
void | SetOutputResultsForChasteVisualizer (bool outputResultsForChasteVisualizer) |
c_vector< double, ELEMENT_DIM > | GetSizeOfCellPopulation () |
virtual bool | IsRoomToDivide (CellPtr pCell) |
std::pair< unsigned, unsigned > | CreateOrderedPair (unsigned index1, unsigned index2) |
Iterator | Begin () |
Iterator | End () |
Public Member Functions inherited from Identifiable | |
virtual | ~Identifiable () |
std::string | GetIdentifier () const |
Protected Member Functions | |
AbstractOnLatticeCellPopulation (AbstractMesh< DIM, DIM > &rMesh) | |
Protected Member Functions inherited from AbstractCellPopulation< DIM > | |
virtual void | Validate ()=0 |
virtual void | WriteVtkResultsToFile (const std::string &rDirectory)=0 |
AbstractCellPopulation (AbstractMesh< ELEMENT_DIM, ELEMENT_DIM > &rMesh) | |
virtual void | AcceptCellWritersAcrossPopulation () |
Protected Attributes | |
bool | mDeleteMesh |
bool | mUpdateNodesInRandomOrder |
bool | mIterateRandomlyOverUpdateRuleCollection |
Protected Attributes inherited from AbstractCellPopulation< DIM > | |
std::map< unsigned, std::set < CellPtr > > | mLocationCellMap |
std::map< Cell *, unsigned > | mCellLocationMap |
AbstractMesh< ELEMENT_DIM, ELEMENT_DIM > & | mrMesh |
std::list< CellPtr > | mCells |
c_vector< double, ELEMENT_DIM > | mCentroid |
out_stream | mpVtkMetaFile |
boost::shared_ptr < CellPropertyRegistry > | mpCellPropertyRegistry |
bool | mOutputResultsForChasteVisualizer |
std::vector< boost::shared_ptr < AbstractCellWriter < ELEMENT_DIM, ELEMENT_DIM > > > | mCellWriters |
std::vector< boost::shared_ptr < AbstractCellPopulationWriter < ELEMENT_DIM, ELEMENT_DIM > > > | mCellPopulationWriters |
std::vector< boost::shared_ptr < AbstractCellPopulationCountWriter < ELEMENT_DIM, ELEMENT_DIM > > > | mCellPopulationCountWriters |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Friends | |
class | boost::serialization::access |
An abstract class for on-lattice cell populations.
Definition at line 45 of file AbstractOnLatticeCellPopulation.hpp.
|
protected |
Constructor that just takes in a mesh.
rMesh | the mesh for the cell population. |
Definition at line 57 of file AbstractOnLatticeCellPopulation.cpp.
AbstractOnLatticeCellPopulation< DIM >::AbstractOnLatticeCellPopulation | ( | AbstractMesh< DIM, DIM > & | rMesh, |
std::vector< CellPtr > & | rCells, | ||
const std::vector< unsigned > | locationIndices = std::vector<unsigned>() , |
||
bool | deleteMesh = false |
||
) |
Default constructor.
rMesh | a refernce to the mesh underlying the cell population |
rCells | a vector of cells |
locationIndices | an optional vector of location indices that correspond to real cells |
deleteMesh | set to true if you want the cell population to free the mesh memory on destruction (defaults to false) |
Definition at line 39 of file AbstractOnLatticeCellPopulation.cpp.
References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::AddCellUsingLocationIndex(), and AbstractCellPopulation< DIM >::mCells.
|
virtual |
Destructor.
Definition at line 66 of file AbstractOnLatticeCellPopulation.cpp.
bool AbstractOnLatticeCellPopulation< DIM >::GetIterateRandomlyOverUpdateRuleCollection | ( | ) |
Definition at line 89 of file AbstractOnLatticeCellPopulation.cpp.
|
virtual |
Overridden GetNeighbouringNodeIndices() method.
This method currently returns an exception as the two types of neighbourhood (Moore and Von Neumann) are defined in the PottsMesh.
index | the node index |
Implements AbstractCellPopulation< DIM >.
Definition at line 101 of file AbstractOnLatticeCellPopulation.cpp.
References EXCEPTION.
bool AbstractOnLatticeCellPopulation< DIM >::GetUpdateNodesInRandomOrder | ( | ) |
Get whether we update nodes in a random order.
Definition at line 71 of file AbstractOnLatticeCellPopulation.cpp.
|
virtual |
Outputs CellPopulation parameters to file
rParamsFile | the file stream to which the parameters are output |
Implements AbstractCellPopulation< DIM >.
Reimplemented in CaBasedCellPopulation< DIM >, and PottsBasedCellPopulation< DIM >.
Definition at line 109 of file AbstractOnLatticeCellPopulation.cpp.
References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::OutputCellPopulationParameters().
Referenced by PottsBasedCellPopulation< DIM >::OutputCellPopulationParameters(), and CaBasedCellPopulation< DIM >::OutputCellPopulationParameters().
|
inlineprivate |
Serialize the object and its member variables.
archive | the archive |
version | the current version of this class |
Definition at line 58 of file AbstractOnLatticeCellPopulation.hpp.
References AbstractOnLatticeCellPopulation< DIM >::mIterateRandomlyOverUpdateRuleCollection, and AbstractOnLatticeCellPopulation< DIM >::mUpdateNodesInRandomOrder.
void AbstractOnLatticeCellPopulation< DIM >::SetIterateRandomlyOverUpdateRuleCollection | ( | bool | iterateRandomly | ) |
Set mIterateRandomlyOverUpdateRuleCollection.
iterateRandomly | whether to iterate randomly over mUpdateRuleCollection |
Definition at line 83 of file AbstractOnLatticeCellPopulation.cpp.
void AbstractOnLatticeCellPopulation< DIM >::SetNode | ( | unsigned | index, |
ChastePoint< DIM > & | rNewLocation | ||
) |
Overridden SetNode() method.
This method throws an exception if called on a subclass of AbstractOnLatticeCellPopulation, since in such classes the lattice is assumed to be fixed.
index | the index of the node to be moved |
rNewLocation | the new target location of the node |
Definition at line 95 of file AbstractOnLatticeCellPopulation.cpp.
References EXCEPTION.
void AbstractOnLatticeCellPopulation< DIM >::SetUpdateNodesInRandomOrder | ( | bool | updateNodesInRandomOrder | ) |
Get whether we update nodes in a random order.
updateNodesInRandomOrder | Whether to update nodes in a random order. |
Definition at line 77 of file AbstractOnLatticeCellPopulation.cpp.
|
pure virtual |
Update cell locations over the course of a time step of specified length.
As this method is pure virtual, it must be overridden in subclasses.
dt | time step |
Implemented in CaBasedCellPopulation< DIM >, and PottsBasedCellPopulation< DIM >.
Referenced by OnLatticeSimulation< DIM >::UpdateCellLocationsAndTopology().
|
friend |
Needed for serialization.
Definition at line 50 of file AbstractOnLatticeCellPopulation.hpp.
|
protected |
Whether to delete the mesh when we are destroyed. Needed if this cell population has been de-serialized.
Definition at line 71 of file AbstractOnLatticeCellPopulation.hpp.
|
protected |
Whether to iterate randomly over mUpdateRuleCollection when updating cell locations. Initialized to false in the constructor.
Definition at line 83 of file AbstractOnLatticeCellPopulation.hpp.
Referenced by AbstractOnLatticeCellPopulation< DIM >::serialize().
|
protected |
Whether to update nodes in random order. Initialized to true in the constructor.
Definition at line 77 of file AbstractOnLatticeCellPopulation.hpp.
Referenced by AbstractOnLatticeCellPopulation< DIM >::serialize().