Version: 5.1.6

MEDMEM.FIELD< T, INTERLACING_TAG > Class Template Reference

#include <MEDMEM_Field.hxx>

Inheritance diagram for MEDMEM.FIELD< T, INTERLACING_TAG >:
Inheritance graph

Public Types

typedef MEDMEM_ArrayInterface
< T, INTERLACING_TAG, NoGauss >
::Array 
ArrayNoGauss
typedef MEDMEM_ArrayInterface
< T, INTERLACING_TAG, Gauss >
::Array 
ArrayGauss
typedef MEDMEM_ArrayInterface
< T, NoInterlace, NoGauss >
::Array 
ArrayNo
typedef MEDMEM_ArrayInterface
< T, FullInterlace, NoGauss >
::Array 
ArrayFull
typedef MEDMEM_ArrayInterface
< T, NoInterlaceByType,
NoGauss >::Array 
ArrayNoByType
typedef MEDMEM_ArrayInterface
< T, NoInterlaceByType, Gauss >
::Array 
ArrayNoByTypeGauss
typedef MEDMEM_Array_ Array
typedef T ElementType
typedef INTERLACING_TAG InterlacingTag
typedef map
< MED_EN::medGeometryElement,
GAUSS_LOCALIZATION_ * > 
locMap
typedef void(* myFuncType )(const double *, T *)
typedef void(* myFuncType2 )(const T *, T *)

Public Member Functions

void _operation (const FIELD &m, const FIELD &n, const char *Op)
void _operationInitialize (const FIELD &m, const FIELD &n, const char *Op)
void _add_in_place (const FIELD &m, const FIELD &n)
void _sub_in_place (const FIELD &m, const FIELD &n)
void _mul_in_place (const FIELD &m, const FIELD &n)
void _div_in_place (const FIELD &m, const FIELD &n) throw (MEDEXCEPTION)
 FIELD ()
 FIELD (const FIELD &m)
 FIELD (const SUPPORT *Support, const int NumberOfComponents) throw (MEDEXCEPTION)
 FIELD (driverTypes driverType, const string &fileName, const string &fieldDriverName, const int iterationNumber=-1, const int orderNumber=-1, MESH *mesh=0) throw (MEDEXCEPTION)
 FIELD (const SUPPORT *Support, driverTypes driverType, const string &fileName="", const string &fieldName="", const int iterationNumber=-1, const int orderNumber=-1) throw (MEDEXCEPTION)
 ~FIELD ()
FIELDoperator= (const FIELD &m)
FIELDoperator= (T value)
const FIELD operator+ (const FIELD &m) const
const FIELD operator- (const FIELD &m) const
const FIELD operator* (const FIELD &m) const
const FIELD operator/ (const FIELD &m) const
const FIELD operator- () const
FIELDoperator+= (const FIELD &m)
FIELDoperator-= (const FIELD &m)
FIELDoperator*= (const FIELD &m)
FIELDoperator/= (const FIELD &m)
void applyLin (T a, T b, int icomp)
double normMax () const throw (MEDEXCEPTION)
void getMinMax (T &vmin, T &vmax) throw (MEDEXCEPTION)
vector< intgetHistogram (int &nbint) throw (MEDEXCEPTION)
FIELD< double > * buildGradient () const throw (MEDEXCEPTION)
FIELD< double > * buildNorm2Field () const throw (MEDEXCEPTION)
double norm2 () const throw (MEDEXCEPTION)
void applyLin (T a, T b)
template<T T_function>
void applyFunc ()
void applyPow (T scalar)
double normL2 (int component, const FIELD< double, FullInterlace > *p_field_volume=0) const
double normL2 (const FIELD< double, FullInterlace > *p_field_volume=0) const
double normL1 (int component, const FIELD< double, FullInterlace > *p_field_volume=0) const
double normL1 (const FIELD< double, FullInterlace > *p_field_volume=0) const
double integral (const SUPPORT *subSupport=0) const throw (MEDEXCEPTION)
 Return integral of the field.
FIELDextract (const SUPPORT *subSupport) const throw (MEDEXCEPTION)
void init ()
void rmDriver (int index=0)
int addDriver (driverTypes driverType, const string &fileName="Default File Name.med", const string &driverFieldName="Default Field Name", MED_EN::med_mode_acces access=MED_EN::RDWR)
int addDriver (GENDRIVER &driver)
void allocValue (const int NumberOfComponents)
void allocValue (const int NumberOfComponents, const int LengthValue)
void deallocValue ()
void read (int index=0)
void read (const GENDRIVER &genDriver)
void write (int index=0, const string &driverName="")
void write (const GENDRIVER &)
void writeAppend (int index=0, const string &driverName="")
void writeAppend (const GENDRIVER &)
MEDMEM_Array_getArray () const throw (MEDEXCEPTION)
ArrayGaussgetArrayGauss () const throw (MEDEXCEPTION)
ArrayNoGaussgetArrayNoGauss () const throw (MEDEXCEPTION)
bool getGaussPresence () const throw (MEDEXCEPTION)
int getValueLength () const throw (MEDEXCEPTION)
const T * getValue () const throw (MEDEXCEPTION)
const T * getRow (int i) const throw (MEDEXCEPTION)
const T * getColumn (int j) const throw (MEDEXCEPTION)
getValueIJ (int i, int j) const throw (MEDEXCEPTION)
getValueIJK (int i, int j, int k) const throw (MEDEXCEPTION)
int getValueByTypeLength (int t) const throw (MEDEXCEPTION)
const T * getValueByType (int t) const throw (MEDEXCEPTION)
getValueIJByType (int i, int j, int t) const throw (MEDEXCEPTION)
getValueIJKByType (int i, int j, int k, int t) const throw (MEDEXCEPTION)
bool getValueOnElement (int eltIdInSup, T *retValues) const throw (MEDEXCEPTION)
const int getNumberOfGeometricTypes () const throw (MEDEXCEPTION)
const GAUSS_LOCALIZATION
< INTERLACING_TAG > & 
getGaussLocalization (MED_EN::medGeometryElement geomElement) const throw (MEDEXCEPTION)
const GAUSS_LOCALIZATION
< INTERLACING_TAG > * 
getGaussLocalizationPtr (MED_EN::medGeometryElement geomElement) const throw (MEDEXCEPTION)
const GAUSS_LOCALIZATION_getGaussLocalizationRoot (MED_EN::medGeometryElement geomElement) const throw (MEDEXCEPTION)
 Return GAUSS_LOCALIZATION_* whose interlacing type may differ from one of the field.
void setGaussLocalization (MED_EN::medGeometryElement geomElement, const GAUSS_LOCALIZATION< INTERLACING_TAG > &gaussloc)
void setGaussLocalization (MED_EN::medGeometryElement geomElement, GAUSS_LOCALIZATION_ *gaussloc)
 Take onership of GAUSS_LOCALIZATION_* whose interlacing type may differ from one of the field.
const intgetNumberOfGaussPoints () const throw (MEDEXCEPTION)
const int getNumberOfGaussPoints (MED_EN::medGeometryElement geomElement) const throw (MEDEXCEPTION)
const int getNbGaussI (int i) const throw (MEDEXCEPTION)
const intgetNumberOfElements () const throw (MEDEXCEPTION)
const MED_EN::medGeometryElementgetGeometricTypes () const throw (MEDEXCEPTION)
bool isOnAllElements () const throw (MEDEXCEPTION)
void setArray (MEDMEM_Array_ *value) throw (MEDEXCEPTION)
void setValue (T *value) throw (MEDEXCEPTION)
void setRow (int i, T *value) throw (MEDEXCEPTION)
void setColumn (int i, T *value) throw (MEDEXCEPTION)
void setValueIJ (int i, int j, T value) throw (MEDEXCEPTION)
void setValueIJK (int i, int j, int k, T value) throw (MEDEXCEPTION)
void setValueIJByType (int i, int j, int t, T value) throw (MEDEXCEPTION)
void setValueIJKByType (int i, int j, int k, int t, T value) throw (MEDEXCEPTION)
void fillFromAnalytic (myFuncType f) throw (MEDEXCEPTION)
FIELD< T, INTERLACING_TAG > * execFunc (int nbOfComponents, myFuncType2 f) throw (MEDEXCEPTION)

Static Public Member Functions

static T pow (T x)
static FIELDadd (const FIELD &m, const FIELD &n)
static FIELDaddDeep (const FIELD &m, const FIELD &n)
static FIELDsub (const FIELD &m, const FIELD &n)
static FIELDsubDeep (const FIELD &m, const FIELD &n)
static FIELDmul (const FIELD &m, const FIELD &n)
static FIELDmulDeep (const FIELD &m, const FIELD &n)
static FIELDdiv (const FIELD &m, const FIELD &n)
static FIELDdivDeep (const FIELD &m, const FIELD &n)
static FIELDscalarProduct (const FIELD &m, const FIELD &n, bool deepCheck=false)

Data Fields

Array_value
MESH_mesh
_vmin
_vmax
map
< MED_EN::medGeometryElement,
GAUSS_LOCALIZATION_ * > 
_gaussModel

Static Public Attributes

static T _scalarForPow = 1

Friends

class MED_FIELD_RDONLY_DRIVER21< T >
class MED_FIELD_WRONLY_DRIVER21< T >
class MED_FIELD_RDONLY_DRIVER22< T >
class MED_FIELD_WRONLY_DRIVER22< T >
class VTK_FIELD_DRIVER< T >

template<class T, class INTERLACING_TAG>
class MEDMEM::FIELD< T, INTERLACING_TAG >


Member Typedef Documentation

template<class T, class INTERLACING_TAG>
typedef MEDMEM_ArrayInterface<T,INTERLACING_TAG,NoGauss>::Array MEDMEM.FIELD< T, INTERLACING_TAG >.ArrayNoGauss
template<class T, class INTERLACING_TAG>
typedef MEDMEM_ArrayInterface<T,INTERLACING_TAG,Gauss>::Array MEDMEM.FIELD< T, INTERLACING_TAG >.ArrayGauss
template<class T, class INTERLACING_TAG>
typedef MEDMEM_ArrayInterface<T,NoInterlace,NoGauss>::Array MEDMEM.FIELD< T, INTERLACING_TAG >.ArrayNo
template<class T, class INTERLACING_TAG>
typedef MEDMEM_ArrayInterface<T,FullInterlace,NoGauss>::Array MEDMEM.FIELD< T, INTERLACING_TAG >.ArrayFull
template<class T, class INTERLACING_TAG>
typedef MEDMEM_ArrayInterface<T,NoInterlaceByType,NoGauss>::Array MEDMEM.FIELD< T, INTERLACING_TAG >.ArrayNoByType
template<class T, class INTERLACING_TAG>
typedef MEDMEM_ArrayInterface<T,NoInterlaceByType,Gauss>::Array MEDMEM.FIELD< T, INTERLACING_TAG >.ArrayNoByTypeGauss
template<class T, class INTERLACING_TAG>
typedef MEDMEM_Array_ MEDMEM.FIELD< T, INTERLACING_TAG >.Array
template<class T, class INTERLACING_TAG>
typedef T MEDMEM.FIELD< T, INTERLACING_TAG >.ElementType
template<class T, class INTERLACING_TAG>
typedef INTERLACING_TAG MEDMEM.FIELD< T, INTERLACING_TAG >.InterlacingTag
template<class T, class INTERLACING_TAG>
typedef map<MED_EN::medGeometryElement,GAUSS_LOCALIZATION_*> MEDMEM.FIELD< T, INTERLACING_TAG >.locMap
template<class T, class INTERLACING_TAG>
typedef void(* MEDMEM.FIELD< T, INTERLACING_TAG >.myFuncType)(const double *, T *)

This fonction feeds the FIELD<double> private attributs _value with the volume of each cells belonging to the argument Support. The field has to be initialised via the constructor FIELD<double>(const SUPPORT * , const int ) with Support as SUPPORT argument, 1 has the number of components, and Support has be a SUPPORT on 3D cells. This initialisation could be done by the empty constructor followed by a setSupport and setNumberOfComponents call.

This fonction feeds the FIELD<double> private attributs _value with the area of each cells (or faces) belonging to the attribut _support. The field has to be initialised via the constructor FIELD<double>(const SUPPORT * , const int ) with 1 has the number of components, and _support has be a SUPPORT on 2D cells or 3D faces. This initialisation could be done by the empty constructor followed by a setSupport and setNumberOfComponents call.

This fonction feeds the FIELD<double> private attributs _value with the length of each segments belonging to the attribut _support. The field has to be initialised via the constructor FIELD<double>(const SUPPORT * , const int ) with 1 has the number of components, and _support has be a SUPPORT on 3D edges or 2D faces. This initialisation could be done by the empty constructor followed by a setSupport and setNumberOfComponents call.

This fonction feeds the FIELD<double> private attributs _value with the normal vector of each faces belonging to the attribut _support. The field has to be initialised via the constructor FIELD<double>(const SUPPORT * , const int ) with the space dimension has the number of components, and _support has be a SUPPORT on 3D or 2D faces. This initialisation could be done by the empty constructor followed by a setSupport and setNumberOfComponents call.

This fonction feeds the FIELD<double> private attributs _value with the barycenter of each faces or cells or edges belonging to the attribut _support. The field has to be initialised via the constructor FIELD<double>(const SUPPORT * ,const int ) with the space dimension has the number of components, and _support has be a SUPPORT on 3D cells or 2D faces. This initialisation could be done by the empty constructor followed by a setSupport and setNumberOfComponents call.

template<class T, class INTERLACING_TAG>
typedef void(* MEDMEM.FIELD< T, INTERLACING_TAG >.myFuncType2)(const T *, T *)

Constructor & Destructor Documentation

template<class T , class INTERLACING_TAG >
MEDMEM.FIELD< T, INTERLACING_TAG >::FIELD (  ) 
template<class T , class INTERLACING_TAG >
MEDMEM.FIELD< T, INTERLACING_TAG >::FIELD ( const FIELD< T, INTERLACING_TAG > &  m  ) 
template<class T , class INTERLACING_TAG >
MEDMEM.FIELD< T, INTERLACING_TAG >::~FIELD (  ) 

Member Function Documentation

template<class T, class INTERLACING_TAG>
void MEDMEM.FIELD< T, INTERLACING_TAG >._operation ( const FIELD< T, INTERLACING_TAG > &  m,
const FIELD< T, INTERLACING_TAG > &  n,
const char *  Op 
)
template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::_operationInitialize ( const FIELD< T, INTERLACING_TAG > &  m,
const FIELD< T, INTERLACING_TAG > &  n,
const char *  Op 
)
template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::_add_in_place ( const FIELD< T, INTERLACING_TAG > &  m,
const FIELD< T, INTERLACING_TAG > &  n 
)
template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::_sub_in_place ( const FIELD< T, INTERLACING_TAG > &  m,
const FIELD< T, INTERLACING_TAG > &  n 
)
template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::_mul_in_place ( const FIELD< T, INTERLACING_TAG > &  m,
const FIELD< T, INTERLACING_TAG > &  n 
)
template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::_div_in_place ( const FIELD< T, INTERLACING_TAG > &  m,
const FIELD< T, INTERLACING_TAG > &  n 
) throw (MEDEXCEPTION)
template<class T , class INTERLACING_TAG >
FIELD< T, INTERLACING_TAG > & MEDMEM.FIELD< T, INTERLACING_TAG >::operator= ( const FIELD< T, INTERLACING_TAG > &  m  ) 
template<class T, class INTERLACING_TAG >
FIELD< T, INTERLACING_TAG > & MEDMEM.FIELD< T, INTERLACING_TAG >::operator= ( value  ) 
template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::init (  ) 
template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::rmDriver ( int  index = 0  )  [virtual]

Remove the driver referenced by its index.

Reimplemented from MEDMEM.FIELD_.

References MEDMEM.FIELD_._drivers, BEGIN_OF_MED, END_OF_MED, LOCALIZED, MED_EXCEPTION, and MESSAGE_MED.

template<class T , class INTERLACING_TAG >
int MEDMEM.FIELD< T, INTERLACING_TAG >::addDriver ( driverTypes  driverType,
const string &  fileName = "Default File Name.med",
const string &  driverName = "Default Field Name",
MED_EN::med_mode_acces  access = MED_EN::RDWR 
) [virtual]

Creates the specified driver and return its index reference to path to read or write methods.

Parameters:
driverType specifies the file type (MED_DRIVER or VTK_DRIVER)
fileName name of the output file
driverName name of the field
access access type (read, write or both)

Reimplemented from MEDMEM.FIELD_.

References MEDMEM.FIELD_._drivers, BEGIN_OF_MED, MEDMEM.DRIVERFACTORY.buildDriverForField(), END_OF_MED, and SCRUTE_MED.

template<class T , class INTERLACING_TAG >
int MEDMEM.FIELD< T, INTERLACING_TAG >::addDriver ( GENDRIVER driver  )  [virtual]
template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::allocValue ( const int  NumberOfComponents  ) 
template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::allocValue ( const int  NumberOfComponents,
const int  LengthValue 
)
template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::deallocValue (  ) 
template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::read ( int  index = 0  )  [virtual]

Read FIELD in the file specified in the driver given by its index.

Reimplemented from MEDMEM.FIELD_.

References MEDMEM.FIELD_._drivers, BEGIN_OF_MED, END_OF_MED, LOCALIZED, and MED_EXCEPTION.

template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::read ( const GENDRIVER genDriver  )  [virtual]

For internal use only.

Read FIELD with the driver which is equal to the given driver.Use by MED object.

Reimplemented from MEDMEM.FIELD_.

References MEDMEM.FIELD_._drivers, BEGIN_OF_MED, and END_OF_MED.

template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::write ( int  index = 0,
const string &  driverName = "" 
) [virtual]

Writes FIELD in the file specified by the driver handle index.

Example :

//...
// Attaching the friver to file "output.med", meshname "Mesh"
int driver_handle = mesh.addDriver(MED_DRIVER, "output.med", "Mesh");
// Writing the content of mesh to the file 
mesh.write(driver_handle);

Reimplemented from MEDMEM.FIELD_.

References MEDMEM.FIELD_._drivers, BEGIN_OF_MED, END_OF_MED, LOCALIZED, and MED_EXCEPTION.

template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::write ( const GENDRIVER genDriver  )  [virtual]

For internal use only.

Write FIELD with the driver which is equal to the given driver.Use by MED object.

Reimplemented from MEDMEM.FIELD_.

References MEDMEM.FIELD_._drivers, BEGIN_OF_MED, and END_OF_MED.

template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::writeAppend ( int  index = 0,
const string &  driverName = "" 
) [virtual]

Write FIELD in the file specified in the driver given by its index. Use this method for ASCII drivers (e.g. VTK_DRIVER)

Reimplemented from MEDMEM.FIELD_.

References MEDMEM.FIELD_._drivers, BEGIN_OF_MED, END_OF_MED, LOCALIZED, and MED_EXCEPTION.

template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::writeAppend ( const GENDRIVER genDriver  )  [virtual]

For internal use only.

Write FIELD with the driver which is equal to the given driver.Use by MED object. Use this method for ASCII drivers (e.g. VTK_DRIVER).

Reimplemented from MEDMEM.FIELD_.

References MEDMEM.FIELD_._drivers, BEGIN_OF_MED, and END_OF_MED.

template<class T , class INTERLACING_TAG >
MEDMEM_Array_ * MEDMEM.FIELD< T, INTERLACING_TAG >::getArray (  )  const throw (MEDEXCEPTION)
template<class T , class INTERLACING_TAG >
MEDMEM_ArrayInterface< T, INTERLACING_TAG, Gauss >::Array * MEDMEM.FIELD< T, INTERLACING_TAG >::getArrayGauss (  )  const throw (MEDEXCEPTION)
template<class T , class INTERLACING_TAG >
MEDMEM_ArrayInterface< T, INTERLACING_TAG, NoGauss >::Array * MEDMEM.FIELD< T, INTERLACING_TAG >::getArrayNoGauss (  )  const throw (MEDEXCEPTION)
template<class T , class INTERLACING_TAG >
bool MEDMEM.FIELD< T, INTERLACING_TAG >::getGaussPresence (  )  const throw (MEDEXCEPTION) [virtual]
template<class T , class INTERLACING_TAG >
int MEDMEM.FIELD< T, INTERLACING_TAG >::getValueLength (  )  const throw (MEDEXCEPTION)

Return the actual length of the reference to values array returned by getValue. Take care of number of components and number of Gauss points by geometric type

References MEDMEM.FIELD< T, INTERLACING_TAG >._value, and MEDMEM.FIELD< T, INTERLACING_TAG >.getGaussPresence().

template<class T , class INTERLACIN_TAG >
const T * MEDMEM.FIELD< T, INTERLACIN_TAG >::getValue (  )  const throw (MEDEXCEPTION)

Returns a pointer to the value array.

Returns a reference to values array to read them.

References MEDMEM.FIELD< T, INTERLACING_TAG >._value, BEGIN_OF_MED, and MEDMEM.FIELD< T, INTERLACING_TAG >.getGaussPresence().

template<class T , class INTERLACING_TAG >
const T * MEDMEM.FIELD< T, INTERLACING_TAG >::getRow ( int  i  )  const throw (MEDEXCEPTION)

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).

References LOCALIZED.

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

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)

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.

References LOCALIZED.

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

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.

References LOCALIZED.

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

Return number of values of a geomertic type in NoInterlaceByType mode

References LOCALIZED, and MED_EN.MED_NO_INTERLACE_BY_TYPE.

template<class T , class INTERLACIN_TAG >
const T * MEDMEM.FIELD< T, INTERLACIN_TAG >::getValueByType ( int  t  )  const throw (MEDEXCEPTION)
template<class T , class INTERLACING_TAG >
T MEDMEM.FIELD< T, INTERLACING_TAG >::getValueIJByType ( int  i,
int  j,
int  t 
) const throw (MEDEXCEPTION)

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

References LOCALIZED, and MED_EN.MED_NO_INTERLACE_BY_TYPE.

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

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

References LOCALIZED, and MED_EN.MED_NO_INTERLACE_BY_TYPE.

template<class T, class INTERLACING_TAG >
bool MEDMEM.FIELD< T, INTERLACING_TAG >::getValueOnElement ( int  eltIdInSup,
T *  retValues 
) const throw (MEDEXCEPTION)

Fills in already allocated retValues array the values related to eltIdInSup. If the element does not exist in this->_support false is returned, true otherwise.

References MED_EN.MED_ALL_ELEMENTS.

template<class T , class INTERLACING_TAG >
const int MEDMEM.FIELD< T, INTERLACING_TAG >::getNumberOfGeometricTypes (  )  const throw (MEDEXCEPTION)
template<class T , class INTERLACING_TAG >
const GAUSS_LOCALIZATION< INTERLACING_TAG > & MEDMEM.FIELD< T, INTERLACING_TAG >::getGaussLocalization ( MED_EN::medGeometryElement  geomElement  )  const throw (MEDEXCEPTION)

References Med_Gen_test.it, and LOCALIZED.

template<class T , class INTERLACING_TAG >
const GAUSS_LOCALIZATION< INTERLACING_TAG > * MEDMEM.FIELD< T, INTERLACING_TAG >::getGaussLocalizationPtr ( MED_EN::medGeometryElement  geomElement  )  const throw (MEDEXCEPTION)

References Med_Gen_test.it, and LOCALIZED.

template<class T , class INTERLACING_TAG >
const GAUSS_LOCALIZATION_ * MEDMEM.FIELD< T, INTERLACING_TAG >::getGaussLocalizationRoot ( MED_EN::medGeometryElement  geomElement  )  const throw (MEDEXCEPTION)

Return GAUSS_LOCALIZATION_* whose interlacing type may differ from one of the field.

References Med_Gen_test.it, and LOCALIZED.

template<class T , class INTERLACING_TAG>
void MEDMEM.FIELD< T, INTERLACING_TAG >::setGaussLocalization ( MED_EN::medGeometryElement  geomElement,
const GAUSS_LOCALIZATION< INTERLACING_TAG > &  gaussloc 
)
template<class T , class INTERLACING_TAG>
void MEDMEM.FIELD< T, INTERLACING_TAG >::setGaussLocalization ( MED_EN::medGeometryElement  geomElement,
GAUSS_LOCALIZATION_ gaussloc 
)

Take onership of GAUSS_LOCALIZATION_* whose interlacing type may differ from one of the field.

References MEDMEM.FIELD< T, INTERLACING_TAG >._gaussModel, and Med_Gen_test.it.

template<class T , class INTERLACING_TAG >
const int * MEDMEM.FIELD< T, INTERLACING_TAG >::getNumberOfGaussPoints (  )  const throw (MEDEXCEPTION)

Returns number of Gauss points for each geometric type.

Note : if there is no gauss points whatever the geometric type is it returns an exception. (renvoyer un tableau de 1 ?)

References MEDMEM.FIELD< T, INTERLACING_TAG >._value, MEDMEM.FIELD< T, INTERLACING_TAG >.getGaussPresence(), and LOCALIZED.

template<class T , class INTERLACING_TAG >
const int MEDMEM.FIELD< T, INTERLACING_TAG >::getNumberOfGaussPoints ( MED_EN::medGeometryElement  geomElement  )  const throw (MEDEXCEPTION)

Returns number of Gauss points for this medGeometryElement.

Note : if there is no GAUSS_LOCALIZATION having this medGeometryElement but the medGeometryElement exist in the SUPPORT, getNumberOfGaussPoints return 1

References Med_Gen_test.it, and LOCALIZED.

template<class T , class INTERLACING_TAG >
const int MEDMEM.FIELD< T, INTERLACING_TAG >::getNbGaussI ( int  i  )  const throw (MEDEXCEPTION)

Returns number of Gauss points for element n°i. The i index is a global index (take care of previous element on different geometric type).

References LOCALIZED.

template<class T , class INTERLACING_TAG >
const int * MEDMEM.FIELD< T, INTERLACING_TAG >::getNumberOfElements (  )  const throw (MEDEXCEPTION)
template<class T , class INTERLACING_TAG >
const MED_EN::medGeometryElement * MEDMEM.FIELD< T, INTERLACING_TAG >::getGeometricTypes (  )  const throw (MEDEXCEPTION)
template<class T , class INTERLACING_TAG >
bool MEDMEM.FIELD< T, INTERLACING_TAG >::isOnAllElements (  )  const throw (MEDEXCEPTION)
template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::setArray ( MEDMEM_Array_ value  )  throw (MEDEXCEPTION)

References NULL.

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

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)

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

References LOCALIZED.

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

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)

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.

References LOCALIZED.

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

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

References LOCALIZED.

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

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

References LOCALIZED, and MED_EN.MED_NO_INTERLACE_BY_TYPE.

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

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

References LOCALIZED, and MED_EN.MED_NO_INTERLACE_BY_TYPE.

template<class T , class INTERLACING_TAG >
void MEDMEM.FIELD< T, INTERLACING_TAG >::fillFromAnalytic ( myFuncType  f  )  throw (MEDEXCEPTION)

Fill values array with volume values.

Fill values array with area values.

Fill values array with length values.

Fill values array with normal values.

Fill values array with barycenter values.

Fill array by using T_Analytic. WARNING : "this" must have allocated its array by setting this->_support and this->_numberOfComponents properly. Typically you should use it on a field built with constructor FIELD<T>.FIELD<T>(SUPPORT *,int nbOfComponents)

References MEDCouplingCorbaSwigTestClt.f, MEDMEM.MESH.getBarycenter(), MEDMEM.MESH.getCoordinates(), MEDMEM.MESH.getSpaceDimension(), MEDMEM.FIELD< T, INTERLACING_TAG >.getValue(), LOCALIZED, MED_EN.MED_ALL_ELEMENTS, MED_EN.MED_FULL_INTERLACE, MED_EN.MED_NO_INTERLACE, MED_EN.MED_NODE, MED_test2.mesh, NULL, and batchmode_medcorba_test.spaceDim.

template<class T , class INTERLACING_TAG >
FIELD< T, INTERLACING_TAG > * MEDMEM.FIELD< T, INTERLACING_TAG >::execFunc ( int  nbOfComponents,
myFuncType2  f 
) throw (MEDEXCEPTION)

Execute a function on _values on 'this' and put the result on a newly created field that has to be deallocated. WARNING : "this" must have allocated its array by setting this->_support and this->_numberOfComponents properly. Typically you should use it on a field built with constructor FIELD<T>.FIELD<T>(SUPPORT *,int nbOfComponents)

References MEDCouplingCorbaSwigTestClt.f, MEDMEM.FIELD< T, INTERLACING_TAG >.getValue(), and testMEDMEM.ret.


Friends And Related Function Documentation

template<class T, class INTERLACING_TAG>
friend class MED_FIELD_RDONLY_DRIVER21< T > [friend]
template<class T, class INTERLACING_TAG>
friend class MED_FIELD_WRONLY_DRIVER21< T > [friend]
template<class T, class INTERLACING_TAG>
friend class MED_FIELD_RDONLY_DRIVER22< T > [friend]
template<class T, class INTERLACING_TAG>
friend class MED_FIELD_WRONLY_DRIVER22< T > [friend]
template<class T, class INTERLACING_TAG>
friend class VTK_FIELD_DRIVER< T > [friend]

Field Documentation

template<class T, class INTERLACING_TAG>
Array* MEDMEM.FIELD< T, INTERLACING_TAG >._value
template<class T, class INTERLACING_TAG>
MESH* MEDMEM.FIELD< T, INTERLACING_TAG >._mesh
template<class T, class INTERLACING_TAG>
T MEDMEM.FIELD< T, INTERLACING_TAG >._vmin
template<class T, class INTERLACING_TAG>
T MEDMEM.FIELD< T, INTERLACING_TAG >._vmax
template<class T, class INTERLACING_TAG>
map<MED_EN::medGeometryElement,GAUSS_LOCALIZATION_*> MEDMEM.FIELD< T, INTERLACING_TAG >._gaussModel
template<class T, class INTERLACING_TAG>
T MEDMEM.FIELD< T, INTERLACING_TAG >::_scalarForPow = 1 [static]