return std::string("UnstructuredGrid");
}
+std::string MEDCoupling1GTUMesh::getVTKFileExtension() const
+{
+ return std::string("vtu");
+}
+
std::size_t MEDCoupling1GTUMesh::getHeapMemorySizeWithoutChildren() const
{
return MEDCouplingPointSet::getHeapMemorySizeWithoutChildren();
MEDCOUPLING_EXPORT DataArrayInt *checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const;
MEDCOUPLING_EXPORT void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const;
MEDCOUPLING_EXPORT std::string getVTKDataSetType() const;
+ MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
//
MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
MEDCOUPLING_EXPORT int getNodalConnectivityLength() const;
}
}
+std::string MEDCouplingCMesh::getVTKFileExtension() const
+{
+ return std::string("vtr");
+}
+
std::string MEDCouplingCMesh::getVTKDataSetType() const
{
return std::string("RectilinearGrid");
MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings);
MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
+ MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
private:
MEDCouplingCMesh();
MEDCouplingCMesh(const MEDCouplingCMesh& other, bool deepCpy);
coo->reprQuickOverviewData(stream,200);
}
+std::string MEDCouplingCurveLinearMesh::getVTKFileExtension() const
+{
+ return std::string("vts");
+}
+
std::string MEDCouplingCurveLinearMesh::getVTKDataSetType() const
{
return std::string("StructuredGrid");
MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings);
MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
+ MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
private:
void getMeasureFieldMeshDim1(bool isAbs, MEDCouplingFieldDouble *field) const;
void getMeasureFieldMeshDim2(bool isAbs, MEDCouplingFieldDouble *field) const;
stream << "MEDCouplingExtrudedMesh C++ instance at " << this << ". Name : \"" << getName() << "\".";
}
+std::string MEDCouplingExtrudedMesh::getVTKFileExtension() const
+{
+ return _mesh2D->getVTKFileExtension();
+}
+
std::string MEDCouplingExtrudedMesh::getVTKDataSetType() const
{
return _mesh2D->getVTKDataSetType();
MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings);
MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
+ MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
private:
MEDCouplingExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId);
MEDCouplingExtrudedMesh(const MEDCouplingExtrudedMesh& other, bool deepCopy);
return ret.str();
}
-void MEDCouplingFieldDouble::writeVTK(const std::string& fileName, bool isBinary) const
+std::string MEDCouplingFieldDouble::writeVTK(const std::string& fileName, bool isBinary) const
{
std::vector<const MEDCouplingFieldDouble *> fs(1,this);
- MEDCouplingFieldDouble::WriteVTK(fileName,fs,isBinary);
+ return MEDCouplingFieldDouble::WriteVTK(fileName,fs,isBinary);
}
bool MEDCouplingFieldDouble::isEqualIfNotWhy(const MEDCouplingField *other, double meshPrec, double valsPrec, std::string& reason) const
* \ref py_mcfielddouble_WriteVTK "Here is a Python example".
* \endif
*/
-void MEDCouplingFieldDouble::WriteVTK(const std::string& fileName, const std::vector<const MEDCouplingFieldDouble *>& fs, bool isBinary)
+std::string MEDCouplingFieldDouble::WriteVTK(const std::string& fileName, const std::vector<const MEDCouplingFieldDouble *>& fs, bool isBinary)
{
if(fs.empty())
- return;
+ return std::string();
std::size_t nfs=fs.size();
if(!fs[0])
throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::WriteVTK : 1st instance of field is NULL !");
throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::WriteVTK : Fields are not lying on a same mesh ! Expected by VTK ! MEDCouplingFieldDouble::setMesh or MEDCouplingFieldDouble::changeUnderlyingMesh can help to that.");
if(!m)
throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::WriteVTK : Fields are lying on a same mesh but it is empty !");
+ std::string ret(m->getVTKFileNameOf(fileName));
MEDCouplingAutoRefCountObjectPtr<DataArrayByte> byteArr;
if(isBinary)
{ byteArr=DataArrayByte::New(); byteArr->alloc(0,1); }
else
throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::WriteVTK : only node and cell fields supported for the moment !");
}
- m->writeVTKAdvanced(fileName,coss.str(),noss.str(),byteArr);
+ m->writeVTKAdvanced(ret,coss.str(),noss.str(),byteArr);
+ return ret;
}
void MEDCouplingFieldDouble::reprQuickOverview(std::ostream& stream) const
MEDCOUPLING_EXPORT void copyAllTinyAttrFrom(const MEDCouplingFieldDouble *other);
MEDCOUPLING_EXPORT std::string simpleRepr() const;
MEDCOUPLING_EXPORT std::string advancedRepr() const;
- MEDCOUPLING_EXPORT void writeVTK(const std::string& fileName, bool isBinary=true) const;
+ MEDCOUPLING_EXPORT std::string writeVTK(const std::string& fileName, bool isBinary=true) const;
MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingField *other, double meshPrec, double valsPrec, std::string& reason) const;
MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingField *other, double meshPrec, double valsPrec) const;
MEDCOUPLING_EXPORT bool areCompatibleForMerge(const MEDCouplingField *other) const;
MEDCOUPLING_EXPORT MEDCouplingFieldDouble *operator^(const MEDCouplingFieldDouble& other) const;
MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator^=(const MEDCouplingFieldDouble& other);
MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *PowFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
- MEDCOUPLING_EXPORT static void WriteVTK(const std::string& fileName, const std::vector<const MEDCouplingFieldDouble *>& fs, bool isBinary=true);
+ MEDCOUPLING_EXPORT static std::string WriteVTK(const std::string& fileName, const std::vector<const MEDCouplingFieldDouble *>& fs, bool isBinary=true);
public:
MEDCOUPLING_EXPORT const MEDCouplingTimeDiscretization *getTimeDiscretizationUnderGround() const { return _time_discr; }
MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *getTimeDiscretizationUnderGround() { return _time_discr; }
stream << stream1.str();
}
+std::string MEDCouplingIMesh::getVTKFileExtension() const
+{
+ return std::string("vti");
+}
+
std::string MEDCouplingIMesh::getVTKDataSetType() const
{
return std::string("ImageData");
MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings);
MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
+ MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
private:
MEDCouplingIMesh();
MEDCouplingIMesh(const MEDCouplingIMesh& other, bool deepCpy);
/*!
* Writes \a this mesh into a VTK format file named as specified.
- * \param [in] fileName - the name of the file to write in.
+ * \param [in] fileName - the name of the file to write in. If the extension is OK the fileName will be used directly.
+ * If extension is invalid or no extension the right extension will be appended.
+ * \return - the real fileName
* \throw If \a fileName is not a writable file.
+ * \sa getVTKFileNameOf
*/
-void MEDCouplingMesh::writeVTK(const std::string& fileName, bool isBinary) const
+std::string MEDCouplingMesh::writeVTK(const std::string& fileName, bool isBinary) const
{
+ std::string ret(getVTKFileNameOf(fileName));
+ //
std::string cda,pda;
MEDCouplingAutoRefCountObjectPtr<DataArrayByte> byteArr;
if(isBinary)
{ byteArr=DataArrayByte::New(); byteArr->alloc(0,1); }
- writeVTKAdvanced(fileName,cda,pda,byteArr);
+ writeVTKAdvanced(ret,cda,pda,byteArr);
+ return ret;
+}
+
+/*!
+ * This method takes in input a file name \a fileName and considering the VTK extension of \a this (depending on the type of \a this)
+ * returns a right file name. If the input \a fileName has a valid extension the returned string is equal to \a fileName.
+ *
+ * \sa getVTKFileExtension
+ */
+std::string MEDCouplingMesh::getVTKFileNameOf(const std::string& fileName) const
+{
+ std::string ret;
+ std::string part0,part1;
+ SplitExtension(fileName,part0,part1);
+ std::string ext("."); ext+=getVTKFileExtension();
+ if(part1==ext)
+ ret=fileName;
+ else
+ ret=fileName+ext;
+ return ret;
}
void MEDCouplingMesh::writeVTKAdvanced(const std::string& fileName, const std::string& cda, const std::string& pda, DataArrayByte *byteData) const
ofs.close();
}
}
+
+void MEDCouplingMesh::SplitExtension(const std::string& fileName, std::string& baseName, std::string& extension)
+{
+ std::size_t pos(fileName.find_last_of('.'));
+ if(pos==std::string::npos)
+ {
+ baseName=fileName;
+ extension.clear();
+ return ;
+ }
+ baseName=fileName.substr(0,pos);
+ extension=fileName.substr(pos);
+}
MEDCOUPLING_EXPORT virtual void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const = 0;
MEDCOUPLING_EXPORT virtual void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings) = 0;
- MEDCOUPLING_EXPORT void writeVTK(const std::string& fileName, bool isBinary=true) const;
+ MEDCOUPLING_EXPORT std::string writeVTK(const std::string& fileName, bool isBinary=true) const;
+ MEDCOUPLING_EXPORT std::string getVTKFileNameOf(const std::string& fileName) const;
+ MEDCOUPLING_EXPORT virtual std::string getVTKFileExtension() const = 0;
/// @cond INTERNAL
MEDCOUPLING_EXPORT void writeVTKAdvanced(const std::string& fileName, const std::string& cda, const std::string& pda, DataArrayByte *byteData) const;
+ MEDCOUPLING_EXPORT static void SplitExtension(const std::string& fileName, std::string& baseName, std::string& extension);
/// @endcond
MEDCOUPLING_EXPORT virtual void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const = 0;
MEDCOUPLING_EXPORT virtual void reprQuickOverview(std::ostream& stream) const = 0;
*/
void MEDCouplingRemapper::transfer(const MEDCouplingFieldDouble *srcField, MEDCouplingFieldDouble *targetField, double dftValue)
{
+ if(!srcField || !targetField)
+ throw INTERP_KERNEL::Exception("MEDCouplingRemapper::transfer : input field must be both not NULL !");
transferUnderground(srcField,targetField,true,dftValue);
}
*/
void MEDCouplingRemapper::partialTransfer(const MEDCouplingFieldDouble *srcField, MEDCouplingFieldDouble *targetField)
{
+ if(!srcField || !targetField)
+ throw INTERP_KERNEL::Exception("MEDCouplingRemapper::partialTransfer : input field must be both not NULL !");
transferUnderground(srcField,targetField,false,std::numeric_limits<double>::max());
}
void MEDCouplingRemapper::reverseTransfer(MEDCouplingFieldDouble *srcField, const MEDCouplingFieldDouble *targetField, double dftValue)
{
+ if(!srcField || !targetField)
+ throw INTERP_KERNEL::Exception("MEDCouplingRemapper::reverseTransfer : input fields must be both not NULL !");
checkPrepare();
+ targetField->checkCoherency();
if(_src_ft->getDiscretization()->getStringRepr()!=srcField->getDiscretization()->getStringRepr())
throw INTERP_KERNEL::Exception("Incoherency with prepare call for source field");
if(_target_ft->getDiscretization()->getStringRepr()!=targetField->getDiscretization()->getStringRepr())
throw INTERP_KERNEL::Exception("Incoherency with prepare call for target field");
if(srcField->getNature()!=targetField->getNature())
throw INTERP_KERNEL::Exception("Natures of fields mismatch !");
- DataArrayDouble *array=srcField->getArray();
+ if(targetField->getNumberOfTuplesExpected()!=_target_ft->getNumberOfTuplesExpected())
+ {
+ std::ostringstream oss;
+ oss << "MEDCouplingRemapper::reverseTransfer : in given source field the number of tuples required is " << _target_ft->getNumberOfTuplesExpected() << " (on prepare) and number of tuples in given target field is " << targetField->getNumberOfTuplesExpected();
+ oss << " ! It appears that the target support is not the same between the prepare and the transfer !";
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+ DataArrayDouble *array(srcField->getArray());
int trgNbOfCompo=targetField->getNumberOfComponents();
if(array)
{
- if(trgNbOfCompo!=srcField->getNumberOfComponents())
+ srcField->checkCoherency();
+ if(trgNbOfCompo!=srcField->getNumberOfTuplesExpected())
throw INTERP_KERNEL::Exception("Number of components mismatch !");
}
else
{
- array=DataArrayDouble::New();
- array->alloc(srcField->getNumberOfTuples(),trgNbOfCompo);
- srcField->setArray(array);
- array->decrRef();
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble > tmp(DataArrayDouble::New());
+ tmp->alloc(srcField->getNumberOfTuplesExpected(),trgNbOfCompo);
+ srcField->setArray(tmp);
}
computeDeno(srcField->getNature(),srcField,targetField);
- double *resPointer=array->getPointer();
+ double *resPointer(srcField->getArray()->getPointer());
const double *inputPointer=targetField->getArray()->getConstPointer();
computeReverseProduct(inputPointer,trgNbOfCompo,dftValue,resPointer);
}
MEDCouplingFieldDouble *MEDCouplingRemapper::transferField(const MEDCouplingFieldDouble *srcField, double dftValue)
{
checkPrepare();
+ if(!srcField)
+ throw INTERP_KERNEL::Exception("MEDCouplingRemapper::transferField : input srcField is NULL !");
+ srcField->checkCoherency();
if(_src_ft->getDiscretization()->getStringRepr()!=srcField->getDiscretization()->getStringRepr())
throw INTERP_KERNEL::Exception("Incoherency with prepare call for source field");
MEDCouplingFieldDouble *ret=MEDCouplingFieldDouble::New(*_target_ft,srcField->getTimeDiscretization());
MEDCouplingFieldDouble *MEDCouplingRemapper::reverseTransferField(const MEDCouplingFieldDouble *targetField, double dftValue)
{
+ if(!targetField)
+ throw INTERP_KERNEL::Exception("MEDCouplingRemapper::transferField : input targetField is NULL !");
+ targetField->checkCoherency();
checkPrepare();
if(_target_ft->getDiscretization()->getStringRepr()!=targetField->getDiscretization()->getStringRepr())
throw INTERP_KERNEL::Exception("Incoherency with prepare call for target field");
void MEDCouplingRemapper::transferUnderground(const MEDCouplingFieldDouble *srcField, MEDCouplingFieldDouble *targetField, bool isDftVal, double dftValue)
{
+ if(!srcField || !targetField)
+ throw INTERP_KERNEL::Exception("MEDCouplingRemapper::transferUnderground : srcField or targetField is NULL !");
+ srcField->checkCoherency();
checkPrepare();
if(_src_ft->getDiscretization()->getStringRepr()!=srcField->getDiscretization()->getStringRepr())
throw INTERP_KERNEL::Exception("Incoherency with prepare call for source field");
throw INTERP_KERNEL::Exception("Incoherency with prepare call for target field");
if(srcField->getNature()!=targetField->getNature())
throw INTERP_KERNEL::Exception("Natures of fields mismatch !");
- DataArrayDouble *array=targetField->getArray();
- int srcNbOfCompo=srcField->getNumberOfComponents();
+ if(srcField->getNumberOfTuplesExpected()!=_src_ft->getNumberOfTuplesExpected())
+ {
+ std::ostringstream oss;
+ oss << "MEDCouplingRemapper::transferUnderground : in given source field the number of tuples required is " << _src_ft->getNumberOfTuplesExpected() << " (on prepare) and number of tuples in given source field is " << srcField->getNumberOfTuplesExpected();
+ oss << " ! It appears that the source support is not the same between the prepare and the transfer !";
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+ DataArrayDouble *array(targetField->getArray());
+ int srcNbOfCompo(srcField->getNumberOfComponents());
if(array)
{
+ targetField->checkCoherency();
if(srcNbOfCompo!=targetField->getNumberOfComponents())
throw INTERP_KERNEL::Exception("Number of components mismatch !");
}
{
if(!isDftVal)
throw INTERP_KERNEL::Exception("MEDCouplingRemapper::partialTransfer : This method requires that the array of target field exists ! Allocate it or call MEDCouplingRemapper::transfer instead !");
- array=DataArrayDouble::New();
- array->alloc(targetField->getNumberOfTuples(),srcNbOfCompo);
- targetField->setArray(array);
- array->decrRef();
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> tmp(DataArrayDouble::New());
+ tmp->alloc(targetField->getNumberOfTuples(),srcNbOfCompo);
+ targetField->setArray(tmp);
}
computeDeno(srcField->getNature(),srcField,targetField);
- double *resPointer=array->getPointer();
- const double *inputPointer=srcField->getArray()->getConstPointer();
+ double *resPointer(targetField->getArray()->getPointer());
+ const double *inputPointer(srcField->getArray()->getConstPointer());
computeProduct(inputPointer,srcNbOfCompo,isDftVal,dftValue,resPointer);
}
return std::string("UnstructuredGrid");
}
+std::string MEDCouplingUMesh::getVTKFileExtension() const
+{
+ return std::string("vtu");
+}
+
/*!
* Partitions the first given 2D mesh using the second given 2D mesh as a tool, and
* returns a result mesh constituted by polygons.
MEDCOUPLING_EXPORT void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const;
MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings);
MEDCOUPLING_EXPORT std::string getVTKDataSetType() const;
+ MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
MEDCOUPLING_EXPORT void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const;
MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
//tools
MEDCouplingFieldDouble *targetField=MEDCouplingFieldDouble::New(ON_CELLS);
targetField->setNature(ConservativeVolumic);
- targetField->setMesh(sourceMesh);
+ targetField->setMesh(targetMesh);
DataArrayDouble *array=DataArrayDouble::New();
array->alloc(targetMesh->getNumberOfCells(),1);
targetField->setArray(array);
self.assertTrue(mu.getNodalConnectivity().isEqual(DataArrayInt([1,0,3,4,2,1,4,5,4,3,6,7,5,4,7,8,7,6,9,10,8,7,10,11])))
pass
+ def testSwig1GetValuesAsTuple1(self):
+ d=DataArrayDouble()
+ self.assertEqual(d.getValues(),[])
+ self.assertEqual(d.getValuesAsTuple(),[])
+ d=DataArrayDouble(24) ; d.iota() ; d.rearrange(3)
+ self.assertEqual(d.getValues(),[0.,1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,11.,12.,13.,14.,15.,16.,17.,18.,19.,20.,21.,22.,23.])
+ self.assertEqual(d.getValuesAsTuple(),[(0.,1.,2.0),(3.,4.,5.0),(6.,7.,8.0),(9.,10.,11.0),(12.,13.,14.0),(15.,16.,17.0),(18.,19.,20.0),(21.,22.,23.)])
+ d=DataArrayInt()
+ self.assertEqual(d.getValues(),[])
+ self.assertEqual(d.getValuesAsTuple(),[])
+ d=DataArrayInt(24) ; d.iota() ; d.rearrange(3)
+ self.assertEqual(d.getValues(),[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23])
+ self.assertEqual(d.getValuesAsTuple(),[(0,1,2),(3,4,5),(6,7,8),(9,10,11),(12,13,14),(15,16,17),(18,19,20),(21,22,23)])
+ pass
+
def testSwig2AMR1(self):
self.assertEqual((1,3,12),MEDCouplingStructuredMesh.GetSplitVectFromStruct([3,4,5]))
self.assertEqual((3,2),MEDCouplingStructuredMesh.GetDimensionsFromCompactFrmt([(1,4),(2,4)]))
virtual INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const throw(INTERP_KERNEL::Exception);
virtual std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
virtual std::string advancedRepr() const throw(INTERP_KERNEL::Exception);
- void writeVTK(const std::string& fileName, bool isBinary=true) const throw(INTERP_KERNEL::Exception);
+ std::string writeVTK(const std::string& fileName, bool isBinary=true) const throw(INTERP_KERNEL::Exception);
+ virtual std::string getVTKFileExtension() const;
+ std::string getVTKFileNameOf(const std::string& fileName) const;
// tools
virtual MEDCouplingFieldDouble *getMeasureField(bool isAbs) const throw(INTERP_KERNEL::Exception);
virtual MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const throw(INTERP_KERNEL::Exception);
void copyAllTinyAttrFrom(const MEDCouplingFieldDouble *other) throw(INTERP_KERNEL::Exception);
std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
std::string advancedRepr() const throw(INTERP_KERNEL::Exception);
- void writeVTK(const std::string& fileName, bool isBinary=true) const throw(INTERP_KERNEL::Exception);
+ std::string writeVTK(const std::string& fileName, bool isBinary=true) const throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble *clone(bool recDeepCpy) const;
MEDCouplingFieldDouble *cloneWithMesh(bool recDeepCpy) const;
MEDCouplingFieldDouble *deepCpy() const;
return MEDCouplingFieldDouble::MergeFields(tmp);
}
- static void WriteVTK(const char *fileName, PyObject *li, bool isBinary=true) throw(INTERP_KERNEL::Exception)
+ static std::string WriteVTK(const char *fileName, PyObject *li, bool isBinary=true) throw(INTERP_KERNEL::Exception)
{
std::vector<const MEDCouplingFieldDouble *> tmp;
convertFromPyObjVectorOfObj<const ParaMEDMEM::MEDCouplingFieldDouble *>(li,SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble,"MEDCouplingFieldDouble",tmp);
- MEDCouplingFieldDouble::WriteVTK(fileName,tmp,isBinary);
+ return MEDCouplingFieldDouble::WriteVTK(fileName,tmp,isBinary);
}
}
};