Med Memory Users' Guide 5.1.3

Utility methods for defining element positions in the grid

Position to number conversion methods

getXXXNumber methods enable the user to convert an $ (i,j,k)$ position into a global number in the array.Axis [1,2,3] means one of directions: along i, j or k. For cell constituents (FACE or EDGE), Axis selects one of those having same $ (i, j, k )$ :

  • a FACE which is normal to direction along given Axis;
  • an EDGE going along given Axis.
Exception for Axis out of range. For 2D grids, k is a dummy argument.
int MEDMEM::GRID::getEdgeNumber (const int Axis, const int i, const int j=0, const int k=0) const throw (MEDEXCEPTION)
int MEDMEM::GRID::getFaceNumber (const int Axis, const int i, const int j=0, const int k=0) const throw (MEDEXCEPTION)

Number to position conversion methods

getXXXPosition functions enable the user to convert a number into a $ (i,j,k) $ position. Axis [1,2,3] means one of directions: along i, j or k For Cell contituents (FACE or EDGE), Axis selects one of those having same (i,j,k):

  • a FACE which is normal to direction along given Axis;
  • an EDGE going along given Axis.
Exception for Number out of range.
void MEDMEM::GRID::getNodePosition (const int Number, int &i, int &j, int &k) const throw (MEDEXCEPTION)
void MEDMEM::GRID::getCellPosition (const int Number, int &i, int &j, int &k) const throw (MEDEXCEPTION)
void MEDMEM::GRID::getEdgePosition (const int Number, int &Axis, int &i, int &j, int &k) const throw (MEDEXCEPTION)
void MEDMEM::GRID::getFacePosition (const int Number, int &Axis, int &i, int &j, int &k) const throw (MEDEXCEPTION)

Detailed Description

These methods enable the user to convert a position on the grid to a global element number


Function Documentation

int GRID::getEdgeNumber ( const int  Axis,
const int  i,
const int  j = 0,
const int  k = 0 
) const throw (MEDEXCEPTION) [inherited]

Edge position to number conversion method

Referenced by MEDMEM::GRID::fillConnectivity().

int GRID::getFaceNumber ( const int  Axis,
const int  i,
const int  j = 0,
const int  k = 0 
) const throw (MEDEXCEPTION) [inherited]

Returns a NODE, EDGE, FACE, CELL number by its position in the grid. Axis [1,2,3] means one of directions: along i, j or k For Cell contituents (FACE or EDGE), Axis selects one of those having same (i,j,k):

  • a FACE which is normal to direction along given Axis;
  • an EDGE going along given Axis. Exception for Axis out of range

Referenced by MEDMEM::GRID::fillConnectivity().

void GRID::getNodePosition ( const int  Number,
int &  i,
int &  j,
int &  k 
) const throw (MEDEXCEPTION) [inherited]

Node number to position conversion method

void GRID::getCellPosition ( const int  Number,
int &  i,
int &  j,
int &  k 
) const throw (MEDEXCEPTION) [inherited]

Cell number to position conversion method

void GRID::getEdgePosition ( const int  Number,
int &  Axis,
int &  i,
int &  j,
int &  k 
) const throw (MEDEXCEPTION) [inherited]

Edge number to poistion conversion method

void GRID::getFacePosition ( const int  Number,
int &  Axis,
int &  i,
int &  j,
int &  k 
) const throw (MEDEXCEPTION) [inherited]

Face number to position convertion method