Version: 5.1.6


#include <MEDMEM_Coordinate.hxx>

Inheritance diagram for MEDMEM.COORDINATE:
Inheritance graph

Public Member Functions

 COORDINATE (int SpaceDimension, int NumberOfNodes, MED_EN::medModeSwitch Mode)
 COORDINATE (int SpaceDimension, const string *CoordinateName, const string *CoordinateUnit)
virtual ~COORDINATE ()
void setCoordinates (MEDARRAY< double > *Coordinate, bool shallowCopy=false)
void setCoordinates (const MED_EN::medModeSwitch Mode, const double *Coordinate)
void setCoordinatesNames (const string *CoordinateName)
void setCoordinateName (const string CoordinateName, const int i)
void setCoordinatesUnits (const string *CoordinateUnit)
void setCoordinateUnit (const string CoordinateUnit, const int i)
void setCoordinatesSystem (const string CoordinateSystem)
void setNodesNumbers (const int *NodeNumber)
int getSpaceDimension () const
int getNumberOfNodes () const
virtual const intgetNodesNumbers () const
string getCoordinatesSystem () const
virtual const doublegetCoordinates (MED_EN::medModeSwitch Mode)
virtual double getCoordinate (int Number, int Axis)
virtual const doublegetCoordinateAxis (int Axis)
const string * getCoordinatesNames () const
string getCoordinateName (int Axis) const
const string * getCoordinatesUnits () const
string getCoordinateUnit (int Axis) const

Data Fields

string _coordinateSystem
MEDARRAY< double_coordinate
vector< string > _coordinateName
vector< string > _coordinateUnit
PointerOf< int_nodeNumber



Constructor & Destructor Documentation


Default Constructor : should not be used

References BEGIN_OF_MED.

int  NumberOfNodes,
MED_EN::medModeSwitch  Mode 
COORDINATE::COORDINATE ( int  SpaceDimension,
const string *  CoordinateName,
const string *  CoordinateUnit 

This constructor is specialy designed for use in class GRID.
The purpose is to create a COORDINATE without allocating memory for nodes (in the MEDARRAY). The allocation (call to setCoordinates) is performed afterward by GRID, if necessary. We set _coordinateName & _coordinateUnit in the constructor, because calls to setCoordinateName and setCoordinateUnit are not possible before allocation of MEDARRAY.

References MEDMEM.COORDINATE._coordinateName, and MEDMEM.COORDINATE._coordinateUnit.


This constructor will COPY all data (it is a deep copy) included in m.
But only the default storage mode of coordinates array will be copied (not both storage representation modes even if they both exist in original object) : for example only full_interlace mode

References MEDMEM.COORDINATE._coordinate, MEDMEM.COORDINATE._nodeNumber, BEGIN_OF_MED, MEDMEM.COORDINATE.getCoordinatesNames(), MEDMEM.COORDINATE.getCoordinatesUnits(), MEDMEM.MEDARRAY< T >.getLeadingValue(), MEDMEM.MEDARRAY< T >.getLengthValue(), NULL, medClient_test.numberOfNodes, SCRUTE_MED, MEDMEM.PointerOf< T >.set(), MEDMEM.COORDINATE.setCoordinatesNames(), and MEDMEM.COORDINATE.setCoordinatesUnits().


References MESSAGE_MED.

Member Function Documentation

void COORDINATE::setCoordinates ( MEDARRAY< double > *  Coordinate,
bool  shallowCopy = false 
void MEDMEM.COORDINATE.setCoordinates ( const MED_EN::medModeSwitch  Mode,
const double Coordinate 
void COORDINATE::setCoordinatesNames ( const string *  CoordinateName  ) 

sets the attribute _coordinateName with CoordinateName

References MEDMEM.COORDINATE._coordinateName, and MEDMEM.COORDINATE.getSpaceDimension().

void COORDINATE::setCoordinateName ( const string  CoordinateName,
const int  i 

sets the (i+1)^th component of the attribute _coordinateName with CoordinateName

References MEDMEM.COORDINATE._coordinateName.

void COORDINATE::setCoordinatesUnits ( const string *  CoordinateUnit  ) 

sets the attribute _coordinateUnit with CoordinateUnit

References MEDMEM.COORDINATE._coordinateUnit, and MEDMEM.COORDINATE.getSpaceDimension().

void COORDINATE::setCoordinateUnit ( const string  CoordinateUnit,
const int  i 

sets the (i+1)^th component of the attribute _coordinateUnit with CoordinateUnit

References MEDMEM.COORDINATE._coordinateUnit.

void COORDINATE::setCoordinatesSystem ( const string  CoordinateSystem  ) 

sets the attribute _coordinateSystem with CoordinateSystem

References MEDMEM.COORDINATE._coordinateSystem.

void COORDINATE::setNodesNumbers ( const int NodeNumber  ) 

sets the attribute _nodeNumber with NodeNumber

References MEDMEM.COORDINATE._nodeNumber, MEDMEM.COORDINATE.getNumberOfNodes(), and MEDMEM.PointerOf< T >.set().

int COORDINATE::getSpaceDimension (  )  const
int COORDINATE::getNumberOfNodes (  )  const
const int * COORDINATE::getNodesNumbers (  )  const [virtual]

returns a pointer to the optional array storing eventual nodes numbers

Reimplemented in MEDMEM.COORDINATEClient.

References MEDMEM.COORDINATE._nodeNumber.

string COORDINATE::getCoordinatesSystem (  )  const


References MEDMEM.COORDINATE._coordinateSystem.

virtual const double* MEDMEM.COORDINATE.getCoordinates ( MED_EN::medModeSwitch  Mode  )  [virtual]

Reimplemented in MEDMEM.COORDINATEClient.

double COORDINATE::getCoordinate ( int  Number,
int  Axis 
) [virtual]
const double * COORDINATE::getCoordinateAxis ( int  Axis  )  [virtual]
const string * COORDINATE::getCoordinatesNames (  )  const

returns an array with names of coordinates.
Example :

  • x,y,z
  • r,teta,phi
  • ...

References MEDMEM.COORDINATE._coordinateName.

string COORDINATE::getCoordinateName ( int  Axis  )  const
const string * COORDINATE::getCoordinatesUnits (  )  const

returns an array with units of coordinates (cm, m, mm, ...) It could be empty. We suppose we are IS (meter).

References MEDMEM.COORDINATE._coordinateUnit.

string COORDINATE::getCoordinateUnit ( int  Axis  )  const

returns the unit of axis Axis

Friends And Related Function Documentation

friend class IMED_MESH_RDONLY_DRIVER [friend]
friend class MED_MESH_RDONLY_DRIVER21 [friend]
friend class IMED_MESH_WRONLY_DRIVER [friend]
friend class MED_MESH_WRONLY_DRIVER21 [friend]
friend class MED_MESH_RDONLY_DRIVER22 [friend]
friend class MED_MESH_WRONLY_DRIVER22 [friend]

Field Documentation


_coordinate is a MEDARRAY<double> object :

  • spaceDimension
  • numberOfNodes
  • default storage mode
  • Up to 4 "PointerOf" to an array of size spaceDimension*NumberOfNodes

Storing the object (not a pointer to this object) is more convenient for memory management.

PointerOf to an array of size spaceDimension storing axes names

PointerOf to an array of size spaceDimension storing units

PointerOf to an array of size NumberOfNodes : optional nodes numbers