Version: 6.5.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
MEDMEM::FIELD< T, INTERLACING_TAG > Class Template Reference
Inheritance diagram for MEDMEM::FIELD< T, INTERLACING_TAG >:
Inheritance graph
[legend]
Collaboration diagram for MEDMEM::FIELD< T, INTERLACING_TAG >:
Collaboration graph
[legend]

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)
- Public Member Functions inherited from MEDMEM::FIELD_
 FIELD_ ()
 FIELD_ (const SUPPORT *Support, const int NumberOfComponents)
 FIELD_ (const FIELD_ &m)
virtual ~FIELD_ ()
FIELD_operator= (const FIELD_ &m)
virtual void openAppend (void)
void setName (const string Name)
string getName () const
void setDescription (const string Description)
string getDescription () const
const SUPPORTgetSupport () const
void setSupport (const SUPPORT *support)
void setNumberOfComponents (const int NumberOfComponents)
int getNumberOfComponents () const
void setNumberOfValues (const int NumberOfValues)
int getNumberOfValues () const
void setComponentsNames (const string *ComponentsNames)
void setComponentName (int i, const string ComponentName)
const string * getComponentsNames () const
string getComponentName (int i) const
void setComponentsDescriptions (const string *ComponentsDescriptions)
void setComponentDescription (int i, const string ComponentDescription)
const string * getComponentsDescriptions () const
string getComponentDescription (int i) const
void setComponentsUnits (const UNIT *ComponentsUnits)
const UNIT * getComponentsUnits () const
const UNIT * getComponentUnit (int i) const
void setMEDComponentsUnits (const string *MEDComponentsUnits)
void setMEDComponentUnit (int i, const string MEDComponentUnit)
const string * getMEDComponentsUnits () const
string getMEDComponentUnit (int i) const
void setIterationNumber (int IterationNumber)
int getIterationNumber () const
void setTime (double Time)
double getTime () const
void setOrderNumber (int OrderNumber)
int getOrderNumber () const
MED_EN::med_type_champ getValueType () const
MED_EN::medModeSwitch getInterlacingType () const

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)
- Static Protected Member Functions inherited from MEDMEM::FIELD_
static void _checkFieldCompatibility (const FIELD_ &m, const FIELD_ &n, bool checkUnit=true) throw (MEDEXCEPTION)
static void _deepCheckFieldCompatibility (const FIELD_ &m, const FIELD_ &n, bool checkUnit=true) throw (MEDEXCEPTION)

Protected Attributes

Array_value
GMESH_mesh
_vmin
_vmax
map
< MED_EN::medGeometryElement,
GAUSS_LOCALIZATION_ * > 
_gaussModel
- Protected Attributes inherited from MEDMEM::FIELD_
bool _isRead
bool _isMinMax
string _name
string _description
const SUPPORT_support
int _numberOfComponents
int _numberOfValues
vector< int > _componentsTypes
vector< string > _componentsNames
vector< string > _componentsDescriptions
vector< UNIT > _componentsUnits
vector< string > _MEDComponentsUnits
int _iterationNumber
double _time
int _orderNumber
MED_EN::med_type_champ _valueType
MED_EN::medModeSwitch _interlacingType
vector< GENDRIVER * > _drivers

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 >

Additional Inherited Members

- Protected Member Functions inherited from MEDMEM::FIELD_
void _checkNormCompatibility (const FIELD< double > *p_field_volume=NULL, const bool nodalAllowed=false) const throw (MEDEXCEPTION)
FIELD< double > * _getFieldSize (const SUPPORT *subSupport=NULL) const
void copyGlobalInfo (const FIELD_ &m)

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 ( const FIELD< T, INTERLACING_TAG > &  m)
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 &  )
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 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)
template<class T , class INTERLACING_TAG >
FIELD< double, FullInterlace > * MEDMEM::FIELD< T, INTERLACING_TAG >::getGaussPointsCoordinates ( ) const 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>
Array* MEDMEM::FIELD< T, INTERLACING_TAG >::_value
protected
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
staticprotected
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