Back to index

salome-med  6.5.0
MEDMEM_Coordinate.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library 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 GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 /*
00024  File Coordinate.hxx
00025 */
00026 
00027 #ifndef COORDINATE_HXX
00028 #define COORDINATE_HXX
00029 
00030 #include <MEDMEM.hxx>
00031 
00032 #include <string>
00033 #include <vector>
00034 
00035 #include "MEDMEM_PointerOf.hxx"
00036 #include "MEDMEM_Exception.hxx"
00037 #include "MEDMEM_define.hxx"
00038 
00039 
00040 #include "MEDMEM_Array.hxx"
00041 
00049 namespace MEDMEM {
00050 class MEDMEM_EXPORT COORDINATE
00051 {
00052 
00053 protected:
00056   string                       _coordinateSystem;
00057 
00058 
00068   mutable MEDARRAY<double>            _coordinate;
00069 
00071   //PointerOf<string>          _coordinateName;
00072   vector<string>          _coordinateName;
00073 
00075   //PointerOf<string>          _coordinateUnit;
00076   vector<string>          _coordinateUnit;
00077 
00079   PointerOf<int>             _nodeNumber;
00080 
00081 
00082 public :
00083 
00084 
00085   friend class MED_MESH_RDONLY_DRIVER;
00086   friend class MED_MESH_WRONLY_DRIVER;
00087 
00088 
00089   COORDINATE();
00090   COORDINATE(int SpaceDimension, int NumberOfNodes, MED_EN::medModeSwitch Mode);
00091   COORDINATE(int SpaceDimension,const string * CoordinateName, const string * CoordinateUnit);
00092   COORDINATE(const COORDINATE & m);
00093   virtual ~COORDINATE();
00094 
00095   void setCoordinates(MEDARRAY<double> *Coordinate,bool shallowCopy=false);
00096   void setCoordinates(const MED_EN::medModeSwitch Mode, const double *Coordinate);
00097   void setCoordinatesNames(const string * CoordinateName);
00098   void setCoordinateName(const string CoordinateName, const int i);
00099   void setCoordinatesUnits(const string * CoordinateUnit);
00100   void setCoordinateUnit(const string CoordinateUnit, const int i);
00101   void setCoordinatesSystem(const string CoordinateSystem);
00102   void setNodesNumbers(const int * NodeNumber);
00103 
00104   int             getSpaceDimension() const;
00105   int             getNumberOfNodes() const;
00106 
00107   virtual const int*      getNodesNumbers() const;
00108   //const int*            getNodesNumbers() ;
00109   string          getCoordinatesSystem() const;
00110 
00111   virtual const double *  getCoordinates(MED_EN::medModeSwitch Mode);
00112   virtual double          getCoordinate(int Number,int Axis);
00113   virtual const double *  getCoordinateAxis(int Axis);
00114 
00115   const string * getCoordinatesNames() const;
00116   string   getCoordinateName(int Axis) const;
00117   const string * getCoordinatesUnits() const;
00118   string   getCoordinateUnit(int Axis) const;
00119 };
00120 }
00121 
00122 #endif /* COORDINATE_HXX */