Version: 6.3.1

MEDMEM::FIELD< T, INTERLACING_TAG > Class Template Reference

Inheritance diagram for MEDMEM::FIELD< T, INTERLACING_TAG >:
Collaboration diagram for MEDMEM::FIELD< T, INTERLACING_TAG >:

List of all members.

Public Types

typedef void(* myFuncType )(const double *, T *)
typedef void(* myFuncType2 )(const T *, T *)

Public Member Functions

 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, GMESH *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)
FIELDoperator+ (const FIELD &m) const
FIELDoperator- (const FIELD &m) const
FIELDoperator* (const FIELD &m) const
FIELDoperator/ (const FIELD &m) const
FIELDoperator- () 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< int > getHistogram (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=NULL) const
double normL2 (const FIELD< double, FullInterlace > *p_field_volume=NULL) const
double normL1 (int component, const FIELD< double, FullInterlace > *p_field_volume=NULL) const
double normL1 (const FIELD< double, FullInterlace > *p_field_volume=NULL) const
double integral (const SUPPORT *subSupport=NULL) const throw (MEDEXCEPTION)
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 read (driverTypes driverType, const std::string &filename)
void write (int index=0)
void write (const GENDRIVER &, MED_EN::med_mode_acces medMode=MED_EN::RDWR)
void write (driverTypes driverType, const std::string &filename, MED_EN::med_mode_acces medMode=MED_EN::RDWR)
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)
void getValueOnPoint (const double *coords, double *output) const throw (MEDEXCEPTION)
void getValueOnPoints (int nb_points, const double *coords, double *output) 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)
void setGaussLocalization (MED_EN::medGeometryElement geomElement, const GAUSS_LOCALIZATION< INTERLACING_TAG > &gaussloc)
void setGaussLocalization (MED_EN::medGeometryElement geomElement, GAUSS_LOCALIZATION_ *gaussloc)
const int * getNumberOfGaussPoints () const throw (MEDEXCEPTION)
const int getNumberOfGaussPoints (MED_EN::medGeometryElement geomElement) const throw (MEDEXCEPTION)
const int getNbGaussI (int i) const throw (MEDEXCEPTION)
const int * getNumberOfElements () const throw (MEDEXCEPTION)
const MED_EN::medGeometryElement * getGeometricTypes () const throw (MEDEXCEPTION)
bool isOnAllElements () const throw (MEDEXCEPTION)
void setArray (MEDMEM_Array_ *value) throw (MEDEXCEPTION)
FIELD< double, FullInterlace > * getGaussPointsCoordinates () const 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 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)

Protected 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

Static Protected Member Functions

static T pow (T x)

Protected Attributes

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

Static Protected Attributes

static T _scalarForPow = 1

Friends

class MED_FIELD_RDONLY_DRIVER< T >
class MED_FIELD_WRONLY_DRIVER< T >
class VTK_FIELD_DRIVER< T >

Detailed Description

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

Examples:

FIELDcreate.cxx.


Member Typedef Documentation

template<class T, class INTERLACING_TAG>
typedef MEDMEM_ArrayInterface<T,INTERLACING_TAG,NoGauss>::Array MEDMEM::FIELD< T, INTERLACING_TAG >::ArrayNoGauss [protected]
template<class T, class INTERLACING_TAG>
typedef MEDMEM_ArrayInterface<T,INTERLACING_TAG,Gauss>::Array MEDMEM::FIELD< T, INTERLACING_TAG >::ArrayGauss [protected]
template<class T, class INTERLACING_TAG>
typedef MEDMEM_ArrayInterface<T,NoInterlace,NoGauss>::Array MEDMEM::FIELD< T, INTERLACING_TAG >::ArrayNo [protected]
template<class T, class INTERLACING_TAG>
typedef MEDMEM_ArrayInterface<T,FullInterlace,NoGauss>::Array MEDMEM::FIELD< T, INTERLACING_TAG >::ArrayFull [protected]
template<class T, class INTERLACING_TAG>
typedef MEDMEM_ArrayInterface<T,NoInterlaceByType,NoGauss>::Array MEDMEM::FIELD< T, INTERLACING_TAG >::ArrayNoByType [protected]
template<class T, class INTERLACING_TAG>
typedef MEDMEM_ArrayInterface<T,NoInterlaceByType,Gauss>::Array MEDMEM::FIELD< T, INTERLACING_TAG >::ArrayNoByTypeGauss [protected]
template<class T, class INTERLACING_TAG>
typedef MEDMEM_Array_ MEDMEM::FIELD< T, INTERLACING_TAG >::Array [protected]
template<class T, class INTERLACING_TAG>
typedef T MEDMEM::FIELD< T, INTERLACING_TAG >::ElementType [protected]
template<class T, class INTERLACING_TAG>
typedef INTERLACING_TAG MEDMEM::FIELD< T, INTERLACING_TAG >::InterlacingTag [protected]
template<class T, class INTERLACING_TAG>
typedef map<MED_EN::medGeometryElement,GAUSS_LOCALIZATION_*> MEDMEM::FIELD< T, INTERLACING_TAG >::locMap [protected]
template<class T, class INTERLACING_TAG>
typedef void(* MEDMEM::FIELD< T, INTERLACING_TAG >::myFuncType)(const double *, T *)
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 ( )

Constructor with no parameter, most of the attribut members are set to NULL.

References MEDMEM::FIELD_::_interlacingType, MEDMEM::FIELD< T, INTERLACING_TAG >::_mesh, MEDMEM::FIELD< T, INTERLACING_TAG >::_value, and MEDMEM::FIELD_::_valueType.

template<class T , class INTERLACING_TAG >
MEDMEM::FIELD< T, INTERLACING_TAG >::~FIELD ( )

Destructor.


Member Function Documentation

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)

Initializes all the field values to 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_.

template<class T , class INTERLACING_TAG >
int MEDMEM::FIELD< T, INTERLACING_TAG >::addDriver ( GENDRIVER &  driver) [virtual]

Duplicates the given driver and return its index reference to path to read or write methods.

Reimplemented from MEDMEM::FIELD_.

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

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

Reimplemented from MEDMEM::FIELD_.

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]

Determines whether the field stores several Gauss points per element.

Reimplemented from MEDMEM::FIELD_.

Referenced by MEDMEM::FIELD< T, INTERLACING_TAG >::FIELD().

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

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.

Referenced by MEDMEM::GMESH::mergeFields().

template<class T , class INTERLACING_TAG >
void MEDMEM::FIELD< T, INTERLACING_TAG >::getValueOnPoint ( const double *  coords,
double *  output 
) const throw (MEDEXCEPTION)

Retrieve value in a given point.

Parameters:
coords- point coordinates
output- output buffer
template<class T , class INTERLACING_TAG >
void MEDMEM::FIELD< T, INTERLACING_TAG >::getValueOnPoints ( int  nb_points,
const double *  coords,
double *  output 
) const throw (MEDEXCEPTION)

Retrieve values in given points.

Parameters:
nb_points- number of points
coords- point coordinates
output- output buffer

References MEDMEM::MESH::convertInMESH(), MEDMEM::MESH::getCoordinates(), MEDMEM::MESH::getMeshDimension(), MEDMEM::GMESH::getSpaceDimension(), and INTERP_KERNEL::PointLocator.

template<class T , class INTERLACING_TAG >
const int MEDMEM::FIELD< T, INTERLACING_TAG >::getNumberOfGeometricTypes ( ) 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)
template<class T , class INTERLACING_TAG >
void MEDMEM::FIELD< T, INTERLACING_TAG >::fillFromAnalytic ( myFuncType  f) throw (MEDEXCEPTION)

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 MEDMEM::MESH::convertInMESH(), MEDMEM::GMESH::getBarycenter(), MEDMEM::MESH::getCoordinates(), MEDMEM::GMESH::getSpaceDimension(), and MEDMEM::FIELD< T, INTERLACING_TAG >::getValue().

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


Friends And Related Function Documentation

template<class T, class INTERLACING_TAG>
friend class MED_FIELD_RDONLY_DRIVER< T > [friend]
template<class T, class INTERLACING_TAG>
friend class MED_FIELD_WRONLY_DRIVER< T > [friend]
template<class T, class INTERLACING_TAG>
friend class VTK_FIELD_DRIVER< T > [friend]

Member Data Documentation

template<class T, class INTERLACING_TAG>
GMESH* MEDMEM::FIELD< T, INTERLACING_TAG >::_mesh [protected]
template<class T, class INTERLACING_TAG>
T MEDMEM::FIELD< T, INTERLACING_TAG >::_vmin [protected]
template<class T, class INTERLACING_TAG>
T MEDMEM::FIELD< T, INTERLACING_TAG >::_vmax [protected]
template<class T, class INTERLACING_TAG>
map<MED_EN::medGeometryElement,GAUSS_LOCALIZATION_*> MEDMEM::FIELD< T, INTERLACING_TAG >::_gaussModel [protected]
template<class T, class INTERLACING_TAG>
T MEDMEM::FIELD< T, INTERLACING_TAG >::_scalarForPow = 1 [static, protected]
Copyright © 2007-2011 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