Main Page | User's guide | Class Hierarchy | Class List | File List | Class Members

baseclass.hxx

00001 // Copyright (C) 2002-2004 Vivien Mallet
00002 //
00003 // This file is part of Multivac library.
00004 // Multivac library provides front-tracking algorithms.
00005 // 
00006 // Multivac is free software; you can redistribute it and/or modify
00007 // it under the terms of the GNU General Public License as published by
00008 // the Free Software Foundation; either version 2 of the License, or
00009 // (at your option) any later version.
00010 // 
00011 // Multivac is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License (file "license") for more details.
00015 //
00016 // For more information, please see the Multivac home page:
00017 //     http://spacetown.free.fr/fronts/
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   // CMESH //
00034 
00036 
00040   template <class T>
00041   class CMesh
00042   {
00043 
00044 
00045     /**************
00046      * ATTRIBUTES *
00047      **************/
00048 
00049   protected:
00050 
00051     // Boundaries.
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      * CONSTRUCTORS & DESTRUCTOR *
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      * METHODS *
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   };  // CMesh.
00114 
00115 
00116 }  // namespace Multivac.
00117 
00118 
00119 #define FILE_MESHES_BASECLASS_HXX
00120 #endif

Generated on Mon Apr 19 01:59:14 2004 for Multivac by doxygen 1.3.6-20040222