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) |
T | MEDMEM::FIELD::getValueIJ (int i, int j) const throw (MEDEXCEPTION) |
T | 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) |
T | MEDMEM::FIELD::getValueIJByType (int i, int j, int t) const throw (MEDEXCEPTION) |
T | 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) |
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];
const T * MEDMEM::FIELD< T, INTERLACIN_TAG >::getValue | ( | ) | const throw (MEDEXCEPTION) [inherited] |
Returns a pointer to the value array.
Returns a reference to values array to read them.
References MEDMEM::FIELD< T, INTERLACING_TAG >::_value, and MEDMEM::FIELD< T, INTERLACING_TAG >::getGaussPresence().
Referenced by MEDMEM::FIELD< T, INTERLACING_TAG >::applyFunc(), MEDMEM::FIELD< T, INTERLACING_TAG >::applyLin(), MEDMEM::FIELD< T, INTERLACING_TAG >::execFunc(), MEDMEM::FIELD< T, INTERLACING_TAG >::extract(), MEDMEM::FIELD< T, INTERLACING_TAG >::fillFromAnalytic(), MEDMEM::MESH::getArea(), MEDMEM::MESH::getBarycenter(), MEDMEM::MESH::getNormal(), MEDMEM::MESH::mergeFields(), MEDMEM::FIELD< T, INTERLACING_TAG >::norm2(), MEDMEM::FIELD< T, INTERLACING_TAG >::normL1(), MEDMEM::FIELD< T, INTERLACING_TAG >::normL2(), MEDMEM::FIELD< T, INTERLACING_TAG >::normMax(), MEDMEM::FIELD< T, INTERLACING_TAG >::operator*=(), MEDMEM::FIELD< T, INTERLACING_TAG >::operator+=(), MEDMEM::FIELD< T, INTERLACING_TAG >::operator-(), MEDMEM::FIELD< T, INTERLACING_TAG >::operator-=(), MEDMEM::FIELD< T, INTERLACING_TAG >::operator/=(), MEDMEM::FIELD< T, INTERLACING_TAG >::operator=(), and MEDMEM::FIELD< T, INTERLACING_TAG >::scalarProduct().
const T * MEDMEM::FIELD< T, INTERLACING_TAG >::getRow | ( | int | i | ) | const throw (MEDEXCEPTION) [inherited] |
Returns a reference to 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).
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.
T MEDMEM::FIELD< T, INTERLACING_TAG >::getValueIJ | ( | int | i, | |
int | j | |||
) | const throw (MEDEXCEPTION) [inherited] |
Returns the value of element and
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().
T MEDMEM::FIELD< T, INTERLACING_TAG >::getValueIJK | ( | int | i, | |
int | j, | |||
int | k | |||
) | const throw (MEDEXCEPTION) [inherited] |
Returns the component of
Gauss points of
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.
int MEDMEM::FIELD< T, INTERLACIN_TAG >::getValueByTypeLength | ( | int | t | ) | const throw (MEDEXCEPTION) [inherited] |
Return number of values of a geomertic type in NoInterlaceByType mode
const T * MEDMEM::FIELD< T, INTERLACIN_TAG >::getValueByType | ( | int | t | ) | const throw (MEDEXCEPTION) [inherited] |
Return a reference to values array to read them.
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.
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.
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.
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.
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.
void MEDMEM::FIELD< T, INTERLACING_TAG >::setValueIJ | ( | int | i, | |
int | j, | |||
T | value | |||
) | throw (MEDEXCEPTION) [inherited] |
Sets the value of element and
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().
void MEDMEM::FIELD< T, INTERLACING_TAG >::setValueIJK | ( | int | i, | |
int | j, | |||
int | k, | |||
T | value | |||
) | throw (MEDEXCEPTION) [inherited] |
Set the value of i^{th} element, j^{th} component and k^{th} gauss point with the given one.
void MEDMEM::FIELD< T, INTERLACING_TAG >::setValueIJByType | ( | int | i, | |
int | j, | |||
int | t, | |||
T | value | |||
) | throw (MEDEXCEPTION) [inherited] |
Set the value of i^{th} element and j^{th} component with the given one.
void MEDMEM::FIELD< T, INTERLACING_TAG >::setValueIJKByType | ( | int | i, | |
int | j, | |||
int | k, | |||
int | t, | |||
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.