CellBasedPdeHandlerOnCuboid.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 CELLBASEDPDEHANDLERONCUBOID_HPP_
00037 #define CELLBASEDPDEHANDLERONCUBOID_HPP_
00038
00039 #include <map>
00040 #include <memory>
00041
00042 #include "ChasteSerialization.hpp"
00043 #include <boost/serialization/vector.hpp>
00044
00045 #include "CellBasedPdeHandler.hpp"
00046
00055 template<unsigned DIM>
00056 class CellBasedPdeHandlerOnCuboid : public CellBasedPdeHandler<DIM>
00057 {
00058
00059 friend class TestCellBasedPdeHandler;
00060 friend class TestOffLatticeSimulationWithPdes;
00061 friend class TestOnLatticeSimulationWithPdes;
00062
00063 private:
00064
00066 std::vector<ConstBoundaryCondition<DIM>* > mConstBoundaryConditions;
00067
00069 friend class boost::serialization::access;
00076 template<class Archive>
00077 void serialize(Archive & archive, const unsigned int version)
00078 {
00079 archive & boost::serialization::base_object<CellBasedPdeHandler<DIM> >(*this);
00080 }
00081
00082 public:
00083
00090 CellBasedPdeHandlerOnCuboid(AbstractCellPopulation<DIM>* pCellPopulation, bool deleteMemberPointersInDestructor=false);
00091
00095 virtual ~CellBasedPdeHandlerOnCuboid();
00096
00105 std::auto_ptr<BoundaryConditionsContainer<DIM,DIM,1> > ConstructBoundaryConditionsContainer(
00106 PdeAndBoundaryConditions<DIM>* pPdeAndBc,
00107 TetrahedralMesh<DIM,DIM>* pMesh);
00108
00114 virtual void OutputParameters(out_stream& rParamsFile);
00115 };
00116
00117 #include "SerializationExportWrapper.hpp"
00118 EXPORT_TEMPLATE_CLASS_SAME_DIMS(CellBasedPdeHandlerOnCuboid)
00119
00120 namespace boost
00121 {
00122 namespace serialization
00123 {
00128 template<class Archive, unsigned DIM>
00129 inline void save_construct_data(
00130 Archive & ar, const CellBasedPdeHandlerOnCuboid<DIM> * t, const BOOST_PFTO unsigned int file_version)
00131 {
00132
00133 const AbstractCellPopulation<DIM>* p_cell_population = t->GetCellPopulation();
00134 ar & p_cell_population;
00135 }
00136
00140 template<class Archive, unsigned DIM>
00141 inline void load_construct_data(
00142 Archive & ar, CellBasedPdeHandlerOnCuboid<DIM> * t, const unsigned int file_version)
00143 {
00144
00145 AbstractCellPopulation<DIM>* p_cell_population;
00146 ar >> p_cell_population;
00147
00148
00149 ::new(t)CellBasedPdeHandlerOnCuboid<DIM>(p_cell_population, true);
00150 }
00151 }
00152 }
00153
00154 #endif