CellCycleModelProteinConcentrationsWriter.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 "CellCycleModelProteinConcentrationsWriter.hpp"
00037 #include "AbstractCellPopulation.hpp"
00038 #include "AbstractOdeBasedCellCycleModel.hpp"
00039
00040 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00041 CellCycleModelProteinConcentrationsWriter<ELEMENT_DIM, SPACE_DIM>::CellCycleModelProteinConcentrationsWriter()
00042 : AbstractCellWriter<ELEMENT_DIM, SPACE_DIM>("proteinconcentrations.dat")
00043 {
00044 this->mVtkCellDataName = "Protein concentrations";
00045 }
00046
00047 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00048 double CellCycleModelProteinConcentrationsWriter<ELEMENT_DIM, SPACE_DIM>::GetCellDataForVtkOutput(CellPtr pCell, AbstractCellPopulation<ELEMENT_DIM, SPACE_DIM>* pCellPopulation)
00049 {
00050
00051
00052
00053
00054
00055
00056 return 0.0;
00057 }
00058
00059 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00060 void CellCycleModelProteinConcentrationsWriter<ELEMENT_DIM, SPACE_DIM>::VisitCell(CellPtr pCell, AbstractCellPopulation<ELEMENT_DIM, SPACE_DIM>* pCellPopulation)
00061 {
00062 AbstractOdeBasedCellCycleModel* p_model = dynamic_cast<AbstractOdeBasedCellCycleModel*>(pCell->GetCellCycleModel());
00063 if (p_model)
00064 {
00065
00066 *this->mpOutStream << pCellPopulation->GetLocationIndexUsingCell(pCell) << " ";
00067
00068
00069 std::vector<double> proteins = p_model->GetProteinConcentrations();
00070 for (unsigned i=0; i<proteins.size(); i++)
00071 {
00072 *this->mpOutStream << proteins[i] << " ";
00073 }
00074 }
00075 else
00076 {
00077 EXCEPTION("CellCycleModelProteinConcentrationsWriter cannot be used with a cell-cycle model that does not inherit from AbstractOdeBasedCellCycleModel");
00078 }
00079 }
00080
00081
00082 template class CellCycleModelProteinConcentrationsWriter<1,1>;
00083 template class CellCycleModelProteinConcentrationsWriter<1,2>;
00084 template class CellCycleModelProteinConcentrationsWriter<2,2>;
00085 template class CellCycleModelProteinConcentrationsWriter<1,3>;
00086 template class CellCycleModelProteinConcentrationsWriter<2,3>;
00087 template class CellCycleModelProteinConcentrationsWriter<3,3>;
00088
00089 #include "SerializationExportWrapperForCpp.hpp"
00090
00091 EXPORT_TEMPLATE_CLASS_ALL_DIMS(CellCycleModelProteinConcentrationsWriter)