FIELD<T> constructors

Functions

 MEDMEM::FIELD::FIELD (const SUPPORT *Support, const int NumberOfComponents) throw (MEDEXCEPTION)

Detailed Description

The different field constructors correspond to the two main ways a field is used :


Function Documentation

template<class T , class INTERLACING_TAG >
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.

Parameters:
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.

Generated on Tue Jul 27 21:55:03 2010 for Med Memory Users' Guide by  doxygen 1.6.3