X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingFieldDouble.cxx;h=2a6c6475574d274ae3a8a9242208d33805ea6249;hb=5dcdc2b6a915a809dd2d7831e4b2e85ae286328a;hp=4f14393c45d4f5415b3ba0751bff51be09e30fdb;hpb=1123dccd6613b2e8abba35182759d5c4a11ecc8d;p=tools%2Fmedcoupling.git
diff --git a/src/MEDCoupling/MEDCouplingFieldDouble.cxx b/src/MEDCoupling/MEDCouplingFieldDouble.cxx
index 4f14393c4..2a6c64755 100644
--- a/src/MEDCoupling/MEDCouplingFieldDouble.cxx
+++ b/src/MEDCoupling/MEDCouplingFieldDouble.cxx
@@ -200,8 +200,10 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::deepCpy() const
* \return MEDCouplingFieldDouble* - a new instance of MEDCouplingFieldDouble. The
* caller is to delete this field using decrRef() as it is no more needed.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_buildNewTimeReprFromThis "Here is a C++ example."
* \ref py_mcfielddouble_buildNewTimeReprFromThis "Here is a Python example."
+ * \endif
* \sa clone()
*/
MEDCouplingFieldDouble *MEDCouplingFieldDouble::buildNewTimeReprFromThis(TypeOfTimeDiscretization td, bool deepCopy) const
@@ -345,7 +347,6 @@ void MEDCouplingFieldDouble::copyTinyAttrFrom(const MEDCouplingFieldDouble *othe
{
_time_discr->copyTinyAttrFrom(*other->_time_discr);
}
-
}
void MEDCouplingFieldDouble::copyAllTinyAttrFrom(const MEDCouplingFieldDouble *other)
@@ -596,8 +597,10 @@ bool MEDCouplingFieldDouble::areCompatibleForMeld(const MEDCouplingFieldDouble *
* \throw If \a check == \c true and \a old2NewBg contains equal ids.
* \throw If mesh nature does not allow renumbering (e.g. structured mesh).
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_renumberCells "Here is a C++ example".
* \ref py_mcfielddouble_renumberCells "Here is a Python example".
+ * \endif
*/
void MEDCouplingFieldDouble::renumberCells(const int *old2NewBg, bool check)
{
@@ -631,10 +634,10 @@ void MEDCouplingFieldDouble::renumberCells(const int *old2NewBg, bool check)
*/
void MEDCouplingFieldDouble::renumberCellsWithoutMesh(const int *old2NewBg, bool check)
{
- if(!_mesh)
- throw INTERP_KERNEL::Exception("Expecting a defined mesh to be able to operate a renumbering !");
- if(!((const MEDCouplingFieldDiscretization *)_type))
- throw INTERP_KERNEL::Exception("Expecting a spatial discretization to be able to operate a renumbering !");
+ if(!_mesh)
+ throw INTERP_KERNEL::Exception("Expecting a defined mesh to be able to operate a renumbering !");
+ if(!((const MEDCouplingFieldDiscretization *)_type))
+ throw INTERP_KERNEL::Exception("Expecting a spatial discretization to be able to operate a renumbering !");
//
_type->renumberCells(old2NewBg,check);
std::vector arrays;
@@ -659,8 +662,10 @@ void MEDCouplingFieldDouble::renumberCellsWithoutMesh(const int *old2NewBg, bool
* \throw If mesh nature does not allow renumbering (e.g. structured mesh).
* \throw If values at merged nodes deffer more than \a eps.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_renumberNodes "Here is a C++ example".
* \ref py_mcfielddouble_renumberNodes "Here is a Python example".
+ * \endif
*/
void MEDCouplingFieldDouble::renumberNodes(const int *old2NewBg, double eps)
{
@@ -752,8 +757,10 @@ DataArrayInt *MEDCouplingFieldDouble::getIdsInRange(double vmin, double vmax) co
* \param [in] part - an array of cell ids to include to the result field.
* \return MEDCouplingFieldDouble * - a new instance of MEDCouplingFieldDouble. The caller is to delete this field using decrRef() as it is no more needed.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_subpart1 "Here is a C++ example".
* \ref py_mcfielddouble_subpart1 "Here is a Python example".
+ * \endif
* \sa MEDCouplingFieldDouble::buildSubPartRange
*/
@@ -791,8 +798,10 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::buildSubPart(const DataArrayInt
*
* \throw if there is presence of an invalid cell id in [ \a partBg, \a partEnd ) regarding the number of cells of \a this->getMesh().
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_subpart1 "Here a C++ example."
* \ref py_mcfielddouble_subpart1 "Here a Python example."
+ * \endif
* \sa ParaMEDMEM::MEDCouplingFieldDouble::buildSubPart(const DataArrayInt *) const, MEDCouplingFieldDouble::buildSubPartRange
*/
MEDCouplingFieldDouble *MEDCouplingFieldDouble::buildSubPart(const int *partBg, const int *partEnd) const
@@ -878,7 +887,7 @@ TypeOfTimeDiscretization MEDCouplingFieldDouble::getTimeDiscretization() const
}
MEDCouplingFieldDouble::MEDCouplingFieldDouble(TypeOfField type, TypeOfTimeDiscretization td):MEDCouplingField(type),
- _time_discr(MEDCouplingTimeDiscretization::New(td))
+ _time_discr(MEDCouplingTimeDiscretization::New(td))
{
}
@@ -886,12 +895,12 @@ MEDCouplingFieldDouble::MEDCouplingFieldDouble(TypeOfField type, TypeOfTimeDiscr
* ** WARINING : This method do not deeply copy neither mesh nor spatial discretization. Only a shallow copy (reference) is done for mesh and spatial discretization ! **
*/
MEDCouplingFieldDouble::MEDCouplingFieldDouble(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td):MEDCouplingField(ft,false),
- _time_discr(MEDCouplingTimeDiscretization::New(td))
+ _time_discr(MEDCouplingTimeDiscretization::New(td))
{
}
MEDCouplingFieldDouble::MEDCouplingFieldDouble(const MEDCouplingFieldDouble& other, bool deepCopy):MEDCouplingField(other,deepCopy),
- _time_discr(other._time_discr->performCpy(deepCopy))
+ _time_discr(other._time_discr->performCpy(deepCopy))
{
}
@@ -1334,8 +1343,10 @@ void MEDCouplingFieldDouble::integral(bool isWAbs, double *res) const
* \throw If the mesh is not set.
* \throw If the mesh is not a structured one.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_getValueOnPos "Here is a C++ example".
* \ref py_mcfielddouble_getValueOnPos "Here is a Python example".
+ * \endif
*/
void MEDCouplingFieldDouble::getValueOnPos(int i, int j, int k, double *res) const
{
@@ -1356,8 +1367,10 @@ void MEDCouplingFieldDouble::getValueOnPos(int i, int j, int k, double *res) con
* \throw If the mesh is not set.
* \throw If \a spaceLoc is out of the spatial discretization.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_getValueOn "Here is a C++ example".
* \ref py_mcfielddouble_getValueOn "Here is a Python example".
+ * \endif
*/
void MEDCouplingFieldDouble::getValueOn(const double *spaceLoc, double *res) const
{
@@ -1382,8 +1395,10 @@ void MEDCouplingFieldDouble::getValueOn(const double *spaceLoc, double *res) con
* \throw If the mesh is not set.
* \throw If any point in \a spaceLoc is out of the spatial discretization.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_getValueOnMulti "Here is a C++ example".
* \ref py_mcfielddouble_getValueOnMulti "Here is a Python example".
+ * \endif
*/
DataArrayDouble *MEDCouplingFieldDouble::getValueOnMulti(const double *spaceLoc, int nbOfPoints) const
{
@@ -1407,8 +1422,10 @@ DataArrayDouble *MEDCouplingFieldDouble::getValueOnMulti(const double *spaceLoc,
* \throw If \a spaceLoc is out of the spatial discretization.
* \throw If \a time is not covered by \a this->_time_discr.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_getValueOn_time "Here is a C++ example".
* \ref py_mcfielddouble_getValueOn_time "Here is a Python example".
+ * \endif
*/
void MEDCouplingFieldDouble::getValueOn(const double *spaceLoc, double time, double *res) const
{
@@ -1428,7 +1445,7 @@ void MEDCouplingFieldDouble::getValueOn(const double *spaceLoc, double time, dou
}
/*!
- * Apply a liner function to a given component of \a this field, so that
+ * Apply a linear function to a given component of \a this field, so that
* a component value (x) becomes \f$ a * x + b \f$.
* \param [in] a - the first coefficient of the function.
* \param [in] b - the second coefficient of the function.
@@ -1440,12 +1457,24 @@ void MEDCouplingFieldDouble::applyLin(double a, double b, int compoId)
_time_discr->applyLin(a,b,compoId);
}
+/*!
+ * Apply a linear function to all components of \a this field, so that
+ * values (x) becomes \f$ a * x + b \f$.
+ * \param [in] a - the first coefficient of the function.
+ * \param [in] b - the second coefficient of the function.
+ * \throw If the data array(s) is(are) not set.
+ */
+void MEDCouplingFieldDouble::applyLin(double a, double b)
+{
+ _time_discr->applyLin(a,b);
+}
+
/*!
* This method sets \a this to a uniform scalar field with one component.
* All tuples will have the same value 'value'.
* An exception is thrown if no underlying mesh is defined.
*/
-MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator=(double value) throw(INTERP_KERNEL::Exception)
+MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator=(double value)
{
if(!_mesh)
throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::operator= : no mesh defined !");
@@ -1466,7 +1495,9 @@ MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator=(double value) throw(IN
* \throw If \a func returns \c false.
* \throw If the spatial discretization of \a this field is NULL.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_fillFromAnalytic_c_func "Here is a C++ example".
+ * \endif
*/
void MEDCouplingFieldDouble::fillFromAnalytic(int nbOfComp, FunctionToEvaluate func)
{
@@ -1510,8 +1541,10 @@ void MEDCouplingFieldDouble::fillFromAnalytic(int nbOfComp, FunctionToEvaluate f
* \throw If the spatial discretization of \a this field is NULL.
* \throw If computing \a func fails.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_fillFromAnalytic "Here is a C++ example".
* \ref py_mcfielddouble_fillFromAnalytic "Here is a Python example".
+ * \endif
*/
void MEDCouplingFieldDouble::fillFromAnalytic(int nbOfComp, const std::string& func)
{
@@ -1557,8 +1590,10 @@ void MEDCouplingFieldDouble::fillFromAnalytic(int nbOfComp, const std::string& f
* \throw If the spatial discretization of \a this field is NULL.
* \throw If computing \a func fails.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_fillFromAnalytic2 "Here is a C++ example".
* \ref py_mcfielddouble_fillFromAnalytic2 "Here is a Python example".
+ * \endif
*/
void MEDCouplingFieldDouble::fillFromAnalytic2(int nbOfComp, const std::string& func)
{
@@ -1604,8 +1639,10 @@ void MEDCouplingFieldDouble::fillFromAnalytic2(int nbOfComp, const std::string&
* \throw If the spatial discretization of \a this field is NULL.
* \throw If computing \a func fails.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_fillFromAnalytic3 "Here is a C++ example".
* \ref py_mcfielddouble_fillFromAnalytic3 "Here is a Python example".
+ * \endif
*/
void MEDCouplingFieldDouble::fillFromAnalytic3(int nbOfComp, const std::vector& varsOrder, const std::string& func)
{
@@ -1625,7 +1662,9 @@ void MEDCouplingFieldDouble::fillFromAnalytic3(int nbOfComp, const std::vector
* \ref py_mcfielddouble_applyFunc_val "Here is a Python example".
+ * \endif
*/
void MEDCouplingFieldDouble::applyFunc(int nbOfComp, double val)
{
@@ -1681,8 +1722,10 @@ void MEDCouplingFieldDouble::applyFunc(int nbOfComp, double val)
* This function is to compute a field value basing on a current field value.
* \throw If computing \a func fails.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_applyFunc "Here is a C++ example".
* \ref py_mcfielddouble_applyFunc "Here is a Python example".
+ * \endif
*/
void MEDCouplingFieldDouble::applyFunc(int nbOfComp, const std::string& func)
{
@@ -1719,8 +1762,10 @@ void MEDCouplingFieldDouble::applyFunc(int nbOfComp, const std::string& func)
* This function is to compute a new field value basing on a current field value.
* \throw If computing \a func fails.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_applyFunc2 "Here is a C++ example".
* \ref py_mcfielddouble_applyFunc2 "Here is a Python example".
+ * \endif
*/
void MEDCouplingFieldDouble::applyFunc2(int nbOfComp, const std::string& func)
{
@@ -1756,8 +1801,10 @@ void MEDCouplingFieldDouble::applyFunc2(int nbOfComp, const std::string& func)
* This function is to compute a new field value basing on a current field value.
* \throw If computing \a func fails.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_applyFunc3 "Here is a C++ example".
* \ref py_mcfielddouble_applyFunc3 "Here is a Python example".
+ * \endif
*/
void MEDCouplingFieldDouble::applyFunc3(int nbOfComp, const std::vector& varsOrder, const std::string& func)
{
@@ -1786,8 +1833,10 @@ void MEDCouplingFieldDouble::applyFunc3(int nbOfComp, const std::vector
* \ref py_mcfielddouble_applyFunc_same_nb_comp "Here is a Python example".
+ * \endif
*/
void MEDCouplingFieldDouble::applyFunc(const std::string& func)
{
@@ -1828,25 +1877,32 @@ int MEDCouplingFieldDouble::getNumberOfComponents() const
}
/*!
+ * Use MEDCouplingField::getNumberOfTuplesExpected instead of this method. This method will be removed soon, because it is
+ * confusing compared to getNumberOfComponents() and getNumberOfValues() behaviour.
+ *
* Returns number of tuples in \a this field, that depends on
* - the number of entities in the underlying mesh
* - \ref MEDCouplingSpatialDisc "spatial discretization" of \a this field (e.g. number
* of Gauss points if \a this->getTypeOfField() ==
* \ref ParaMEDMEM::ON_GAUSS_PT "ON_GAUSS_PT").
*
- * The returned value does **not depend** on the number of tuples in the data array
+ * The returned value does \b not \b depend on the number of tuples in the data array
* (which has to be equal to the returned value), \b contrary to
* getNumberOfComponents() and getNumberOfValues() that retrieve information from the
- * data array.
+ * data array (Sorry, it is confusing !).
+ * So \b this \b method \b behaves \b exactly \b as MEDCouplingField::getNumberOfTuplesExpected \b method.
+ *
* \warning No checkCoherency() is done here.
* For more info on the data arrays, see \ref MEDCouplingArrayPage.
* \return int - the number of tuples.
* \throw If the mesh is not set.
* \throw If the spatial discretization of \a this field is NULL.
* \throw If the spatial discretization is not fully defined.
+ * \sa MEDCouplingField::getNumberOfTuplesExpected
*/
int MEDCouplingFieldDouble::getNumberOfTuples() const
{
+ //std::cerr << " ******* MEDCouplingFieldDouble::getNumberOfTuples is deprecated : use MEDCouplingField::getNumberOfTuplesExpected instead ! ******" << std::endl;
if(!_mesh)
throw INTERP_KERNEL::Exception("Impossible to retrieve number of tuples because no mesh specified !");
if(!((const MEDCouplingFieldDiscretization *)_type))
@@ -2101,8 +2157,10 @@ void MEDCouplingFieldDouble::serialize(DataArrayInt *&dataInt, std::vector
* \ref py_mcfielddouble_changeUnderlyingMesh "Here is a Python example".
+ * \endif
*/
void MEDCouplingFieldDouble::changeUnderlyingMesh(const MEDCouplingMesh *other, int levOfCheck, double precOnMesh, double eps)
{
@@ -2115,7 +2173,7 @@ void MEDCouplingFieldDouble::changeUnderlyingMesh(const MEDCouplingMesh *other,
renumberCellsWithoutMesh(cellCor->getConstPointer(),false);
if(nodeCor)
renumberNodesWithoutMesh(nodeCor->getConstPointer(),nodeCor->getMaxValueInArray()+1,eps);
- setMesh(const_cast(other));
+ setMesh(other);
}
/*!
@@ -2147,8 +2205,10 @@ void MEDCouplingFieldDouble::changeUnderlyingMesh(const MEDCouplingMesh *other,
* \throw If the two fields are not coherent for merge.
* \throw If field values at merged nodes (if any) deffer more than \a eps.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_substractInPlaceDM "Here is a C++ example".
* \ref py_mcfielddouble_substractInPlaceDM "Here is a Python example".
+ * \endif
* \sa changeUnderlyingMesh().
*/
void MEDCouplingFieldDouble::substractInPlaceDM(const MEDCouplingFieldDouble *f, int levOfCheck, double precOnMesh, double eps)
@@ -2683,8 +2743,10 @@ void MEDCouplingFieldDouble::sortPerTuple(bool asc)
* \throw If the spatial discretization of \a f1 is NULL.
* \throw If the time discretization of \a f1 is NULL.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_MergeFields "Here is a C++ example".
* \ref py_mcfielddouble_MergeFields "Here is a Python example".
+ * \endif
*/
MEDCouplingFieldDouble *MEDCouplingFieldDouble::MergeFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2)
{
@@ -2722,8 +2784,10 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::MergeFields(const MEDCouplingFie
* \throw If \a a is empty.
* \throw If the fields are not compatible for the merge.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_MergeFields "Here is a C++ example".
* \ref py_mcfielddouble_MergeFields "Here is a Python example".
+ * \endif
*/
MEDCouplingFieldDouble *MEDCouplingFieldDouble::MergeFields(const std::vector& a)
{
@@ -2857,8 +2921,10 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::CrossProductFields(const MEDCoup
* \throw If the fields are not strictly compatible (areStrictlyCompatible()), i.e. they
* differ not only in values.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_MaxFields "Here is a C++ example".
* \ref py_mcfielddouble_MaxFields "Here is a Python example".
+ * \endif
*/
MEDCouplingFieldDouble *MEDCouplingFieldDouble::MaxFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2)
{
@@ -2885,8 +2951,10 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::MaxFields(const MEDCouplingField
* \throw If the fields are not strictly compatible (areStrictlyCompatible()), i.e. they
* differ not only in values.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_MaxFields "Here is a C++ example".
* \ref py_mcfielddouble_MaxFields "Here is a Python example".
+ * \endif
*/
MEDCouplingFieldDouble *MEDCouplingFieldDouble::MinFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2)
{
@@ -2957,7 +3025,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::AddFields(const MEDCouplingField
* \throw If the fields are not strictly compatible (areStrictlyCompatible()), i.e. they
* differ not only in values.
*/
-const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator+=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception)
+const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator+=(const MEDCouplingFieldDouble& other)
{
if(!areStrictlyCompatible(&other))
throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply += on them !");
@@ -3001,7 +3069,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::SubstractFields(const MEDCouplin
* \throw If the fields are not strictly compatible (areStrictlyCompatible()), i.e. they
* differ not only in values.
*/
-const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator-=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception)
+const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator-=(const MEDCouplingFieldDouble& other)
{
if(!areStrictlyCompatible(&other))
throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply -= on them !");
@@ -3063,7 +3131,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::MultiplyFields(const MEDCoupling
* (areCompatibleForMul()),
* i.e. they differ not only in values and possibly in number of components.
*/
-const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator*=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception)
+const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator*=(const MEDCouplingFieldDouble& other)
{
if(!areCompatibleForMul(&other))
throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply *= on them !");
@@ -3119,7 +3187,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::DivideFields(const MEDCouplingFi
* \throw If the fields are not compatible for division (areCompatibleForDiv()),
* i.e. they differ not only in values and possibly in number of components.
*/
-const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator/=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception)
+const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator/=(const MEDCouplingFieldDouble& other)
{
if(!areCompatibleForDiv(&other))
throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply /= on them !");
@@ -3150,12 +3218,12 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::PowFields(const MEDCouplingField
*
* \sa MEDCouplingFieldDouble::PowFields
*/
-MEDCouplingFieldDouble *MEDCouplingFieldDouble::operator^(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception)
+MEDCouplingFieldDouble *MEDCouplingFieldDouble::operator^(const MEDCouplingFieldDouble& other) const
{
return PowFields(this,&other);
}
-const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator^=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception)
+const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator^=(const MEDCouplingFieldDouble& other)
{
if(!areCompatibleForDiv(&other))
throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply /= on them !");
@@ -3176,8 +3244,10 @@ const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator^=(const MEDCoupli
* \throw If the mesh is not set.
* \throw If any of the fields has no name.
*
+ * \if ENABLE_EXAMPLES
* \ref cpp_mcfielddouble_WriteVTK "Here is a C++ example".
* \ref py_mcfielddouble_WriteVTK "Here is a Python example".
+ * \endif
*/
void MEDCouplingFieldDouble::WriteVTK(const std::string& fileName, const std::vector& fs, bool isBinary)
{
@@ -3223,12 +3293,12 @@ void MEDCouplingFieldDouble::reprQuickOverview(std::ostream& stream) const
stream << "MEDCouplingFieldDouble C++ instance at " << this << ". Name : \"" << _name << "\"." << std::endl;
const char *nat=0;
try
- {
+ {
nat=MEDCouplingNatureOfField::GetRepr(_nature);
stream << "Nature of field : " << nat << ".\n";
- }
+ }
catch(INTERP_KERNEL::Exception& /*e*/)
- { }
+ { }
const MEDCouplingFieldDiscretization *fd(_type);
if(!fd)
stream << "No spatial discretization set !";