Med Memory Users' Guide 5.1.3
|
Functions | |
const FIELD | MEDMEM::FIELD::operator+ (const FIELD &m) const |
FIELD & | MEDMEM::FIELD::operator+= (const FIELD &m) |
static FIELD * | MEDMEM::FIELD::add (const FIELD &m, const FIELD &n) |
static FIELD * | MEDMEM::FIELD::addDeep (const FIELD &m, const FIELD &n) |
const FIELD | MEDMEM::FIELD::operator- (const FIELD &m) const |
const FIELD | MEDMEM::FIELD::operator- () const |
FIELD & | MEDMEM::FIELD::operator-= (const FIELD &m) |
void | MEDMEM::FIELD::applyLin (T a, T b, int icomp) |
static FIELD * | MEDMEM::FIELD::sub (const FIELD &m, const FIELD &n) |
static FIELD * | MEDMEM::FIELD::subDeep (const FIELD &m, const FIELD &n) |
const FIELD | MEDMEM::FIELD::operator* (const FIELD &m) const |
FIELD & | MEDMEM::FIELD::operator*= (const FIELD &m) |
static FIELD * | MEDMEM::FIELD::mul (const FIELD &m, const FIELD &n) |
static FIELD * | MEDMEM::FIELD::mulDeep (const FIELD &m, const FIELD &n) |
const FIELD | MEDMEM::FIELD::operator/ (const FIELD &m) const |
FIELD & | MEDMEM::FIELD::operator/= (const FIELD &m) |
static FIELD * | MEDMEM::FIELD::div (const FIELD &m, const FIELD &n) |
static FIELD * | MEDMEM::FIELD::divDeep (const FIELD &m, const FIELD &n) |
double | MEDMEM::FIELD::normMax () const throw (MEDEXCEPTION) |
double | MEDMEM::FIELD::norm2 () const throw (MEDEXCEPTION) |
void | MEDMEM::FIELD::getMinMax (T &vmin, T &vmax) throw (MEDEXCEPTION) |
vector< int > | MEDMEM::FIELD::getHistogram (int &nbint) throw (MEDEXCEPTION) |
FIELD< double > * | MEDMEM::FIELD::buildGradient () const throw (MEDEXCEPTION) |
FIELD< double > * | MEDMEM::FIELD::buildNorm2Field () const throw (MEDEXCEPTION) |
template<T T_function> | |
void | MEDMEM::FIELD::applyFunc () |
static T | MEDMEM::FIELD::pow (T x) |
void | MEDMEM::FIELD::applyPow (T scalar) |
void | MEDMEM::FIELD::applyLin (T a, T b) |
static FIELD * | MEDMEM::FIELD::scalarProduct (const FIELD &m, const FIELD &n, bool deepCheck=false) |
double | MEDMEM::FIELD::normL2 (int component, const FIELD< double, FullInterlace > *p_field_volume=NULL) const |
double | MEDMEM::FIELD::normL2 (const FIELD< double, FullInterlace > *p_field_volume=NULL) const |
double | MEDMEM::FIELD::normL1 (int component, const FIELD< double, FullInterlace > *p_field_volume=NULL) const |
double | MEDMEM::FIELD::normL1 (const FIELD< double, FullInterlace > *p_field_volume=NULL) const |
FIELD * | MEDMEM::FIELD::extract (const SUPPORT *subSupport) const throw (MEDEXCEPTION) |
This section groups together the different operators that enable the user to treat the FIELD objects as high-level numerical arrays, giving operators for numerical treatment (overloading of basic operators, algorithms, etc...)
const FIELD< T, INTERLACING_TAG > MEDMEM::FIELD< T, INTERLACING_TAG >::operator+ | ( | const FIELD< T, INTERLACING_TAG > & | m | ) | const [inherited] |
Overload addition operator. This operation is authorized only for compatible fields that have the same support. The compatibility checking includes equality tests of the folowing data members:
The data members of the returned field are initialized, based on the first field, except for the name, which is the combination of the two field's names and the operator. Advised Utilisation in C++ : FIELD<T> c = a + b;
In this case, the (recent) compilators perform optimisation and don't call the copy constructor. When using python, this operator calls the copy constructor in any case. The user has to be aware that when using operator + in associatives expressions like a = b + c + d +e;
no optimisation is performed : the evaluation of last expression requires the construction of 3 temporary fields.
References MEDMEM::FIELD_::_checkFieldCompatibility().
FIELD< T, INTERLACING_TAG > & MEDMEM::FIELD< T, INTERLACING_TAG >::operator+= | ( | const FIELD< T, INTERLACING_TAG > & | m | ) | [inherited] |
Overloaded Operator += Operations are directly performed in the first field's array. This operation is authorized only for compatible fields that have the same support.
References MEDMEM::FIELD_::_checkFieldCompatibility(), and MEDMEM::FIELD< T, INTERLACING_TAG >::getValue().
FIELD< T, INTERLACING_TAG > * MEDMEM::FIELD< T, INTERLACING_TAG >::add | ( | const FIELD< T, INTERLACING_TAG > & | m, |
const FIELD< T, INTERLACING_TAG > & | n | ||
) | [static, inherited] |
Addition of fields. Static member function. The function return a pointer to a new created field that holds the addition. Data members are checked for compatibility and initialized. The user is in charge of memory deallocation.
References MEDMEM::FIELD_::_checkFieldCompatibility(), MEDMEM::FIELD_::getNumberOfComponents(), and MEDMEM::FIELD_::getSupport().
FIELD< T, INTERLACING_TAG > * MEDMEM::FIELD< T, INTERLACING_TAG >::addDeep | ( | const FIELD< T, INTERLACING_TAG > & | m, |
const FIELD< T, INTERLACING_TAG > & | n | ||
) | [static, inherited] |
Same as add method except that field check is deeper.
References MEDMEM::FIELD_::_deepCheckFieldCompatibility(), MEDMEM::FIELD_::getNumberOfComponents(), and MEDMEM::FIELD_::getSupport().
const FIELD< T, INTERLACING_TAG > MEDMEM::FIELD< T, INTERLACING_TAG >::operator- | ( | const FIELD< T, INTERLACING_TAG > & | m | ) | const [inherited] |
Overload substraction operator. This operation is authorized only for compatible fields that have the same support. The compatibility checking includes equality tests of the folowing data members:
The data members of the returned field are initialized, based on the first field, except for the name, which is the combination of the two field's names and the operator. Advised Utilisation in C++ : FIELD<T> c = a - b;
In this case, the (recent) compilators perform optimisation and don't call the copy constructor. When using python, this operator calls the copy constructor in any case. The user has to be aware that when using operator - in associatives expressions like a = b - c - d -e;
no optimisation is performed : the evaluation of last expression requires the construction of 3 temporary fields.
References MEDMEM::FIELD_::_checkFieldCompatibility().
const FIELD< T, INTERLACING_TAG > MEDMEM::FIELD< T, INTERLACING_TAG >::operator- | ( | ) | const [inherited] |
References MEDMEM::FIELD< T, INTERLACING_TAG >::getValue(), MEDMEM::FIELD_::setComponentsDescriptions(), MEDMEM::FIELD_::setComponentsNames(), MEDMEM::FIELD_::setComponentsUnits(), MEDMEM::FIELD_::setIterationNumber(), MEDMEM::FIELD_::setMEDComponentsUnits(), MEDMEM::FIELD_::setName(), MEDMEM::FIELD_::setOrderNumber(), and MEDMEM::FIELD_::setTime().
FIELD< T, INTERLACING_TAG > & MEDMEM::FIELD< T, INTERLACING_TAG >::operator-= | ( | const FIELD< T, INTERLACING_TAG > & | m | ) | [inherited] |
Overloaded Operator -= Operations are directly performed in the first field's array. This operation is authorized only for compatible fields that have the same support.
References MEDMEM::FIELD_::_checkFieldCompatibility(), and MEDMEM::FIELD< T, INTERLACING_TAG >::getValue().
void MEDMEM::FIELD< T, INTERLACIN_TAG >::applyLin | ( | T | a, |
T | b, | ||
int | icomp | ||
) | [inherited] |
Apply to a given field component the linear function x -> ax+b. calculation is done "in place".
FIELD< T, INTERLACING_TAG > * MEDMEM::FIELD< T, INTERLACING_TAG >::sub | ( | const FIELD< T, INTERLACING_TAG > & | m, |
const FIELD< T, INTERLACING_TAG > & | n | ||
) | [static, inherited] |
Substraction of fields. Static member function. The function return a pointer to a new created field that holds the substraction. Data members are checked for compatibility and initialized. The user is in charge of memory deallocation.
References MEDMEM::FIELD_::_checkFieldCompatibility(), MEDMEM::FIELD_::getNumberOfComponents(), and MEDMEM::FIELD_::getSupport().
FIELD< T, INTERLACING_TAG > * MEDMEM::FIELD< T, INTERLACING_TAG >::subDeep | ( | const FIELD< T, INTERLACING_TAG > & | m, |
const FIELD< T, INTERLACING_TAG > & | n | ||
) | [static, inherited] |
Same as sub method except that field check is deeper.
References MEDMEM::FIELD_::_deepCheckFieldCompatibility(), MEDMEM::FIELD_::getNumberOfComponents(), and MEDMEM::FIELD_::getSupport().
const FIELD< T, INTERLACING_TAG > MEDMEM::FIELD< T, INTERLACING_TAG >::operator* | ( | const FIELD< T, INTERLACING_TAG > & | m | ) | const [inherited] |
Overload multiplication operator. This operation is authorized only for compatible fields that have the same support. The compatibility checking includes equality tests of the folowing data members:
The data members of the returned field are initialized, based on the first field, except for the name, which is the combination of the two field's names and the operator. Advised Utilisation in C++ : FIELD<T> c = a * b;
In this case, the (recent) compilators perform optimisation and don't call the copy constructor. When using python, this operator calls the copy constructor in any case. The user has to be aware that when using operator * in associatives expressions like a = b * c * d *e;
no optimisation is performed : the evaluation of last expression requires the construction of 3 temporary fields.
References MEDMEM::FIELD_::_checkFieldCompatibility().
FIELD< T, INTERLACING_TAG > & MEDMEM::FIELD< T, INTERLACING_TAG >::operator*= | ( | const FIELD< T, INTERLACING_TAG > & | m | ) | [inherited] |
Overloaded Operator *= Operations are directly performed in the first field's array. This operation is authorized only for compatible fields that have the same support.
References MEDMEM::FIELD_::_checkFieldCompatibility(), and MEDMEM::FIELD< T, INTERLACING_TAG >::getValue().
FIELD< T, INTERLACING_TAG > * MEDMEM::FIELD< T, INTERLACING_TAG >::mul | ( | const FIELD< T, INTERLACING_TAG > & | m, |
const FIELD< T, INTERLACING_TAG > & | n | ||
) | [static, inherited] |
Multiplication of fields. Static member function. The function return a pointer to a new created field that holds the multiplication. Data members are checked for compatibility and initialized. The user is in charge of memory deallocation.
References MEDMEM::FIELD_::_checkFieldCompatibility(), MEDMEM::FIELD_::getNumberOfComponents(), and MEDMEM::FIELD_::getSupport().
FIELD< T, INTERLACING_TAG > * MEDMEM::FIELD< T, INTERLACING_TAG >::mulDeep | ( | const FIELD< T, INTERLACING_TAG > & | m, |
const FIELD< T, INTERLACING_TAG > & | n | ||
) | [static, inherited] |
Same as mul method except that field check is deeper.
References MEDMEM::FIELD_::_deepCheckFieldCompatibility(), MEDMEM::FIELD_::getNumberOfComponents(), and MEDMEM::FIELD_::getSupport().
const FIELD< T, INTERLACING_TAG > MEDMEM::FIELD< T, INTERLACING_TAG >::operator/ | ( | const FIELD< T, INTERLACING_TAG > & | m | ) | const [inherited] |
Overload division operator. This operation is authorized only for compatible fields that have the same support. The compatibility checking includes equality tests of the folowing data members:
The data members of the returned field are initialized, based on the first field, except for the name, which is the combination of the two field's names and the operator. Advised Utilisation in C++ : FIELD<T> c = a / b;
In this case, the (recent) compilators perform optimisation and don't call the copy constructor. When using python, this operator calls the copy constructor in any case. The user has to be aware that when using operator / in associatives expressions like a = b / c / d /e;
no optimisation is performed : the evaluation of last expression requires the construction of 3 temporary fields.
References MEDMEM::FIELD_::_checkFieldCompatibility().
FIELD< T, INTERLACING_TAG > & MEDMEM::FIELD< T, INTERLACING_TAG >::operator/= | ( | const FIELD< T, INTERLACING_TAG > & | m | ) | [inherited] |
Overloaded Operator /= Operations are directly performed in the first field's array. This operation is authorized only for compatible fields that have the same support.
References MEDMEM::FIELD_::_checkFieldCompatibility(), and MEDMEM::FIELD< T, INTERLACING_TAG >::getValue().
FIELD< T, INTERLACING_TAG > * MEDMEM::FIELD< T, INTERLACING_TAG >::div | ( | const FIELD< T, INTERLACING_TAG > & | m, |
const FIELD< T, INTERLACING_TAG > & | n | ||
) | [static, inherited] |
Division of fields. Static member function. The function return a pointer to a new created field that holds the division. Data members are checked for compatibility and initialized. The user is in charge of memory deallocation.
References MEDMEM::FIELD_::_checkFieldCompatibility(), MEDMEM::FIELD_::getNumberOfComponents(), and MEDMEM::FIELD_::getSupport().
FIELD< T, INTERLACING_TAG > * MEDMEM::FIELD< T, INTERLACING_TAG >::divDeep | ( | const FIELD< T, INTERLACING_TAG > & | m, |
const FIELD< T, INTERLACING_TAG > & | n | ||
) | [static, inherited] |
Same as div method except that field check is deeper.
References MEDMEM::FIELD_::_deepCheckFieldCompatibility(), MEDMEM::FIELD_::getNumberOfComponents(), and MEDMEM::FIELD_::getSupport().
double MEDMEM::FIELD< T, INTERLACIN_TAG >::normMax | ( | ) | const throw (MEDEXCEPTION) [inherited] |
Return maximum of all absolute values contained in the array (all elements and all components are browsed).
double MEDMEM::FIELD< T, INTERLACIN_TAG >::norm2 | ( | ) | const throw (MEDEXCEPTION) [inherited] |
Return Euclidian norm for all elements of the array.
void MEDMEM::FIELD< T, INTERLACIN_TAG >::getMinMax | ( | T & | vmin, |
T & | vmax | ||
) | throw (MEDEXCEPTION) [inherited] |
Return Extrema of field
vector< int > MEDMEM::FIELD< T, INTERLACIN_TAG >::getHistogram | ( | int & | nbint | ) | throw (MEDEXCEPTION) [inherited] |
Return Histogram of field
FIELD< double, FullInterlace > * MEDMEM::FIELD< T, INTERLACIN_TAG >::buildGradient | ( | ) | const throw (MEDEXCEPTION) [inherited] |
Return vectorial gradient field
References MEDMEM::FIELD< T, INTERLACING_TAG >::getNumberOfElements(), MEDMEM::FIELD< T, INTERLACING_TAG >::getValueIJ(), MEDMEM::FIELD_::setComponentDescription(), MEDMEM::FIELD_::setComponentName(), MEDMEM::FIELD_::setDescription(), MEDMEM::FIELD_::setIterationNumber(), MEDMEM::FIELD_::setMEDComponentUnit(), MEDMEM::FIELD_::setName(), MEDMEM::FIELD_::setOrderNumber(), MEDMEM::FIELD_::setTime(), and MEDMEM::FIELD< T, INTERLACING_TAG >::setValueIJ().
FIELD< double, FullInterlace > * MEDMEM::FIELD< T, INTERLACIN_TAG >::buildNorm2Field | ( | ) | const throw (MEDEXCEPTION) [inherited] |
Return scalar norm2 field
References MEDMEM::FIELD_::setComponentDescription(), MEDMEM::FIELD_::setComponentName(), MEDMEM::FIELD_::setDescription(), MEDMEM::FIELD_::setIterationNumber(), MEDMEM::FIELD_::setMEDComponentUnit(), MEDMEM::FIELD_::setName(), MEDMEM::FIELD_::setOrderNumber(), MEDMEM::FIELD_::setTime(), and MEDMEM::FIELD< T, INTERLACING_TAG >::setValueIJ().
void MEDMEM::FIELD< T, INTERLACIN_TAG >::applyFunc | ( | ) | [inherited] |
Apply to each (scalar) field component the template parameter T_function, which is a pointer to function. Since the pointer is known at compile time, the function is inlined into the inner loop! calculation is done "in place". Use examples :
myField.applyFunc<std::sqrt>(); // apply sqare root function
myField.applyFunc<myFunction>(); // apply your own created function
T MEDMEM::FIELD< T, INTERLACIN_TAG >::pow | ( | T | x | ) | [static, protected, inherited] |
void MEDMEM::FIELD< T, INTERLACIN_TAG >::applyPow | ( | T | scalar | ) | [inherited] |
Apply to each (scalar) field component the math function pow. calculation is done "in place". Use examples :
myField.applyFunc<std::sqrt>(); // apply sqare root function
myField.applyFunc<myFunction>(); // apply your own created function
void MEDMEM::FIELD< T, INTERLACIN_TAG >::applyLin | ( | T | a, |
T | b | ||
) | [inherited] |
Apply to each (scalar) field component the linear function x -> ax+b. calculation is done "in place".
FIELD< T, INTERLACING_TAG > * MEDMEM::FIELD< T, INTERLACING_TAG >::scalarProduct | ( | const FIELD< T, INTERLACING_TAG > & | m, |
const FIELD< T, INTERLACING_TAG > & | n, | ||
bool | deepCheck = false |
||
) | [static, inherited] |
Return a pointer to a new field that holds the scalar product. Static member function. This operation is authorized only for compatible fields that have the same support. The compatibility checking includes equality tests of the folowing data members:
References MEDMEM::FIELD_::_checkFieldCompatibility(), MEDMEM::FIELD_::_deepCheckFieldCompatibility(), MEDMEM::FIELD_::getIterationNumber(), MEDMEM::FIELD_::getName(), MEDMEM::FIELD_::getNumberOfComponents(), MEDMEM::FIELD_::getNumberOfValues(), MEDMEM::FIELD_::getOrderNumber(), MEDMEM::FIELD_::getSupport(), MEDMEM::FIELD_::getTime(), MEDMEM::FIELD< T, INTERLACING_TAG >::getValue(), MEDMEM::FIELD_::setIterationNumber(), MEDMEM::FIELD_::setName(), MEDMEM::FIELD_::setOrderNumber(), and MEDMEM::FIELD_::setTime().
double MEDMEM::FIELD< T, INTERLACING_TAG >::normL2 | ( | int | component, |
const FIELD< double, FullInterlace > * | p_field_volume = NULL |
||
) | const [inherited] |
Return L2 Norm of the field's component. Cannot be applied to a field with a support on nodes. If the optional p_field_volume argument is furnished, the volume is not re-calculated. For the nodal field, p_field_volume must be for all cells even if the field is partial.
References MEDMEM::MESH::getConnectivity(), MEDMEM::MESH::getConnectivityIndex(), MEDMEM::MESH::getNumberOfElements(), and MEDMEM::FIELD< T, INTERLACING_TAG >::getValue().
double MEDMEM::FIELD< T, INTERLACING_TAG >::normL2 | ( | const FIELD< double, FullInterlace > * | p_field_volume = NULL | ) | const [inherited] |
Return L2 Norm of the field. If the optional p_field_volume argument is furnished, the volume is not re-calculated. For the nodal field, p_field_volume must be for all cells even if the field is partial.
References MEDMEM::MESH::getConnectivity(), MEDMEM::MESH::getConnectivityIndex(), MEDMEM::MESH::getNumberOfElements(), and MEDMEM::FIELD< T, INTERLACING_TAG >::getValue().
double MEDMEM::FIELD< T, INTERLACING_TAG >::normL1 | ( | int | component, |
const FIELD< double, FullInterlace > * | p_field_volume = NULL |
||
) | const [inherited] |
Return L1 Norm of the field's component. If the optional p_field_volume argument is furnished, the volume is not re-calculated.
References MEDMEM::FIELD< T, INTERLACING_TAG >::getValue().
double MEDMEM::FIELD< T, INTERLACING_TAG >::normL1 | ( | const FIELD< double, FullInterlace > * | p_field_volume = NULL | ) | const [inherited] |
Return L1 Norm of the field. Cannot be applied to a field with a support on nodes. If the optional p_field_volume argument is furnished, the volume is not re-calculated.
References MEDMEM::FIELD< T, INTERLACING_TAG >::getValue().
FIELD< T, INTERLACING_TAG > * MEDMEM::FIELD< T, INTERLACING_TAG >::extract | ( | const SUPPORT * | subSupport | ) | const throw (MEDEXCEPTION) [inherited] |
Return a new field (to deallocate with delete) lying on subSupport that is included by this->_support with corresponding values extracting from this->_value.
References MEDMEM::FIELD< T, INTERLACING_TAG >::_value, MEDMEM::FIELD_::copyGlobalInfo(), MEDMEM::FIELD< T, INTERLACING_TAG >::getNumberOfElements(), and MEDMEM::FIELD< T, INTERLACING_TAG >::getValue().