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 CYLINDRICAL2DVERTEXMESH_HPP_
00029 #define CYLINDRICAL2DVERTEXMESH_HPP_
00030
00031 #include "ChasteSerialization.hpp"
00032 #include <boost/serialization/base_object.hpp>
00033
00034 #include "MutableVertexMesh.hpp"
00035
00044 class Cylindrical2dVertexMesh : public MutableVertexMesh<2,2>
00045 {
00046 friend class TestCylindrical2dVertexMesh;
00047
00048 private:
00049
00051 double mWidth;
00052
00054 friend class boost::serialization::access;
00065 template<class Archive>
00066 void serialize(Archive & archive, const unsigned int version)
00067 {
00068 archive & boost::serialization::base_object<MutableVertexMesh<2,2> >(*this);
00069 archive & mWidth;
00070 }
00071
00075 Cylindrical2dVertexMesh();
00076
00077 public:
00078
00088 Cylindrical2dVertexMesh(double width,
00089 std::vector<Node<2>*> nodes,
00090 std::vector<VertexElement<2,2>*> vertexElements,
00091 double cellRearrangementThreshold=0.01,
00092 double t2Threshold=0.001);
00093
00097 ~Cylindrical2dVertexMesh();
00098
00109 c_vector<double, 2> GetVectorFromAtoB(const c_vector<double, 2>& rLocation1, const c_vector<double, 2>& rLocation2);
00110
00120 void SetNode(unsigned nodeIndex, ChastePoint<2> point);
00121
00131 double GetWidth(const unsigned& rDimension) const;
00132
00140 unsigned AddNode(Node<2>* pNewNode);
00141
00149 double GetVolumeOfElement(unsigned index);
00150
00158 c_vector<double, 2> GetCentroidOfElement(unsigned index);
00159 };
00160
00161 #include "SerializationExportWrapper.hpp"
00162 CHASTE_CLASS_EXPORT(Cylindrical2dVertexMesh)
00163
00164 #endif