AbstractCentreBasedCellPopulation.hpp
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
00030
00031
00032
00033
00034
00035
00036 #ifndef ABSTRACTCENTREBASEDCELLPOPULATION_HPP_
00037 #define ABSTRACTCENTREBASEDCELLPOPULATION_HPP_
00038
00039 #include "AbstractOffLatticeCellPopulation.hpp"
00040
00045 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM=ELEMENT_DIM>
00046 class AbstractCentreBasedCellPopulation : public AbstractOffLatticeCellPopulation<ELEMENT_DIM, SPACE_DIM>
00047 {
00048 private:
00050 friend class boost::serialization::access;
00057 template<class Archive>
00058 void serialize(Archive & archive, const unsigned int version)
00059 {
00060 archive & boost::serialization::base_object<AbstractOffLatticeCellPopulation<ELEMENT_DIM, SPACE_DIM> >(*this);
00061 archive & mMeinekeDivisionSeparation;
00062 archive & mMarkedSprings;
00063 }
00064
00065 protected:
00070 double mMeinekeDivisionSeparation;
00071
00077 std::set<std::pair<CellPtr,CellPtr> > mMarkedSprings;
00078
00084 AbstractCentreBasedCellPopulation(AbstractMesh<ELEMENT_DIM, SPACE_DIM>& rMesh);
00085
00094 virtual void WriteVtkResultsToFile(const std::string& rDirectory)=0;
00095
00096 public:
00097
00105 AbstractCentreBasedCellPopulation( AbstractMesh<ELEMENT_DIM, SPACE_DIM>& rMesh,
00106 std::vector<CellPtr>& rCells,
00107 const std::vector<unsigned> locationIndices=std::vector<unsigned>());
00108
00117 c_vector<double, SPACE_DIM> GetLocationOfCellCentre(CellPtr pCell);
00118
00126 Node<SPACE_DIM>* GetNodeCorrespondingToCell(CellPtr pCell);
00127
00137 CellPtr AddCell(CellPtr pNewCell, const c_vector<double,SPACE_DIM>& rCellDivisionVector, CellPtr pParentCell=CellPtr());
00138
00148 std::pair<CellPtr,CellPtr> CreateCellPair(CellPtr pCell1, CellPtr pCell2);
00149
00155 bool IsMarkedSpring(const std::pair<CellPtr,CellPtr>& rCellPair);
00156
00162 void MarkSpring(std::pair<CellPtr,CellPtr>& rCellPair);
00163
00169 void UnmarkSpring(std::pair<CellPtr,CellPtr>& rCellPair);
00170
00178 bool IsCellAssociatedWithADeletedLocation(CellPtr pCell);
00179
00188 virtual std::set<unsigned> GetNeighbouringLocationIndices(CellPtr pCell);
00189
00195 virtual void UpdateNodeLocations(double dt);
00196
00213 virtual double GetDampingConstant(unsigned nodeIndex);
00214
00223 virtual bool IsGhostNode(unsigned index);
00224
00233 virtual bool IsParticle(unsigned index);
00234
00242 virtual std::vector< std::pair<Node<SPACE_DIM>*, Node<SPACE_DIM>* > >& rGetNodePairs()=0;
00243
00247 double GetMeinekeDivisionSeparation();
00248
00254 void SetMeinekeDivisionSeparation(double divisionSeparation);
00255
00261 virtual void OutputCellPopulationParameters(out_stream& rParamsFile);
00262 };
00263
00264 #endif