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 #ifndef VERTEXCRYPTSIMULATION2D_HPP_
00029 #define VERTEXCRYPTSIMULATION2D_HPP_
00030
00031 #include "ChasteSerialization.hpp"
00032 #include <boost/serialization/base_object.hpp>
00033
00034 #include "CellBasedSimulation.hpp"
00035 #include "VertexBasedCellPopulation.hpp"
00036
00037
00041 class VertexCryptSimulation2d : public CellBasedSimulation<2>
00042 {
00043
00044
00045 friend class TestVertexCryptSimulation2d;
00046
00047 private:
00048
00049 friend class boost::serialization::access;
00050 template<class Archive>
00051 void serialize(Archive & archive, const unsigned int version)
00052 {
00053
00054
00055 archive & boost::serialization::base_object<CellBasedSimulation<2> >(*this);
00056 archive & mUseJiggledBottomCells;
00057 archive & mWriteBetaCatenin;
00058 }
00059
00061 bool mUseJiggledBottomCells;
00062
00069 bool mWriteBetaCatenin;
00070
00072 out_stream mVizBetaCateninResultsFile;
00073
00084 c_vector<double, 2> CalculateCellDivisionVector(CellPtr pParentCell);
00085
00091 void WriteVisualizerSetupFile();
00092
00096 void SetupWriteBetaCatenin();
00097
00103 void WriteBetaCatenin(double time);
00104
00110 void SetupSolve();
00111
00117 void PostSolve();
00118
00125 void AfterSolve();
00126
00127 public:
00128
00136 VertexCryptSimulation2d(AbstractCellPopulation<2>& rCellPopulation,
00137 bool deleteCellPopulationAndForceCollection=false,
00138 bool initialiseCells=true);
00139
00143 void UseJiggledBottomCells();
00144
00154 void ApplyCellPopulationBoundaryConditions(const std::vector<c_vector<double,2> >& rOldLocations);
00155
00160 void SetBottomCellAncestors();
00161
00170 void OutputSimulationParameters(out_stream& rParamsFile);
00171 };
00172
00173
00174 #include "SerializationExportWrapper.hpp"
00175 CHASTE_CLASS_EXPORT(VertexCryptSimulation2d)
00176
00177 namespace boost
00178 {
00179 namespace serialization
00180 {
00184 template<class Archive>
00185 inline void save_construct_data(
00186 Archive & ar, const VertexCryptSimulation2d * t, const BOOST_PFTO unsigned int file_version)
00187 {
00188
00189 const AbstractCellPopulation<2> * p_cell_population = &(t->rGetCellPopulation());
00190 ar & p_cell_population;
00191 }
00192
00196 template<class Archive>
00197 inline void load_construct_data(
00198 Archive & ar, VertexCryptSimulation2d * t, const unsigned int file_version)
00199 {
00200
00201 AbstractCellPopulation<2>* p_cell_population;
00202 ar & p_cell_population;
00203
00204
00205 ::new(t)VertexCryptSimulation2d(*p_cell_population, true, false);
00206 }
00207 }
00208 }
00209
00210 #endif