Version: 6.5.0
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. i, j and k counts from zero.

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 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 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)

Edge position to number conversion method

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

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
void GRID::getNodePosition ( const int  Number,
int &  i,
int &  j,
int &  k 
) const throw (MEDEXCEPTION)

Node number to position conversion method

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

Cell number to position conversion method

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

Edge number to poistion conversion method

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

Face number to position convertion method

Copyright © 2007-2012 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