Version: 6.3.1
Public Member Functions | Protected Attributes | Friends

MEDMEM.COORDINATE Class Reference

#include <MEDMEM_Coordinate.hxx>

Inheritance diagram for MEDMEM.COORDINATE:
Inheritance graph

Public Member Functions

 COORDINATE ()
 COORDINATE (int SpaceDimension, int NumberOfNodes, MED_EN::medModeSwitch Mode)
 COORDINATE (int SpaceDimension, const string *CoordinateName, const string *CoordinateUnit)
 COORDINATE (const COORDINATE &m)
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

Protected Attributes

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

Friends

class MED_MESH_RDONLY_DRIVER
class MED_MESH_WRONLY_DRIVER

Constructor & Destructor Documentation

COORDINATE::COORDINATE ( )

Default Constructor : should not be used

References BEGIN_OF_MED.

COORDINATE::COORDINATE ( int  SpaceDimension,
int  NumberOfNodes,
MED_EN::medModeSwitch  Mode 
)

This constructor allocate a MEDARRAY of SpaceDimension * NumberOfNodes.
It will create empty array for optional data (nodeNumber..)

References BEGIN_OF_MED.

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.

COORDINATE::COORDINATE ( const COORDINATE m)

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(), medClient_test.numberOfNodes, SCRUTE_MED, MEDMEM.PointerOf< T >.set(), MEDMEM.COORDINATE.setCoordinatesNames(), and MEDMEM.COORDINATE.setCoordinatesUnits().

COORDINATE::~COORDINATE ( ) [virtual]

References MESSAGE_MED.


Member Function Documentation

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

Sets the value in attribute _coordinate with Coordinate. _coordinate must be allocated (with COORDINATE.COORDINATE(int,int,medModeSwitch).

References MEDMEM.COORDINATE._coordinate, and MEDMEM.MEDARRAY< T >.set().

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

returns "CARTESIAN", "CYLINDRICAL" or "SPHERICAL"

References MEDMEM.COORDINATE._coordinateSystem.

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

returns a Pointer to Coordinates Array in specified mode representation

Reimplemented in MEDMEM.COORDINATEClient.

References MEDMEM.COORDINATE._coordinate, and MEDMEM.MEDARRAY< T >.get().

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 MED_MESH_RDONLY_DRIVER [friend]
friend class MED_MESH_WRONLY_DRIVER [friend]

Field Documentation

contains "CARTESIAN", "CYLINDRICAL" or "SPHERICAL"

_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.

vector<string> MEDMEM.COORDINATE._coordinateName [protected]

PointerOf to an array of size spaceDimension storing axes names

vector<string> MEDMEM.COORDINATE._coordinateUnit [protected]

PointerOf to an array of size spaceDimension storing units

PointerOf to an array of size NumberOfNodes : optional nodes numbers

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS