AbstractOnLatticeCellPopulation.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "AbstractOnLatticeCellPopulation.hpp"
00030
00031 template<unsigned DIM>
00032 AbstractOnLatticeCellPopulation<DIM>::AbstractOnLatticeCellPopulation(std::vector<CellPtr>& rCells,
00033 const std::vector<unsigned> locationIndices,
00034 bool deleteMesh)
00035 : AbstractCellPopulation<DIM>(rCells, locationIndices),
00036 mDeleteMesh(deleteMesh),
00037 mUpdateNodesInRandomOrder(true),
00038 mIterateRandomlyOverUpdateRuleCollection(false)
00039 {
00040 }
00041
00042 template<unsigned DIM>
00043 AbstractOnLatticeCellPopulation<DIM>::AbstractOnLatticeCellPopulation()
00044 : AbstractCellPopulation<DIM>(),
00045 mDeleteMesh(true),
00046 mUpdateNodesInRandomOrder(true),
00047 mIterateRandomlyOverUpdateRuleCollection(false)
00048 {
00049 }
00050
00051 template<unsigned DIM>
00052 AbstractOnLatticeCellPopulation<DIM>::~AbstractOnLatticeCellPopulation()
00053 {
00054 }
00055
00056 template<unsigned DIM>
00057 bool AbstractOnLatticeCellPopulation<DIM>::GetUpdateNodesInRandomOrder()
00058 {
00059 return mUpdateNodesInRandomOrder;
00060 }
00061
00062 template<unsigned DIM>
00063 void AbstractOnLatticeCellPopulation<DIM>::SetUpdateNodesInRandomOrder(bool updateNodesInRandomOrder)
00064 {
00065 mUpdateNodesInRandomOrder = updateNodesInRandomOrder;
00066 }
00067
00068 template<unsigned DIM>
00069 void AbstractOnLatticeCellPopulation<DIM>::SetIterateRandomlyOverUpdateRuleCollection(bool iterateRandomly)
00070 {
00071 mIterateRandomlyOverUpdateRuleCollection = iterateRandomly;
00072 }
00073
00074 template<unsigned DIM>
00075 bool AbstractOnLatticeCellPopulation<DIM>::GetIterateRandomlyOverUpdateRuleCollection()
00076 {
00077 return mIterateRandomlyOverUpdateRuleCollection;
00078 }
00079
00080 template<unsigned DIM>
00081 void AbstractOnLatticeCellPopulation<DIM>::SetNode(unsigned nodeIndex, ChastePoint<DIM>& rNewLocation)
00082 {
00083 EXCEPTION("SetNode() cannot be called on a subclass of AbstractOnLatticeCellPopulation.");
00084 }
00085
00086 template<unsigned DIM>
00087 void AbstractOnLatticeCellPopulation<DIM>::OutputCellPopulationParameters(out_stream& rParamsFile)
00088 {
00089 *rParamsFile << "\t\t<UpdateNodesInRandomOrder>" << mUpdateNodesInRandomOrder << "</UpdateNodesInRandomOrder>\n";
00090 *rParamsFile << "\t\t<IterateRandomlyOverUpdateRuleCollection>" << mIterateRandomlyOverUpdateRuleCollection << "</IterateRandomlyOverUpdateRuleCollection>\n";
00091
00092
00093 AbstractCellPopulation<DIM>::OutputCellPopulationParameters(rParamsFile);
00094 }
00095
00097
00099
00100 template class AbstractOnLatticeCellPopulation<1>;
00101 template class AbstractOnLatticeCellPopulation<2>;
00102 template class AbstractOnLatticeCellPopulation<3>;