Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
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)
 
virtual void Visit (ImmersedBoundaryCellPopulation< 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

◆ HeterotypicBoundaryLengthWriter()

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

Default constructor.

Definition at line 53 of file HeterotypicBoundaryLengthWriter.cpp.

Member Function Documentation

◆ serialize()

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.

◆ Visit() [1/6]

◆ Visit() [2/6]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void HeterotypicBoundaryLengthWriter< ELEMENT_DIM, SPACE_DIM >::Visit ( ImmersedBoundaryCellPopulation< 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]

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 ImmersedBoundaryCellPopulation to visit.

Implements AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM >.

Definition at line 435 of file HeterotypicBoundaryLengthWriter.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetCellUsingLocationIndex(), ImmersedBoundaryCellPopulation< DIM >::rGetMesh(), and ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::rGetNodeLocationsVoronoiDiagram().

◆ Visit() [3/6]

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 59 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().

◆ Visit() [4/6]

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 193 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(), Node< SPACE_DIM >::GetRadius(), NodeBasedCellPopulation< DIM >::rGetMesh(), and NodeBasedCellPopulation< DIM >::Update().

◆ Visit() [5/6]

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 276 of file HeterotypicBoundaryLengthWriter.cpp.

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

◆ Visit() [6/6]

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 373 of file HeterotypicBoundaryLengthWriter.cpp.

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

Friends And Related Symbol Documentation

◆ boost::serialization::access

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: