Chaste  Release::2018.1
HeterotypicBoundaryLengthWriter< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <HeterotypicBoundaryLengthWriter.hpp>

+ Inheritance diagram for HeterotypicBoundaryLengthWriter< ELEMENT_DIM, SPACE_DIM >:
+ Collaboration diagram for HeterotypicBoundaryLengthWriter< ELEMENT_DIM, SPACE_DIM >:

Public Member Functions

 HeterotypicBoundaryLengthWriter ()
 
virtual void Visit (MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM > *pCellPopulation)
 
virtual void Visit (CaBasedCellPopulation< SPACE_DIM > *pCellPopulation)
 
virtual void Visit (NodeBasedCellPopulation< SPACE_DIM > *pCellPopulation)
 
virtual void Visit (PottsBasedCellPopulation< SPACE_DIM > *pCellPopulation)
 
virtual void Visit (VertexBasedCellPopulation< SPACE_DIM > *pCellPopulation)
 
- Public Member Functions inherited from AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM >
 AbstractCellPopulationWriter (const std::string &rFileName)
 
virtual void WriteHeader (AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > *pCellPopulation)
 
- Public Member Functions inherited from AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >
 AbstractCellBasedWriter (const std::string &rFileName)
 
virtual ~AbstractCellBasedWriter ()
 
void CloseFile ()
 
virtual void OpenOutputFile (OutputFileHandler &rOutputFileHandler)
 
void OpenOutputFileForAppend (OutputFileHandler &rOutputFileHandler)
 
virtual void WriteTimeStamp ()
 
virtual void WriteNewline ()
 
void SetFileName (std::string fileName)
 
std::string GetFileName ()
 
- Public Member Functions inherited from Identifiable
virtual ~Identifiable ()
 
std::string GetIdentifier () const
 

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Protected Attributes inherited from AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >
std::string mFileName
 
out_stream mpOutStream
 

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class HeterotypicBoundaryLengthWriter< ELEMENT_DIM, SPACE_DIM >

A class written using the visitor pattern for writing the length of the boundaries between labelled and unlabelled cells (as determined by the cell property CellLabel) in a cell population to file. This is a measure of how mixed the populations are.

The output file is called heterotypicboundary.dat by default.

For usage of this measure for cell sorting, see for example the heterotypic boundary length described in Zhang et al (2011). Computer simulations of cell sorting due to differential adhesion. PLOS ONE 6(10):e24999. doi:10.1371/journal.pone.0024999

Definition at line 57 of file HeterotypicBoundaryLengthWriter.hpp.

Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
HeterotypicBoundaryLengthWriter< ELEMENT_DIM, SPACE_DIM >::HeterotypicBoundaryLengthWriter ( )

Default constructor.

Definition at line 48 of file HeterotypicBoundaryLengthWriter.cpp.

Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class Archive >
void HeterotypicBoundaryLengthWriter< ELEMENT_DIM, SPACE_DIM >::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

Serialize the object and its member variables.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 69 of file HeterotypicBoundaryLengthWriter.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void HeterotypicBoundaryLengthWriter< ELEMENT_DIM, SPACE_DIM >::Visit ( MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM > *  pCellPopulation)
virtual

Visit the population and write the labelled boundary length data.

Outputs a line of tab-separated values of the form: [fractional_length] [total_length] [fractional_neighbours] [total_neighbours]

Here the indexing of nodes is as given by the NodeIterator.

This line is appended to the output written by AbstractCellBasedWriter, which is a single value [present simulation time], followed by a tab.

Parameters
pCellPopulationa pointer to the MeshBasedCellPopulation to visit.
Todo:
#2273 - check if this call is needed
Todo:
#2273 - check we have correctly dealt with ghost nodes

Implements AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM >.

Definition at line 54 of file HeterotypicBoundaryLengthWriter.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Begin(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::CreateVoronoiTessellation(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::End(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetCellUsingLocationIndex(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationIndexUsingCell(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetNeighbouringNodeIndices(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetVoronoiEdgeLength(), and AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::IsGhostNode().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void HeterotypicBoundaryLengthWriter< ELEMENT_DIM, SPACE_DIM >::Visit ( CaBasedCellPopulation< SPACE_DIM > *  pCellPopulation)
virtual
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void HeterotypicBoundaryLengthWriter< ELEMENT_DIM, SPACE_DIM >::Visit ( NodeBasedCellPopulation< SPACE_DIM > *  pCellPopulation)
virtual

Visit the population and write the labelled boundary length data.

Outputs a line of tab-separated values of the form: [fractional_length] [total_length] [fractional_neighbours] [total_neighbours]

Here the indexing of nodes is as given by the NodeIterator.

This line is appended to the output written by AbstractCellBasedWriter, which is a single value [present simulation time], followed by a tab.

Parameters
pCellPopulationa pointer to the NodeBasedCellPopulation to visit.
Todo:
#2273 - check if this call to Update() is needed

Implements AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM >.

Definition at line 188 of file HeterotypicBoundaryLengthWriter.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Begin(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::End(), NodeBasedCellPopulation< DIM >::GetCellUsingLocationIndex(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetDistanceBetweenNodes(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationIndexUsingCell(), NodeBasedCellPopulation< DIM >::GetNeighbouringNodeIndices(), NodeBasedCellPopulation< DIM >::GetNode(), NodeBasedCellPopulation< DIM >::rGetMesh(), and NodeBasedCellPopulation< DIM >::Update().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void HeterotypicBoundaryLengthWriter< ELEMENT_DIM, SPACE_DIM >::Visit ( PottsBasedCellPopulation< SPACE_DIM > *  pCellPopulation)
virtual

Visit the population and write the labelled boundary length data.

Outputs a line of tab-separated values of the form: [fractional_length] [total_length] [fractional_neighbours] [total_neighbours]

Here the indexing of nodes is as given by the NodeIterator.

This line is appended to the output written by AbstractCellBasedWriter, which is a single value [present simulation time], followed by a tab.

Parameters
pCellPopulationa pointer to the PottsBasedCellPopulation to visit.
Todo:
#2273 - investigate whether there is a hard-coded assumption that neighbouring nodes in Potts simulations are unit distance apart

Implements AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM >.

Definition at line 271 of file HeterotypicBoundaryLengthWriter.cpp.

References AbstractCellPopulation< DIM >::Begin(), AbstractCellPopulation< DIM >::End(), AbstractCellPopulation< DIM >::GetCellUsingLocationIndex(), AbstractCellPopulation< DIM >::GetLocationIndexUsingCell(), PottsBasedCellPopulation< DIM >::GetNeighbouringLocationIndices(), PottsBasedCellPopulation< DIM >::GetNode(), and PottsBasedCellPopulation< DIM >::rGetMesh().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void HeterotypicBoundaryLengthWriter< ELEMENT_DIM, SPACE_DIM >::Visit ( VertexBasedCellPopulation< SPACE_DIM > *  pCellPopulation)
virtual

Visit the population and write the labelled boundary length data.

Outputs a line of tab-separated values of the form: [fractional_length] [total_length] [fractional_neighbours] [total_neighbours]

Here the indexing of nodes is as given by the NodeIterator.

This line is appended to the output written by AbstractCellBasedWriter, which is a single value [present simulation time], followed by a tab.

Parameters
pCellPopulationa pointer to the VertexBasedCellPopulation to visit.
Todo:
#2273 - check if this call to Update() is needed

Implements AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM >.

Definition at line 368 of file HeterotypicBoundaryLengthWriter.cpp.

References AbstractCellPopulation< ELEMENT_DIM, ELEMENT_DIM >::Begin(), AbstractCellPopulation< ELEMENT_DIM, ELEMENT_DIM >::End(), AbstractCellPopulation< ELEMENT_DIM, ELEMENT_DIM >::GetCellUsingLocationIndex(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetEdgeLength(), AbstractCellPopulation< ELEMENT_DIM, ELEMENT_DIM >::GetLocationIndexUsingCell(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetNeighbouringElementIndices(), VertexBasedCellPopulation< SPACE_DIM >::rGetMesh(), and VertexBasedCellPopulation< SPACE_DIM >::Update().

Friends And Related Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 61 of file HeterotypicBoundaryLengthWriter.hpp.


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