1 // MED MEDMEM : MED files in memory
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : MEDMEM_Coordinate.hxx
32 #ifndef COORDINATE_HXX
33 #define COORDINATE_HXX
37 #include "MEDMEM_PointerOf.hxx"
38 #include "MEDMEM_Exception.hxx"
39 #include "MEDMEM_define.hxx"
42 #include "MEDMEM_Array.hxx"
45 This class contains coordinates of the nodes ./n
46 It could also store useful optional information about nodes
47 as node numbers and about axes as names or units. /n
48 spaceDimension and numberOfNodes can be found in _coordinate object.
55 /*! contains "CARTESIAN",
56 "CYLINDRICAL" or "SPHERICAL"*/
57 string _coordinateSystem;
60 /*! _coordinate is a MEDARRAY<double> object : \n
63 - default storage mode /n
64 - Up to 4 "PointerOf" to an array of size spaceDimension*NumberOfNodes/n
66 Storing the object (not a pointer to this object) is more convenient for memory
69 MEDARRAY<double> _coordinate;
71 /*! PointerOf to an array of size spaceDimension storing axes names*/
72 PointerOf<string> _coordinateName;
74 /*! PointerOf to an array of size spaceDimension storing units */
75 PointerOf<string> _coordinateUnit;
77 /*! PointerOf to an array of size NumberOfNodes : optional nodes numbers */
78 PointerOf<int> _nodeNumber;
83 friend class MED_MESH_RDONLY_DRIVER;
84 friend class MED_MESH_WRONLY_DRIVER;
88 COORDINATE(int SpaceDimension, int NumberOfNodes, medModeSwitch Mode);
89 COORDINATE(const COORDINATE & m);
92 void setCoordinates(MEDARRAY<double> *Coordinate);
93 void setCoordinates(const medModeSwitch Mode, const double *Coordinate);
94 void setCoordinatesNames(const string * CoordinateName);
95 void setCoordinateName(const string CoordinateName, const int i);
96 void setCoordinatesUnits(const string * CoordinateUnit);
97 void setCoordinateUnit(const string CoordinateUnit, const int i);
98 void setCoordinatesSystem(const string CoordinateSystem);
99 void setNodesNumbers(const int * NodeNumber);
101 int getSpaceDimension() const;
102 int getNumberOfNodes() const;
104 const int* getNodesNumbers() const;
105 //const int* getNodesNumbers() ;
106 string getCoordinatesSystem() const;
108 const double * getCoordinates(medModeSwitch Mode);
109 double getCoordinate(int Number,int Axis);
110 const double * getCoordinateAxis(int Axis);
112 const string * getCoordinatesNames() const;
113 string getCoordinateName(int Axis) const;
114 const string * getCoordinatesUnits() const;
115 string getCoordinateUnit(int Axis) const;
118 #endif /* COORDINATE_HXX */