CryptSimulation1d.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 CRYPTSIMULATION1D_HPP_
00037 #define CRYPTSIMULATION1D_HPP_
00038
00039 #include "ChasteSerialization.hpp"
00040 #include <boost/serialization/base_object.hpp>
00041
00042 #include <cmath>
00043 #include <iostream>
00044
00045 #include "WntConcentration.hpp"
00046 #include "CryptSimulationBoundaryCondition.hpp"
00047 #include "OffLatticeSimulation.hpp"
00048 #include "MeshBasedCellPopulation.hpp"
00049
00054 class CryptSimulation1d : public OffLatticeSimulation<1>
00055 {
00056
00057 friend class TestCryptSimulation1d;
00058
00059 private:
00060
00062 friend class boost::serialization::access;
00069 template<class Archive>
00070 void serialize(Archive & archive, const unsigned int version)
00071 {
00072 archive & boost::serialization::base_object<OffLatticeSimulation<1> >(*this);
00073
00074 SerializableSingleton<WntConcentration<1> >* p_wnt_wrapper = WntConcentration<1>::Instance()->GetSerializationWrapper();
00075 archive & p_wnt_wrapper;
00076 }
00077
00079 MeshBasedCellPopulation<1>* mpStaticCastCellPopulation;
00080
00091 c_vector<double, 1> CalculateCellDivisionVector(CellPtr pParentCell);
00092
00093 public:
00094
00103 CryptSimulation1d(AbstractCellPopulation<1>& rCellPopulation,
00104 bool deleteCellPopulationInDestructor=false,
00105 bool initialiseCells=true);
00106
00112 virtual ~CryptSimulation1d();
00113
00122 void OutputSimulationParameters(out_stream& rParamsFile);
00123 };
00124
00125
00126 #include "SerializationExportWrapper.hpp"
00127 CHASTE_CLASS_EXPORT(CryptSimulation1d)
00128
00129 namespace boost
00130 {
00131 namespace serialization
00132 {
00136 template<class Archive>
00137 inline void save_construct_data(
00138 Archive & ar, const CryptSimulation1d * t, const BOOST_PFTO unsigned int file_version)
00139 {
00140
00141 const AbstractCellPopulation<1>* p_cell_population = &(t->rGetCellPopulation());
00142 ar & p_cell_population;
00143 }
00144
00148 template<class Archive>
00149 inline void load_construct_data(
00150 Archive & ar, CryptSimulation1d * t, const unsigned int file_version)
00151 {
00152
00153 AbstractCellPopulation<1>* p_cell_population;
00154 ar & p_cell_population;
00155
00156
00157
00158 ::new(t)CryptSimulation1d(*p_cell_population, true, false);
00159 }
00160 }
00161 }
00162
00163 #endif