11 #include "MEDMEM_PointerOf.hxx"
12 #include "MEDMEM_Exception.hxx"
13 #include "MEDMEM_define.hxx"
16 #include "MEDMEM_Array.hxx"
19 This class contains coordinates of the nodes ./n
20 It could also store useful optional information about nodes
21 as node numbers and about axes as names or units. /n
22 spaceDimension and numberOfNodes can be found in _coordinate object.
30 /*! contains "CARTESIAN",
31 "CYLINDRICAL" or "SPHERICAL"*/
32 string _coordinateSystem;
35 /*! _coordinate is a MEDARRAY<double> object : \n
38 - default storage mode /n
39 - Up to 4 "PointerOf" to an array of size spaceDimension*NumberOfNodes/n
41 Storing the object (not a pointer to this object) is more convenient for memory
44 mutable MEDARRAY<double> _coordinate;
46 /*! PointerOf to an array of size spaceDimension storing axes names*/
47 PointerOf<string> _coordinateName;
49 /*! PointerOf to an array of size spaceDimension storing units */
50 PointerOf<string> _coordinateUnit;
52 /*! PointerOf to an array of size NumberOfNodes : optional nodes numbers */
53 PointerOf<int> _nodeNumber;
58 friend class MED_MESH_RDONLY_DRIVER;
59 friend class MED_MESH_WRONLY_DRIVER;
63 COORDINATE(int SpaceDimension, int NumberOfNodes, medModeSwitch Mode);
64 COORDINATE(const COORDINATE & m);
65 virtual ~COORDINATE();
67 void setCoordinates(MEDARRAY<double> *Coordinate);
68 void setCoordinates(const medModeSwitch Mode, const double *Coordinate);
69 void setCoordinatesNames(const string * CoordinateName);
70 void setCoordinateName(const string CoordinateName, const int i);
71 void setCoordinatesUnits(const string * CoordinateUnit);
72 void setCoordinateUnit(const string CoordinateUnit, const int i);
73 void setCoordinatesSystem(const string CoordinateSystem);
74 void setNodesNumbers(const int * NodeNumber);
76 int getSpaceDimension() const;
77 int getNumberOfNodes() const;
79 virtual const int* getNodesNumbers() const;
80 //const int* getNodesNumbers() ;
81 string getCoordinatesSystem() const;
83 virtual const double * getCoordinates(medModeSwitch Mode);
84 virtual double getCoordinate(int Number,int Axis);
85 virtual const double * getCoordinateAxis(int Axis);
87 const string * getCoordinatesNames() const;
88 string getCoordinateName(int Axis) const;
89 const string * getCoordinatesUnits() const;
90 string getCoordinateUnit(int Axis) const;
94 #endif /* COORDINATE_HXX */