Version: 6.5.0
Functions
FIELD<T> constructors

Functions

 MEDMEM::FIELD< T, INTERLACING_TAG >::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)

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
Supportsupport on which the field lies
NumberOfComponentsnumber 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.

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