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]

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, 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< 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
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)
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)
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
MESH_mesh
_vmin
_vmax
map
< MED_EN::medGeometryElement,
GAUSS_LOCALIZATION_ * > 
_gaussModel

Static Protected 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 >

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

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

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

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

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

References MEDMEM::FIELD_::_drivers.

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.

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

Reimplemented from MEDMEM::FIELD_.

References MEDMEM::FIELD_::_drivers.

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

Reimplemented from MEDMEM::FIELD_.

References MEDMEM::FIELD_::_drivers.

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.

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

Reimplemented from MEDMEM::FIELD_.

References MEDMEM::FIELD_::_drivers.

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 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::MESH::mergeFields().

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 >
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 MEDMEM::MESH::getBarycenter(), MEDMEM::MESH::getCoordinates(), MEDMEM::MESH::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_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]

Member Data Documentation

template<class T, class INTERLACING_TAG>
Array* MEDMEM::FIELD< T, INTERLACING_TAG >::_value [protected]
template<class T, class INTERLACING_TAG>
MESH* 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]
Generated on Tue Jul 27 21:55:09 2010 for Med Memory Users' Guide by  doxygen 1.6.3