AbstractOnLatticeCellPopulation< DIM > Class Template Reference

#include <AbstractOnLatticeCellPopulation.hpp>

Inherits AbstractCellPopulation< DIM >.

Inherited by CaBasedCellPopulation< DIM >, and PottsBasedCellPopulation< DIM >.

Collaboration diagram for AbstractOnLatticeCellPopulation< DIM >:
Collaboration graph
[legend]

List of all members.

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< unsignedGetNeighbouringNodeIndices (unsigned index)
virtual void OutputCellPopulationParameters (out_stream &rParamsFile)

Protected Member Functions

 AbstractOnLatticeCellPopulation (AbstractMesh< DIM, DIM > &rMesh)

Protected Attributes

bool mDeleteMesh
bool mUpdateNodesInRandomOrder
bool mIterateRandomlyOverUpdateRuleCollection

Private Member Functions

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

Friends

class boost::serialization::access

Detailed Description

template<unsigned DIM>
class AbstractOnLatticeCellPopulation< DIM >

An abstract class for on-lattice cell populations.

Definition at line 45 of file AbstractOnLatticeCellPopulation.hpp.


Constructor & Destructor Documentation

template<unsigned DIM>
AbstractOnLatticeCellPopulation< DIM >::AbstractOnLatticeCellPopulation ( AbstractMesh< DIM, DIM > &  rMesh  )  [inline, protected]

Constructor that just takes in a mesh.

Parameters:
rMesh the mesh for the cell population.

Definition at line 57 of file AbstractOnLatticeCellPopulation.cpp.

template<unsigned DIM>
AbstractOnLatticeCellPopulation< DIM >::AbstractOnLatticeCellPopulation ( AbstractMesh< DIM, DIM > &  rMesh,
std::vector< CellPtr > &  rCells,
const std::vector< unsigned locationIndices = std::vector<unsigned>(),
bool  deleteMesh = false 
) [inline]

Default constructor.

Parameters:
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< DIM >::AddCellUsingLocationIndex(), and AbstractCellPopulation< DIM >::mCells.

template<unsigned DIM>
AbstractOnLatticeCellPopulation< DIM >::~AbstractOnLatticeCellPopulation (  )  [inline, virtual]

Destructor.

Definition at line 66 of file AbstractOnLatticeCellPopulation.cpp.


Member Function Documentation

template<unsigned DIM>
bool AbstractOnLatticeCellPopulation< DIM >::GetIterateRandomlyOverUpdateRuleCollection (  )  [inline]
Returns:
mIterateRandomlyOverUpdateRuleCollection.

Definition at line 89 of file AbstractOnLatticeCellPopulation.cpp.

References AbstractOnLatticeCellPopulation< DIM >::mIterateRandomlyOverUpdateRuleCollection.

template<unsigned DIM>
std::set< unsigned > AbstractOnLatticeCellPopulation< DIM >::GetNeighbouringNodeIndices ( unsigned  index  )  [inline, 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.

Parameters:
index the node index
Returns:
the set of neighbouring node indices.

Implements AbstractCellPopulation< DIM >.

Definition at line 101 of file AbstractOnLatticeCellPopulation.cpp.

References EXCEPTION.

template<unsigned DIM>
bool AbstractOnLatticeCellPopulation< DIM >::GetUpdateNodesInRandomOrder (  )  [inline]

Get whether we update nodes in a random order.

Returns:
mUpdateNodesInRandomOrder

Definition at line 71 of file AbstractOnLatticeCellPopulation.cpp.

References AbstractOnLatticeCellPopulation< DIM >::mUpdateNodesInRandomOrder.

template<unsigned DIM>
void AbstractOnLatticeCellPopulation< DIM >::OutputCellPopulationParameters ( out_stream &  rParamsFile  )  [inline, virtual]

Outputs CellPopulation parameters to file

Parameters:
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 AbstractOnLatticeCellPopulation< DIM >::mIterateRandomlyOverUpdateRuleCollection, and AbstractOnLatticeCellPopulation< DIM >::mUpdateNodesInRandomOrder.

template<unsigned DIM>
template<class Archive >
void AbstractOnLatticeCellPopulation< DIM >::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]

Serialize the object and its member variables.

Parameters:
archive the archive
version the current version of this class

Reimplemented from AbstractCellPopulation< DIM >.

Reimplemented in CaBasedCellPopulation< DIM >, and PottsBasedCellPopulation< DIM >.

Definition at line 58 of file AbstractOnLatticeCellPopulation.hpp.

References AbstractOnLatticeCellPopulation< DIM >::mIterateRandomlyOverUpdateRuleCollection, and AbstractOnLatticeCellPopulation< DIM >::mUpdateNodesInRandomOrder.

template<unsigned DIM>
void AbstractOnLatticeCellPopulation< DIM >::SetIterateRandomlyOverUpdateRuleCollection ( bool  iterateRandomly  )  [inline]

Set mIterateRandomlyOverUpdateRuleCollection.

Parameters:
iterateRandomly whether to iterate randomly over mUpdateRuleCollection

Definition at line 83 of file AbstractOnLatticeCellPopulation.cpp.

References AbstractOnLatticeCellPopulation< DIM >::mIterateRandomlyOverUpdateRuleCollection.

template<unsigned DIM>
void AbstractOnLatticeCellPopulation< DIM >::SetNode ( unsigned  index,
ChastePoint< DIM > &  rNewLocation 
) [inline]

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.

Parameters:
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.

template<unsigned DIM>
void AbstractOnLatticeCellPopulation< DIM >::SetUpdateNodesInRandomOrder ( bool  updateNodesInRandomOrder  )  [inline]

Get whether we update nodes in a random order.

Parameters:
updateNodesInRandomOrder Whether to update nodes in a random order.

Definition at line 77 of file AbstractOnLatticeCellPopulation.cpp.

References AbstractOnLatticeCellPopulation< DIM >::mUpdateNodesInRandomOrder.

template<unsigned DIM>
virtual void AbstractOnLatticeCellPopulation< DIM >::UpdateCellLocations ( double  dt  )  [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.

Parameters:
dt time step

Implemented in CaBasedCellPopulation< DIM >, and PottsBasedCellPopulation< DIM >.


Friends And Related Function Documentation

template<unsigned DIM>
friend class boost::serialization::access [friend]

Needed for serialization.

Reimplemented from AbstractCellPopulation< DIM >.

Reimplemented in CaBasedCellPopulation< DIM >, and PottsBasedCellPopulation< DIM >.

Definition at line 50 of file AbstractOnLatticeCellPopulation.hpp.


Member Data Documentation

template<unsigned DIM>
bool AbstractOnLatticeCellPopulation< DIM >::mDeleteMesh [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.

Referenced by CaBasedCellPopulation< DIM >::~CaBasedCellPopulation(), and PottsBasedCellPopulation< DIM >::~PottsBasedCellPopulation().

template<unsigned DIM>
bool AbstractOnLatticeCellPopulation< DIM >::mUpdateNodesInRandomOrder [protected]

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

Generated by  doxygen 1.6.2