Field values

Functions

const T * MEDMEM::FIELD::getValue () const throw (MEDEXCEPTION)
const T * MEDMEM::FIELD::getRow (int i) const throw (MEDEXCEPTION)
const T * MEDMEM::FIELD::getColumn (int j) const throw (MEDEXCEPTION)
MEDMEM::FIELD::getValueIJ (int i, int j) const throw (MEDEXCEPTION)
MEDMEM::FIELD::getValueIJK (int i, int j, int k) const throw (MEDEXCEPTION)
int MEDMEM::FIELD::getValueByTypeLength (int t) const throw (MEDEXCEPTION)
const T * MEDMEM::FIELD::getValueByType (int t) const throw (MEDEXCEPTION)
MEDMEM::FIELD::getValueIJByType (int i, int j, int t) const throw (MEDEXCEPTION)
MEDMEM::FIELD::getValueIJKByType (int i, int j, int k, int t) const throw (MEDEXCEPTION)
void MEDMEM::FIELD::setValue (T *value) throw (MEDEXCEPTION)
void MEDMEM::FIELD::setRow (int i, T *value) throw (MEDEXCEPTION)
void MEDMEM::FIELD::setColumn (int i, T *value) throw (MEDEXCEPTION)
void MEDMEM::FIELD::setValueIJ (int i, int j, T value) throw (MEDEXCEPTION)
void MEDMEM::FIELD::setValueIJK (int i, int j, int k, T value) throw (MEDEXCEPTION)
void MEDMEM::FIELD::setValueIJByType (int i, int j, int t, T value) throw (MEDEXCEPTION)
void MEDMEM::FIELD::setValueIJKByType (int i, int j, int k, int t, T value) throw (MEDEXCEPTION)

Detailed Description

These methods are provided for accessing the values of a field. There are two ways to do so : one consists in using accessors that retrieve elements or group of elements from the entire field. Typical use is

FIELD field(MED_DRIVER, "result.med","Pressure");
double P0=field.getValueIJ(1,1);

Another way is to retrieve the pointer to the array that contains the variable values. In this case, the user should be aware of the interlacing mode so that no mistakes are made when retrieving the values.

FIELD field(MED_DRIVER, "result.med","Pressure");
double* ptrP=field.getValue();
double P0=ptrP[0];

Function Documentation

template<class T , class INTERLACIN_TAG >
const T * MEDMEM::FIELD< T, INTERLACIN_TAG >::getValue (  )  const throw (MEDEXCEPTION) [inherited]
template<class T , class INTERLACING_TAG >
const T * MEDMEM::FIELD< T, INTERLACING_TAG >::getRow ( int  i  )  const throw (MEDEXCEPTION) [inherited]

Returns a reference to $ i^{th} $ row of FIELD values array. If a faster accessor is intended you may use getArray() once, then MEDMEM_Array accessors. Be careful if field support is not on all elements getRow use support->getValIndFromGlobalNumber(i).

template<class T , class INTERLACING_TAG >
const T * MEDMEM::FIELD< T, INTERLACING_TAG >::getColumn ( int  j  )  const throw (MEDEXCEPTION) [inherited]

Returns a reference to $j^{th}$ column of FIELD values array.

template<class T , class INTERLACING_TAG >
T MEDMEM::FIELD< T, INTERLACING_TAG >::getValueIJ ( int  i,
int  j 
) const throw (MEDEXCEPTION) [inherited]

Returns the value of $ i^{th} $ element and $ j^{th}$ component. This method only works with fields having no particular Gauss point definition (i.e., fields having one value per element). This method makes the retrieval of the value independent from the interlacing pattern, but it is slower than the complete retrieval obtained by the getValue() method.

Returns the value of $i^{th}$ element and $j^{th}$ component. This method only works with fields having no particular Gauss point definition (i.e., fields having one value per element). This method makes the retrieval of the value independent from the interlacing pattern, but it is slower than the complete retrieval obtained by the getValue() method.

Referenced by MEDMEM::FIELD< T, INTERLACING_TAG >::buildGradient(), MEDMEM::FIELD< T, INTERLACING_TAG >::buildNorm2Field(), and MEDMEM::FIELD< T, INTERLACING_TAG >::normL2().

template<class T , class INTERLACING_TAG >
T MEDMEM::FIELD< T, INTERLACING_TAG >::getValueIJK ( int  i,
int  j,
int  k 
) const throw (MEDEXCEPTION) [inherited]

Returns the $ j^{th}$ component of $ k^{th}$ Gauss points of $ i^{th}$ value. This method is compatible with elements having more than one Gauss point. This method makes the retrieval of the value independent from the interlacing pattern, but it is slower than the complete retrieval obtained by the getValue() method.

Returns the $j^{th}$ component of $k^{th}$ Gauss points of $i^{th}$ value. This method is compatible with elements having more than one Gauss point. This method makes the retrieval of the value independent from the interlacing pattern, but it is slower than the complete retrieval obtained by the getValue() method.

template<class T , class INTERLACIN_TAG >
int MEDMEM::FIELD< T, INTERLACIN_TAG >::getValueByTypeLength ( int  t  )  const throw (MEDEXCEPTION) [inherited]

Return number of values of a geomertic type in NoInterlaceByType mode

template<class T , class INTERLACIN_TAG >
const T * MEDMEM::FIELD< T, INTERLACIN_TAG >::getValueByType ( int  t  )  const throw (MEDEXCEPTION) [inherited]

Return a reference to values array to read them.

template<class T , class INTERLACING_TAG >
T MEDMEM::FIELD< T, INTERLACING_TAG >::getValueIJByType ( int  i,
int  j,
int  t 
) const throw (MEDEXCEPTION) [inherited]

Return the value of i^{th} element in indicated type t and j^{th} component.

template<class T , class INTERLACING_TAG >
T MEDMEM::FIELD< T, INTERLACING_TAG >::getValueIJKByType ( int  i,
int  j,
int  k,
int  t 
) const throw (MEDEXCEPTION) [inherited]

Return the j^{th} component of k^{th} gauss points of i^{th} value with type t.

template<class T , class INTERLACING_TAG >
void MEDMEM::FIELD< T, INTERLACING_TAG >::setValue ( T *  value  )  throw (MEDEXCEPTION) [inherited]

This method makes it possible to have the field pointing to an existing value array. The ordering of the elements in the value array must conform to the MEDMEM ordering (I,K,J) : the outer loop is on the elements, the intermediate loop is on the Gauss points, the inner loop is on the components.

Copy new values array in FIELD according to the given mode.

Array must have right size. If not results are unpredicable. In MED_FULL_INTERLACE mode, values are stored elementwise in X1,Y1,Z1,X2,Y2,Z2.. order. In MED_NO_INTERLACE mode, values are stored componentwise in X1,X2,X3,...,Y1,Y2,Y3,... order.

template<class T , class INTERLACING_TAG >
void MEDMEM::FIELD< T, INTERLACING_TAG >::setRow ( int  i,
T *  value 
) throw (MEDEXCEPTION) [inherited]

Update values array in the j^{th} row of FIELD values array with the given ones and according to specified mode.

template<class T , class INTERLACING_TAG >
void MEDMEM::FIELD< T, INTERLACING_TAG >::setColumn ( int  j,
T *  value 
) throw (MEDEXCEPTION) [inherited]

Update values array in the $j^{th}$ column of FIELD values array with the given ones and according to specified mode.

template<class T , class INTERLACING_TAG >
void MEDMEM::FIELD< T, INTERLACING_TAG >::setValueIJ ( int  i,
int  j,
value 
) throw (MEDEXCEPTION) [inherited]

Sets the value of $ i^{th} $ element and $ j^{th}$ component with value.

Sets the value of i^{th} element and j^{th} component with the given one.

Referenced by MEDMEM::FIELD< T, INTERLACING_TAG >::buildGradient(), and MEDMEM::FIELD< T, INTERLACING_TAG >::buildNorm2Field().

template<class T , class INTERLACING_TAG >
void MEDMEM::FIELD< T, INTERLACING_TAG >::setValueIJK ( int  i,
int  j,
int  k,
value 
) throw (MEDEXCEPTION) [inherited]

Set the value of i^{th} element, j^{th} component and k^{th} gauss point with the given one.

template<class T , class INTERLACING_TAG >
void MEDMEM::FIELD< T, INTERLACING_TAG >::setValueIJByType ( int  i,
int  j,
int  t,
value 
) throw (MEDEXCEPTION) [inherited]

Set the value of i^{th} element and j^{th} component with the given one.

template<class T , class INTERLACING_TAG >
void MEDMEM::FIELD< T, INTERLACING_TAG >::setValueIJKByType ( int  i,
int  j,
int  k,
int  t,
value 
) throw (MEDEXCEPTION) [inherited]

Set the value of component of k^{th} gauss points of i^{th} element and j^{th} component with the given one.

Generated on Sat May 1 03:22:41 2010 for Med Memory Users' Guide by  doxygen 1.6.3