Med Memory Users' Guide 5.1.3
|
Functions | |
MEDMEM::FIELD::FIELD (const SUPPORT *Support, const int NumberOfComponents) throw (MEDEXCEPTION) |
The different field constructors correspond to the two main ways a field is used :
MEDMEM::FIELD< T, INTERLACING_TAG >::FIELD | ( | const SUPPORT * | Support, |
const int | NumberOfComponents | ||
) | throw (MEDEXCEPTION) [inherited] |
Constructor that allocates the value array with the dimensions provided by NumberOfComponents and the dimension of Support. The value array is allocated but not initialized. This constructor does not allow the creation of fields with Gauss points.
Support | support on which the field lies |
NumberOfComponents | number of components of the variable stored. For instance, it will be 3 for a (vx,vy,vz) vector. |
FIELD<double> field (support, 3); int nbelem = support->getNumberOfElements(MED_ALL_ELEMENTS); for (int i=1; i<=nbelem; i++) for (j=1; j<=3;j++) field->setValueIJ(i,j,0.0);
References MEDMEM::FIELD_::_interlacingType, and MEDMEM::FIELD_::_valueType.