00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef FILE_MESHES_BASECLASS_HXX
00021
00022
00023 #include "../errors.cxx"
00024 #include <stdio.h>
00025
00026
00027 namespace Multivac
00028 {
00029
00030
00032
00034
00036
00040 template <class T>
00041 class CMesh
00042 {
00043
00044
00045
00046
00047
00048
00049 protected:
00050
00051
00053 T Xmin;
00055 T Xmax;
00057 T Ymin;
00059 T Ymax;
00060
00062 int Nx;
00064 T Delta_x;
00066 int Ny;
00068 T Delta_y;
00069
00070
00071
00072
00073
00074
00075 public:
00076
00077 CMesh() throw();
00078 CMesh(T Xmin, T Xmax, T Ymin, T Ymax) throw();
00079
00080 virtual ~CMesh() throw();
00081
00082
00083
00084
00085
00086
00087 public:
00088
00089 T GetXmin() const;
00090 T GetXmax() const;
00091 T GetYmin() const;
00092 T GetYmax() const;
00093
00094 void SetXmin(T Xmin_);
00095 void SetXmax(T Xmax_);
00096 void SetYmin(T Ymin_);
00097 void SetYmax(T Ymax_);
00098
00099 T GetDelta_x() const;
00100 void SetDelta_x(T Delta_x_);
00101 int GetNx() const;
00102 T GetDelta_y() const;
00103 void SetDelta_y(T Delta_y_);
00104 int GetNy() const;
00105
00106 void GetClosestUpperPoint(T& x, T& y);
00107
00108 virtual void Save(string XFile, string YFile) const = 0;
00109 virtual void SaveNonOrthogonalMesh(string PointsFile,
00110 string EdgesFile,
00111 string TrianglesFile) const = 0;
00112
00113 };
00114
00115
00116 }
00117
00118
00119 #define FILE_MESHES_BASECLASS_HXX
00120 #endif