CellProliferativePhasesCountWriter.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
00030
00031
00032
00033
00034
00035
00036 #include "CellProliferativePhasesCountWriter.hpp"
00037 #include "AbstractCellPopulation.hpp"
00038 #include "MeshBasedCellPopulation.hpp"
00039 #include "CaBasedCellPopulation.hpp"
00040 #include "NodeBasedCellPopulation.hpp"
00041 #include "PottsBasedCellPopulation.hpp"
00042 #include "VertexBasedCellPopulation.hpp"
00043
00044 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00045 CellProliferativePhasesCountWriter<ELEMENT_DIM, SPACE_DIM>::CellProliferativePhasesCountWriter()
00046 : AbstractCellPopulationWriter<ELEMENT_DIM, SPACE_DIM>("cellcyclephases.dat")
00047 {
00048 }
00049
00050 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00051 void CellProliferativePhasesCountWriter<ELEMENT_DIM, SPACE_DIM>::VisitAnyPopulation(AbstractCellPopulation<SPACE_DIM, SPACE_DIM>* pCellPopulation)
00052 {
00053 std::vector<unsigned> phases_count = pCellPopulation->GetCellCyclePhaseCount();
00054
00055 for (unsigned i=0; i < phases_count.size(); i++)
00056 {
00057 *this->mpOutStream << phases_count[i] << "\t";
00058 }
00059 }
00060
00061 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00062 void CellProliferativePhasesCountWriter<ELEMENT_DIM, SPACE_DIM>::Visit(MeshBasedCellPopulation<ELEMENT_DIM, SPACE_DIM>* pCellPopulation)
00063 {
00064 std::vector<unsigned> phases_count = pCellPopulation->GetCellCyclePhaseCount();
00065
00066 for (unsigned i=0; i < phases_count.size(); i++)
00067 {
00068 *this->mpOutStream << phases_count[i] << "\t";
00069 }
00070 }
00071
00072 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00073 void CellProliferativePhasesCountWriter<ELEMENT_DIM, SPACE_DIM>::Visit(CaBasedCellPopulation<SPACE_DIM>* pCellPopulation)
00074 {
00075 VisitAnyPopulation(pCellPopulation);
00076 }
00077
00078 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00079 void CellProliferativePhasesCountWriter<ELEMENT_DIM, SPACE_DIM>::Visit(NodeBasedCellPopulation<SPACE_DIM>* pCellPopulation)
00080 {
00081 VisitAnyPopulation(pCellPopulation);
00082 }
00083
00084 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00085 void CellProliferativePhasesCountWriter<ELEMENT_DIM, SPACE_DIM>::Visit(PottsBasedCellPopulation<SPACE_DIM>* pCellPopulation)
00086 {
00087 VisitAnyPopulation(pCellPopulation);
00088 }
00089
00090 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00091 void CellProliferativePhasesCountWriter<ELEMENT_DIM, SPACE_DIM>::Visit(VertexBasedCellPopulation<SPACE_DIM>* pCellPopulation)
00092 {
00093 VisitAnyPopulation(pCellPopulation);
00094 }
00095
00096
00097 template class CellProliferativePhasesCountWriter<1,1>;
00098 template class CellProliferativePhasesCountWriter<1,2>;
00099 template class CellProliferativePhasesCountWriter<2,2>;
00100 template class CellProliferativePhasesCountWriter<1,3>;
00101 template class CellProliferativePhasesCountWriter<2,3>;
00102 template class CellProliferativePhasesCountWriter<3,3>;
00103
00104 #include "SerializationExportWrapperForCpp.hpp"
00105
00106 EXPORT_TEMPLATE_CLASS_ALL_DIMS(CellProliferativePhasesCountWriter)