//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
* Sets a time \a unit of \a this field. For more info, see \ref MEDCouplingFirstSteps3.
* \param [in] unit \a unit (string) in which time is measured.
*/
* Sets a time \a unit of \a this field. For more info, see \ref MEDCouplingFirstSteps3.
* \param [in] unit \a unit (string) in which time is measured.
*/
* Returns a time unit of \a this field.
* \return a string describing units in which time is measured.
*/
* Returns a time unit of \a this field.
* \return a string describing units in which time is measured.
*/
* \return MEDCouplingFieldDouble* - a new instance of MEDCouplingFieldDouble. The
* caller is to delete this field using decrRef() as it is no more needed.
*
* \return MEDCouplingFieldDouble* - a new instance of MEDCouplingFieldDouble. The
* caller is to delete this field using decrRef() as it is no more needed.
*
* \ref cpp_mcfielddouble_buildNewTimeReprFromThis "Here is a C++ example."<br>
* \ref py_mcfielddouble_buildNewTimeReprFromThis "Here is a Python example."
* \ref cpp_mcfielddouble_buildNewTimeReprFromThis "Here is a C++ example."<br>
* \ref py_mcfielddouble_buildNewTimeReprFromThis "Here is a Python example."
disc=_type->clone();
MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=new MEDCouplingFieldDouble(getNature(),tdo,disc.retn());
ret->setMesh(getMesh());
disc=_type->clone();
MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=new MEDCouplingFieldDouble(getNature(),tdo,disc.retn());
ret->setMesh(getMesh());
MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDiscretizationP1> nsp(new MEDCouplingFieldDiscretizationP1);
ret->setDiscretization(nsp);
const MEDCouplingMesh *m(getMesh());//m is non empty thanks to checkCoherency call
MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDiscretizationP1> nsp(new MEDCouplingFieldDiscretizationP1);
ret->setDiscretization(nsp);
const MEDCouplingMesh *m(getMesh());//m is non empty thanks to checkCoherency call
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> rn(DataArrayInt::New()),rni(DataArrayInt::New());
m->getReverseNodalConnectivity(rn,rni);
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> rni2(rni->deltaShiftIndex());
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> rn(DataArrayInt::New()),rni(DataArrayInt::New());
m->getReverseNodalConnectivity(rn,rni);
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> rni2(rni->deltaShiftIndex());
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > outArrsSafe(sz); std::vector<DataArrayDouble *> outArrs(sz);
for(std::size_t j=0;j<sz;j++)
{
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > outArrsSafe(sz); std::vector<DataArrayDouble *> outArrs(sz);
for(std::size_t j=0;j<sz;j++)
{
MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> tmp(arrs[j]->selectByTupleIdSafe(rn->begin(),rn->end()));
outArrsSafe[j]=(tmp->accumulatePerChunck(rni->begin(),rni->end())); tmp=0;
outArrsSafe[j]->divideEqual(rni3);
MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> tmp(arrs[j]->selectByTupleIdSafe(rn->begin(),rn->end()));
outArrsSafe[j]=(tmp->accumulatePerChunck(rni->begin(),rni->end())); tmp=0;
outArrsSafe[j]->divideEqual(rni3);
{
std::vector<const MEDCouplingFieldDouble *> fs(1,this);
MEDCouplingFieldDouble::WriteVTK(fileName,fs,isBinary);
{
std::vector<const MEDCouplingFieldDouble *> fs(1,this);
MEDCouplingFieldDouble::WriteVTK(fileName,fs,isBinary);
* \throw If \a check == \c true and \a old2NewBg contains equal ids.
* \throw If mesh nature does not allow renumbering (e.g. structured mesh).
*
* \throw If \a check == \c true and \a old2NewBg contains equal ids.
* \throw If mesh nature does not allow renumbering (e.g. structured mesh).
*
* \ref cpp_mcfielddouble_renumberCells "Here is a C++ example".<br>
* \ref py_mcfielddouble_renumberCells "Here is a Python example".
* \ref cpp_mcfielddouble_renumberCells "Here is a C++ example".<br>
* \ref py_mcfielddouble_renumberCells "Here is a Python example".
- 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<DataArrayDouble *> arrays;
//
_type->renumberCells(old2NewBg,check);
std::vector<DataArrayDouble *> arrays;
* \throw If mesh nature does not allow renumbering (e.g. structured mesh).
* \throw If values at merged nodes deffer more than \a eps.
*
* \throw If mesh nature does not allow renumbering (e.g. structured mesh).
* \throw If values at merged nodes deffer more than \a eps.
*
* \ref cpp_mcfielddouble_renumberNodes "Here is a C++ example".<br>
* \ref py_mcfielddouble_renumberNodes "Here is a Python example".
* \ref cpp_mcfielddouble_renumberNodes "Here is a C++ example".<br>
* \ref py_mcfielddouble_renumberNodes "Here is a Python example".
* \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.
*
* \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.
*
* \ref cpp_mcfielddouble_subpart1 "Here is a C++ example".<br>
* \ref py_mcfielddouble_subpart1 "Here is a Python example".
* \ref cpp_mcfielddouble_subpart1 "Here is a C++ example".<br>
* \ref py_mcfielddouble_subpart1 "Here is a Python example".
* \ref cpp_mcfielddouble_subpart1 "Here a C++ example."<br>
* \ref py_mcfielddouble_subpart1 "Here a Python example."
* \ref cpp_mcfielddouble_subpart1 "Here a C++ example."<br>
* \ref py_mcfielddouble_subpart1 "Here a Python example."
* \sa ParaMEDMEM::MEDCouplingFieldDouble::buildSubPart(const DataArrayInt *) const, MEDCouplingFieldDouble::buildSubPartRange
*/
MEDCouplingFieldDouble *MEDCouplingFieldDouble::buildSubPart(const int *partBg, const int *partEnd) const
* \sa ParaMEDMEM::MEDCouplingFieldDouble::buildSubPart(const DataArrayInt *) const, MEDCouplingFieldDouble::buildSubPartRange
*/
MEDCouplingFieldDouble *MEDCouplingFieldDouble::buildSubPart(const int *partBg, const int *partEnd) const
}
MEDCouplingFieldDouble::MEDCouplingFieldDouble(TypeOfField type, TypeOfTimeDiscretization td):MEDCouplingField(type),
}
MEDCouplingFieldDouble::MEDCouplingFieldDouble(TypeOfField type, TypeOfTimeDiscretization td):MEDCouplingField(type),
* ** 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),
* ** 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),
{
}
MEDCouplingFieldDouble::MEDCouplingFieldDouble(const MEDCouplingFieldDouble& other, bool deepCopy):MEDCouplingField(other,deepCopy),
{
}
MEDCouplingFieldDouble::MEDCouplingFieldDouble(const MEDCouplingFieldDouble& other, bool deepCopy):MEDCouplingField(other,deepCopy),
* \ref cpp_mcfielddouble_getValueOnPos "Here is a C++ example".<br>
* \ref py_mcfielddouble_getValueOnPos "Here is a Python example".
* \ref cpp_mcfielddouble_getValueOnPos "Here is a C++ example".<br>
* \ref py_mcfielddouble_getValueOnPos "Here is a Python example".
*/
void MEDCouplingFieldDouble::getValueOnPos(int i, int j, int k, double *res) const
{
*/
void MEDCouplingFieldDouble::getValueOnPos(int i, int j, int k, double *res) const
{
* \ref cpp_mcfielddouble_getValueOn "Here is a C++ example".<br>
* \ref py_mcfielddouble_getValueOn "Here is a Python example".
* \ref cpp_mcfielddouble_getValueOn "Here is a C++ example".<br>
* \ref py_mcfielddouble_getValueOn "Here is a Python example".
* \throw If the mesh is not set.
* \throw If any point in \a spaceLoc is out of the spatial discretization.
*
* \throw If the mesh is not set.
* \throw If any point in \a spaceLoc is out of the spatial discretization.
*
* \ref cpp_mcfielddouble_getValueOnMulti "Here is a C++ example".<br>
* \ref py_mcfielddouble_getValueOnMulti "Here is a Python example".
* \ref cpp_mcfielddouble_getValueOnMulti "Here is a C++ example".<br>
* \ref py_mcfielddouble_getValueOnMulti "Here is a Python example".
* \throw If \a spaceLoc is out of the spatial discretization.
* \throw If \a time is not covered by \a this->_time_discr.
*
* \throw If \a spaceLoc is out of the spatial discretization.
* \throw If \a time is not covered by \a this->_time_discr.
*
* \ref cpp_mcfielddouble_getValueOn_time "Here is a C++ example".<br>
* \ref py_mcfielddouble_getValueOn_time "Here is a Python example".
* \ref cpp_mcfielddouble_getValueOn_time "Here is a C++ example".<br>
* \ref py_mcfielddouble_getValueOn_time "Here is a Python example".
* All tuples will have the same value 'value'.
* An exception is thrown if no underlying mesh is defined.
*/
* All tuples will have the same value 'value'.
* An exception is thrown if no underlying mesh is defined.
*/
* \throw If \a func returns \c false.
* \throw If the spatial discretization of \a this field is NULL.
*
* \throw If \a func returns \c false.
* \throw If the spatial discretization of \a this field is NULL.
*
* \throw If the spatial discretization of \a this field is NULL.
* \throw If computing \a func fails.
*
* \throw If the spatial discretization of \a this field is NULL.
* \throw If computing \a func fails.
*
* \ref cpp_mcfielddouble_fillFromAnalytic "Here is a C++ example".<br>
* \ref py_mcfielddouble_fillFromAnalytic "Here is a Python example".
* \ref cpp_mcfielddouble_fillFromAnalytic "Here is a C++ example".<br>
* \ref py_mcfielddouble_fillFromAnalytic "Here is a Python example".
* The function is applied to coordinates of value location points. For example, if
* \a this field is on cells, the function is applied to cell barycenters.<br>
* This method differs from
* The function is applied to coordinates of value location points. For example, if
* \a this field is on cells, the function is applied to cell barycenters.<br>
* This method differs from
* by the way how variable
* names, used in the function, are associated with components of coordinates of field
* location points; here, a variable name corresponding to a component is retrieved from
* by the way how variable
* names, used in the function, are associated with components of coordinates of field
* location points; here, a variable name corresponding to a component is retrieved from
* \throw If the spatial discretization of \a this field is NULL.
* \throw If computing \a func fails.
*
* \throw If the spatial discretization of \a this field is NULL.
* \throw If computing \a func fails.
*
* \ref cpp_mcfielddouble_fillFromAnalytic2 "Here is a C++ example".<br>
* \ref py_mcfielddouble_fillFromAnalytic2 "Here is a Python example".
* \ref cpp_mcfielddouble_fillFromAnalytic2 "Here is a C++ example".<br>
* \ref py_mcfielddouble_fillFromAnalytic2 "Here is a Python example".
* The function is applied to coordinates of value location points. For example, if
* \a this field is on cells, the function is applied to cell barycenters.<br>
* This method differs from
* The function is applied to coordinates of value location points. For example, if
* \a this field is on cells, the function is applied to cell barycenters.<br>
* This method differs from
* by the way how variable
* names, used in the function, are associated with components of coordinates of field
* location points; here, a component index of a variable is defined by a
* by the way how variable
* names, used in the function, are associated with components of coordinates of field
* location points; here, a component index of a variable is defined by a
* \throw If the spatial discretization of \a this field is NULL.
* \throw If computing \a func fails.
*
* \throw If the spatial discretization of \a this field is NULL.
* \throw If computing \a func fails.
*
* \ref cpp_mcfielddouble_fillFromAnalytic3 "Here is a C++ example".<br>
* \ref py_mcfielddouble_fillFromAnalytic3 "Here is a Python example".
* \ref cpp_mcfielddouble_fillFromAnalytic3 "Here is a C++ example".<br>
* \ref py_mcfielddouble_fillFromAnalytic3 "Here is a Python example".
-void MEDCouplingFieldDouble::fillFromAnalytic3(int nbOfComp, const std::vector<std::string>& varsOrder, const char *func)
+void MEDCouplingFieldDouble::fillFromAnalytic3(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func)
* This function is to compute a field value basing on a current field value.
* \throw If \a func returns \c false.
*
* This function is to compute a field value basing on a current field value.
* \throw If \a func returns \c false.
*
* \ref cpp_mcfielddouble_applyFunc_val "Here is a C++ example".<br>
* \ref py_mcfielddouble_applyFunc_val "Here is a Python example".
* \ref cpp_mcfielddouble_applyFunc_val "Here is a C++ example".<br>
* \ref py_mcfielddouble_applyFunc_val "Here is a Python example".
* This function is to compute a field value basing on a current field value.
* \throw If computing \a func fails.
*
* This function is to compute a field value basing on a current field value.
* \throw If computing \a func fails.
*
* \ref cpp_mcfielddouble_applyFunc "Here is a C++ example".<br>
* \ref py_mcfielddouble_applyFunc "Here is a Python example".
* \ref cpp_mcfielddouble_applyFunc "Here is a C++ example".<br>
* \ref py_mcfielddouble_applyFunc "Here is a Python example".
* For more info on supported expressions that can be used in the function, see \ref
* MEDCouplingArrayApplyFuncExpr. <br>
* This method differs from
* For more info on supported expressions that can be used in the function, see \ref
* MEDCouplingArrayApplyFuncExpr. <br>
* This method differs from
* by the way how variable
* names, used in the function, are associated with components of field values;
* here, a variable name corresponding to a component is retrieved from
* by the way how variable
* names, used in the function, are associated with components of field values;
* here, a variable name corresponding to a component is retrieved from
* This function is to compute a new field value basing on a current field value.
* \throw If computing \a func fails.
*
* This function is to compute a new field value basing on a current field value.
* \throw If computing \a func fails.
*
* \ref cpp_mcfielddouble_applyFunc2 "Here is a C++ example".<br>
* \ref py_mcfielddouble_applyFunc2 "Here is a Python example".
* \ref cpp_mcfielddouble_applyFunc2 "Here is a C++ example".<br>
* \ref py_mcfielddouble_applyFunc2 "Here is a Python example".
* Modifies values of \a this field by applying a function to each tuple of all
* data arrays.
* This method differs from
* Modifies values of \a this field by applying a function to each tuple of all
* data arrays.
* This method differs from
* by the way how variable
* names, used in the function, are associated with components of field values;
* here, a component index of a variable is defined by a
* by the way how variable
* names, used in the function, are associated with components of field values;
* here, a component index of a variable is defined by a
* This function is to compute a new field value basing on a current field value.
* \throw If computing \a func fails.
*
* This function is to compute a new field value basing on a current field value.
* \throw If computing \a func fails.
*
* \ref cpp_mcfielddouble_applyFunc3 "Here is a C++ example".<br>
* \ref py_mcfielddouble_applyFunc3 "Here is a Python example".
* \ref cpp_mcfielddouble_applyFunc3 "Here is a C++ example".<br>
* \ref py_mcfielddouble_applyFunc3 "Here is a Python example".
-void MEDCouplingFieldDouble::applyFunc3(int nbOfComp, const std::vector<std::string>& varsOrder, const char *func)
+void MEDCouplingFieldDouble::applyFunc3(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func)
* This function is to compute a field value basing on a current field value.
* \throw If computing \a func fails.
*
* This function is to compute a field value basing on a current field value.
* \throw If computing \a func fails.
*
* \ref cpp_mcfielddouble_applyFunc_same_nb_comp "Here is a C++ example".<br>
* \ref py_mcfielddouble_applyFunc_same_nb_comp "Here is a Python example".
* \ref cpp_mcfielddouble_applyFunc_same_nb_comp "Here is a C++ example".<br>
* \ref py_mcfielddouble_applyFunc_same_nb_comp "Here is a Python example".
* The field will contain exactly the same number of components after the call.
* Use is not warranted for the moment !
*/
* The field will contain exactly the same number of components after the call.
* Use is not warranted for the moment !
*/
* The field will contain exactly the same number of components after the call.
* Use is not warranted for the moment !
*/
* The field will contain exactly the same number of components after the call.
* Use is not warranted for the moment !
*/
double val=_mesh->getTime(it,ordr);
std::string timeUnit(_mesh->getTimeUnit());
setTime(val,it,ordr);
double val=_mesh->getTime(it,ordr);
std::string timeUnit(_mesh->getTimeUnit());
setTime(val,it,ordr);
int nbOfElemS=(int)tinyInfoS.size();
_name=tinyInfoS[nbOfElemS-3];
_desc=tinyInfoS[nbOfElemS-2];
int nbOfElemS=(int)tinyInfoS.size();
_name=tinyInfoS[nbOfElemS-3];
_desc=tinyInfoS[nbOfElemS-2];
* \throw If the two meshes do not match.
* \throw If field values at merged nodes (if any) deffer more than \a eps.
*
* \throw If the two meshes do not match.
* \throw If field values at merged nodes (if any) deffer more than \a eps.
*
* \ref cpp_mcfielddouble_changeUnderlyingMesh "Here is a C++ example".<br>
* \ref py_mcfielddouble_changeUnderlyingMesh "Here is a Python example".
* \ref cpp_mcfielddouble_changeUnderlyingMesh "Here is a C++ example".<br>
* \ref py_mcfielddouble_changeUnderlyingMesh "Here is a Python example".
*/
void MEDCouplingFieldDouble::changeUnderlyingMesh(const MEDCouplingMesh *other, int levOfCheck, double precOnMesh, double eps)
{
*/
void MEDCouplingFieldDouble::changeUnderlyingMesh(const MEDCouplingMesh *other, int levOfCheck, double precOnMesh, double eps)
{
renumberCellsWithoutMesh(cellCor->getConstPointer(),false);
if(nodeCor)
renumberNodesWithoutMesh(nodeCor->getConstPointer(),nodeCor->getMaxValueInArray()+1,eps);
renumberCellsWithoutMesh(cellCor->getConstPointer(),false);
if(nodeCor)
renumberNodesWithoutMesh(nodeCor->getConstPointer(),nodeCor->getMaxValueInArray()+1,eps);
* \throw If the two fields are not coherent for merge.
* \throw If field values at merged nodes (if any) deffer more than \a eps.
*
* \throw If the two fields are not coherent for merge.
* \throw If field values at merged nodes (if any) deffer more than \a eps.
*
* \ref cpp_mcfielddouble_substractInPlaceDM "Here is a C++ example".<br>
* \ref py_mcfielddouble_substractInPlaceDM "Here is a Python example".
* \ref cpp_mcfielddouble_substractInPlaceDM "Here is a C++ example".<br>
* \ref py_mcfielddouble_substractInPlaceDM "Here is a Python example".
* \sa changeUnderlyingMesh().
*/
void MEDCouplingFieldDouble::substractInPlaceDM(const MEDCouplingFieldDouble *f, int levOfCheck, double precOnMesh, double eps)
* \sa changeUnderlyingMesh().
*/
void MEDCouplingFieldDouble::substractInPlaceDM(const MEDCouplingFieldDouble *f, int levOfCheck, double precOnMesh, double eps)
MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=new MEDCouplingFieldDouble(getNature(),td,_type->clone());
std::ostringstream oss;
oss << "Max_" << getName();
MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=new MEDCouplingFieldDouble(getNature(),td,_type->clone());
std::ostringstream oss;
oss << "Max_" << getName();
MEDCouplingTimeDiscretization *td=_time_discr->keepSelectedComponents(compoIds);
td->copyTinyAttrFrom(*_time_discr);
MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=new MEDCouplingFieldDouble(getNature(),td,_type->clone());
MEDCouplingTimeDiscretization *td=_time_discr->keepSelectedComponents(compoIds);
td->copyTinyAttrFrom(*_time_discr);
MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=new MEDCouplingFieldDouble(getNature(),td,_type->clone());
* \throw If the spatial discretization of \a f1 is NULL.
* \throw If the time discretization of \a f1 is NULL.
*
* \throw If the spatial discretization of \a f1 is NULL.
* \throw If the time discretization of \a f1 is NULL.
*
* \ref cpp_mcfielddouble_MergeFields "Here is a C++ example".<br>
* \ref py_mcfielddouble_MergeFields "Here is a Python example".
* \ref cpp_mcfielddouble_MergeFields "Here is a C++ example".<br>
* \ref py_mcfielddouble_MergeFields "Here is a Python example".
MEDCouplingTimeDiscretization *td=f1->_time_discr->aggregate(f2->_time_discr);
td->copyTinyAttrFrom(*f1->_time_discr);
MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=new MEDCouplingFieldDouble(f1->getNature(),td,f1->_type->clone());
MEDCouplingTimeDiscretization *td=f1->_time_discr->aggregate(f2->_time_discr);
td->copyTinyAttrFrom(*f1->_time_discr);
MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=new MEDCouplingFieldDouble(f1->getNature(),td,f1->_type->clone());
* \ref cpp_mcfielddouble_MergeFields "Here is a C++ example".<br>
* \ref py_mcfielddouble_MergeFields "Here is a Python example".
* \ref cpp_mcfielddouble_MergeFields "Here is a C++ example".<br>
* \ref py_mcfielddouble_MergeFields "Here is a Python example".
MEDCouplingTimeDiscretization *td=tds[0]->aggregate(tds);
td->copyTinyAttrFrom(*(a[0]->_time_discr));
MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=new MEDCouplingFieldDouble(a[0]->getNature(),td,a[0]->_type->clone());
MEDCouplingTimeDiscretization *td=tds[0]->aggregate(tds);
td->copyTinyAttrFrom(*(a[0]->_time_discr));
MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=new MEDCouplingFieldDouble(a[0]->getNature(),td,a[0]->_type->clone());
* \throw If the fields are not strictly compatible (areStrictlyCompatible()), i.e. they
* differ not only in values.
*
* \throw If the fields are not strictly compatible (areStrictlyCompatible()), i.e. they
* differ not only in values.
*
* \ref cpp_mcfielddouble_MaxFields "Here is a C++ example".<br>
* \ref py_mcfielddouble_MaxFields "Here is a Python example".
* \ref cpp_mcfielddouble_MaxFields "Here is a C++ example".<br>
* \ref py_mcfielddouble_MaxFields "Here is a Python example".
* \throw If the fields are not strictly compatible (areStrictlyCompatible()), i.e. they
* differ not only in values.
*
* \throw If the fields are not strictly compatible (areStrictlyCompatible()), i.e. they
* differ not only in values.
*
* \ref cpp_mcfielddouble_MaxFields "Here is a C++ example".<br>
* \ref py_mcfielddouble_MaxFields "Here is a Python example".
* \ref cpp_mcfielddouble_MaxFields "Here is a C++ example".<br>
* \ref py_mcfielddouble_MaxFields "Here is a Python example".
* \throw If the fields are not strictly compatible (areStrictlyCompatible()), i.e. they
* differ not only in values.
*/
* \throw If the fields are not strictly compatible (areStrictlyCompatible()), i.e. they
* differ not only in values.
*/
{
if(!areStrictlyCompatible(&other))
throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply += on them !");
{
if(!areStrictlyCompatible(&other))
throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply += on them !");
* \throw If the fields are not strictly compatible (areStrictlyCompatible()), i.e. they
* differ not only in values.
*/
* \throw If the fields are not strictly compatible (areStrictlyCompatible()), i.e. they
* differ not only in values.
*/
{
if(!areStrictlyCompatible(&other))
throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply -= on them !");
{
if(!areStrictlyCompatible(&other))
throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply -= on them !");
* (areCompatibleForMul()),
* i.e. they differ not only in values and possibly in number of components.
*/
* (areCompatibleForMul()),
* i.e. they differ not only in values and possibly in number of components.
*/
{
if(!areCompatibleForMul(&other))
throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply *= on them !");
{
if(!areCompatibleForMul(&other))
throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply *= on them !");
* \throw If the fields are not compatible for division (areCompatibleForDiv()),
* i.e. they differ not only in values and possibly in number of components.
*/
* \throw If the fields are not compatible for division (areCompatibleForDiv()),
* i.e. they differ not only in values and possibly in number of components.
*/
{
if(!areCompatibleForDiv(&other))
throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply /= on them !");
{
if(!areCompatibleForDiv(&other))
throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply /= on them !");
{
if(!areCompatibleForDiv(&other))
throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply /= on them !");
{
if(!areCompatibleForDiv(&other))
throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply /= on them !");
* \ref cpp_mcfielddouble_WriteVTK "Here is a C++ example".<br>
* \ref py_mcfielddouble_WriteVTK "Here is a Python example".
* \ref cpp_mcfielddouble_WriteVTK "Here is a C++ example".<br>
* \ref py_mcfielddouble_WriteVTK "Here is a Python example".
-void MEDCouplingFieldDouble::WriteVTK(const char *fileName, const std::vector<const MEDCouplingFieldDouble *>& fs, bool isBinary)
+void MEDCouplingFieldDouble::WriteVTK(const std::string& fileName, const std::vector<const MEDCouplingFieldDouble *>& fs, bool isBinary)
- cur->getArray()->writeVTK(coss,8,cur->getName().c_str(),byteArr);
+ cur->getArray()->writeVTK(coss,8,cur->getName(),byteArr);
- cur->getArray()->writeVTK(noss,8,cur->getName().c_str(),byteArr);
+ cur->getArray()->writeVTK(noss,8,cur->getName(),byteArr);