return true;
}
-/*!
- * Permutes values of \a this field according to a given permutation array for cells
- * renumbering. The underlying mesh is deeply copied and its cells are also permuted.
- * The number of cells remains the same; for that the permutation array \a old2NewBg
- * should not contain equal ids.
- * ** Warning, this method modifies the mesh aggreagated by \a this (by performing a deep copy ) **.
- *
- * \param [in] old2NewBg - the permutation array in "Old to New" mode. Its length is
- * to be equal to \a this->getMesh()->getNumberOfCells().
- * \param [in] check - if \c true, \a old2NewBg is transformed to a new permutation
- * array, so that its maximal cell id to correspond to (be less than) the number
- * of cells in mesh. This new array is then used for the renumbering. If \a
- * check == \c false, \a old2NewBg is used as is, that is less secure as validity
- * of ids in \a old2NewBg is not checked.
- * \throw If the mesh is not set.
- * \throw If the spatial discretization of \a this field is NULL.
- * \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".<br>
- * \ref py_mcfielddouble_renumberCells "Here is a Python example".
- * \endif
- */
-void MEDCouplingFieldDouble::renumberCells(const int *old2NewBg, bool check)
-{
- renumberCellsWithoutMesh(old2NewBg,check);
- MCAuto<MEDCouplingMesh> m=_mesh->deepCopy();
- m->renumberCells(old2NewBg,check);
- setMesh(m);
- updateTime();
-}
-
-/*!
- * Permutes values of \a this field according to a given permutation array for cells
- * renumbering. The underlying mesh is \b not permuted.
- * The number of cells remains the same; for that the permutation array \a old2NewBg
- * should not contain equal ids.
- * This method performs a part of job of renumberCells(). The reasonable use of this
- * method is only for multi-field instances lying on the same mesh to avoid a
- * systematic duplication and renumbering of _mesh attribute.
- * \warning Use this method with a lot of care!
- * \param [in] old2NewBg - the permutation array in "Old to New" mode. Its length is
- * to be equal to \a this->getMesh()->getNumberOfCells().
- * \param [in] check - if \c true, \a old2NewBg is transformed to a new permutation
- * array, so that its maximal cell id to correspond to (be less than) the number
- * of cells in mesh. This new array is then used for the renumbering. If \a
- * check == \c false, \a old2NewBg is used as is, that is less secure as validity
- * of ids in \a old2NewBg is not checked.
- * \throw If the mesh is not set.
- * \throw If the spatial discretization of \a this field is NULL.
- * \throw If \a check == \c true and \a old2NewBg contains equal ids.
- * \throw If mesh nature does not allow renumbering (e.g. structured mesh).
- */
-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(_type.isNull())
- throw INTERP_KERNEL::Exception("Expecting a spatial discretization to be able to operate a renumbering !");
- //
- _type->renumberCells(old2NewBg,check);
- std::vector<DataArrayDouble *> arrays;
- timeDiscr()->getArrays(arrays);
- std::vector<DataArray *> arrays2(arrays.size()); std::copy(arrays.begin(),arrays.end(),arrays2.begin());
- _type->renumberArraysForCell(_mesh,arrays2,old2NewBg,check);
- //
- updateTime();
-}
-
/*!
* Permutes values of \a this field according to a given permutation array for node
* renumbering. The underlying mesh is deeply copied and its nodes are also permuted.
MEDCOUPLING_EXPORT std::string writeVTK(const std::string& fileName, bool isBinary=true) const;
MEDCOUPLING_EXPORT bool areCompatibleForMerge(const MEDCouplingField *other) const;
MEDCOUPLING_EXPORT bool areCompatibleForMeld(const MEDCouplingFieldDouble *other) const;
- MEDCOUPLING_EXPORT void renumberCells(const int *old2NewBg, bool check=true);
- MEDCOUPLING_EXPORT void renumberCellsWithoutMesh(const int *old2NewBg, bool check=true);
MEDCOUPLING_EXPORT void renumberNodes(const int *old2NewBg, double eps=1e-15);
MEDCOUPLING_EXPORT void renumberNodesWithoutMesh(const int *old2NewBg, int newNbOfNodes, double eps=1e-15);
MEDCOUPLING_EXPORT DataArrayInt *findIdsInRange(double vmin, double vmax) const;
MEDCOUPLING_EXPORT bool areCompatibleForDiv(const MEDCouplingField *other) const;
MEDCOUPLING_EXPORT void copyTinyAttrFrom(const MEDCouplingFieldT<T> *other);
MEDCOUPLING_EXPORT void copyAllTinyAttrFrom(const MEDCouplingFieldT<T> *other);
+ MEDCOUPLING_EXPORT void renumberCells(const int *old2NewBg, bool check=true);
+ MEDCOUPLING_EXPORT void renumberCellsWithoutMesh(const int *old2NewBg, bool check=true);
//
MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
copyTinyAttrFrom(other);
}
+ /*!
+ * Permutes values of \a this field according to a given permutation array for cells
+ * renumbering. The underlying mesh is deeply copied and its cells are also permuted.
+ * The number of cells remains the same; for that the permutation array \a old2NewBg
+ * should not contain equal ids.
+ * ** Warning, this method modifies the mesh aggreagated by \a this (by performing a deep copy ) **.
+ *
+ * \param [in] old2NewBg - the permutation array in "Old to New" mode. Its length is
+ * to be equal to \a this->getMesh()->getNumberOfCells().
+ * \param [in] check - if \c true, \a old2NewBg is transformed to a new permutation
+ * array, so that its maximal cell id to correspond to (be less than) the number
+ * of cells in mesh. This new array is then used for the renumbering. If \a
+ * check == \c false, \a old2NewBg is used as is, that is less secure as validity
+ * of ids in \a old2NewBg is not checked.
+ * \throw If the mesh is not set.
+ * \throw If the spatial discretization of \a this field is NULL.
+ * \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".<br>
+ * \ref py_mcfielddouble_renumberCells "Here is a Python example".
+ * \endif
+ */
+ template<class T>
+ void MEDCouplingFieldT<T>::renumberCells(const int *old2NewBg, bool check)
+ {
+ renumberCellsWithoutMesh(old2NewBg,check);
+ MCAuto<MEDCouplingMesh> m(_mesh->deepCopy());
+ m->renumberCells(old2NewBg,check);
+ setMesh(m);
+ updateTime();
+ }
+
+ /*!
+ * Permutes values of \a this field according to a given permutation array for cells
+ * renumbering. The underlying mesh is \b not permuted.
+ * The number of cells remains the same; for that the permutation array \a old2NewBg
+ * should not contain equal ids.
+ * This method performs a part of job of renumberCells(). The reasonable use of this
+ * method is only for multi-field instances lying on the same mesh to avoid a
+ * systematic duplication and renumbering of _mesh attribute.
+ * \warning Use this method with a lot of care!
+ * \param [in] old2NewBg - the permutation array in "Old to New" mode. Its length is
+ * to be equal to \a this->getMesh()->getNumberOfCells().
+ * \param [in] check - if \c true, \a old2NewBg is transformed to a new permutation
+ * array, so that its maximal cell id to correspond to (be less than) the number
+ * of cells in mesh. This new array is then used for the renumbering. If \a
+ * check == \c false, \a old2NewBg is used as is, that is less secure as validity
+ * of ids in \a old2NewBg is not checked.
+ * \throw If the mesh is not set.
+ * \throw If the spatial discretization of \a this field is NULL.
+ * \throw If \a check == \c true and \a old2NewBg contains equal ids.
+ * \throw If mesh nature does not allow renumbering (e.g. structured mesh).
+ */
+ template<class T>
+ void MEDCouplingFieldT<T>::renumberCellsWithoutMesh(const int *old2NewBg, bool check)
+ {
+ if(!_mesh)
+ throw INTERP_KERNEL::Exception("Expecting a defined mesh to be able to operate a renumbering !");
+ if(_type.isNull())
+ throw INTERP_KERNEL::Exception("Expecting a spatial discretization to be able to operate a renumbering !");
+ //
+ _type->renumberCells(old2NewBg,check);
+ std::vector< typename MEDCoupling::Traits<T>::ArrayType *> arrays;
+ timeDiscrSafe()->getArrays(arrays);
+ std::vector<DataArray *> arrays2(arrays.size()); std::copy(arrays.begin(),arrays.end(),arrays2.begin());
+ _type->renumberArraysForCell(_mesh,arrays2,old2NewBg,check);
+ //
+ updateTime();
+ }
+
/*!
* This method is more strict than MEDCouplingField::areCompatibleForMerge method.
* This method is used for operation on fields to operate a first check before attempting operation.
#include "MEDCouplingFieldFloat.hxx"
#include "MEDCouplingFieldInt.hxx"
#include "MEDCouplingGaussLocalization.hxx"
+#include "MEDCouplingTraits.hxx"
#include "MCAuto.hxx"
#include "InterpKernelAutoPtr.hxx"
void MEDCoupling::WriteUMeshes(const std::string& fileName, const std::vector<const MEDCoupling::MEDCouplingUMesh *>& meshes, bool writeFromScratch)
{
- int mod=writeFromScratch?2:0;
+ int mod(writeFromScratch?2:0);
MCAuto<MEDFileUMesh> m(MEDFileUMesh::New());
AssignStaticWritePropertiesTo(*m);
m->setMeshes(meshes,true);
m->write(fileName,mod);
}
-void MEDLoaderNS::writeFieldWithoutReadingAndMappingOfMeshInFile(const std::string& fileName, const MEDCoupling::MEDCouplingFieldDouble *f, bool writeFromScratch)
+template<class T>
+void MEDLoaderNS::writeFieldWithoutReadingAndMappingOfMeshInFile(const std::string& fileName, const typename MEDCoupling::Traits<T>::FieldType *f, bool writeFromScratch)
{
- MCAuto<MEDFileField1TS> ff(MEDFileField1TS::New());
+ MCAuto< typename MLFieldTraits<T>::F1TSType > ff(MLFieldTraits<T>::F1TSType::New());
AssignStaticWritePropertiesTo(*ff);
- MCAuto<MEDCouplingFieldDouble> f2(f->deepCopy());
+ MCAuto<typename MEDCoupling::Traits<T>::FieldType> f2(f->deepCopy());
const MEDCouplingMesh *m(f2->getMesh());
const MEDCouplingUMesh *um(dynamic_cast<const MEDCouplingUMesh *>(m));
const MEDCoupling1GTUMesh *um2(dynamic_cast<const MEDCoupling1GTUMesh *>(m));
const MEDCouplingCMesh *um3(dynamic_cast<const MEDCouplingCMesh *>(m));
const MEDCouplingCurveLinearMesh *um4(dynamic_cast<const MEDCouplingCurveLinearMesh *>(m));
MCAuto<MEDFileMesh> mm;
- int mod=writeFromScratch?2:0;
+ int mod(writeFromScratch?2:0);
if(um)
{
MCAuto<MEDFileUMesh> mmu(MEDFileUMesh::New());
ff->write(fileName,0);
}
-void MEDCoupling::WriteField(const std::string& fileName, const MEDCoupling::MEDCouplingFieldDouble *f, bool writeFromScratch)
+template<class T>
+void WriteFieldT(const std::string& fileName, const typename MEDCoupling::Traits<T>::FieldType *f, bool writeFromScratch)
{
if(!f)
throw INTERP_KERNEL::Exception("WriteField : input field is NULL !");
f->checkConsistencyLight();
- int status=MEDLoaderBase::getStatusOfFile(fileName);
+ int status(MEDLoaderBase::getStatusOfFile(fileName));
if(status!=MEDLoaderBase::EXIST_RW && status!=MEDLoaderBase::NOT_EXIST)
{
std::ostringstream oss; oss << "File with name \'" << fileName << "\' has not valid permissions !";
}
if(writeFromScratch || (!writeFromScratch && status==MEDLoaderBase::NOT_EXIST))
{
- MEDLoaderNS::writeFieldWithoutReadingAndMappingOfMeshInFile(fileName,f,true);
+ MEDLoaderNS::writeFieldWithoutReadingAndMappingOfMeshInFile<T>(fileName,f,true);
}
else
{
- std::vector<std::string> meshNames=GetMeshNames(fileName);
+ std::vector<std::string> meshNames(GetMeshNames(fileName));
if(!f->getMesh())
throw INTERP_KERNEL::Exception("WriteField : trying to write a field with no mesh !");
std::string fileNameCpp(f->getMesh()->getName());
if(std::find(meshNames.begin(),meshNames.end(),fileNameCpp)==meshNames.end())
- MEDLoaderNS::writeFieldWithoutReadingAndMappingOfMeshInFile(fileName,f,false);
+ MEDLoaderNS::writeFieldWithoutReadingAndMappingOfMeshInFile<T>(fileName,f,false);
else
{
MCAuto<MEDFileMesh> mm(MEDFileMesh::New(fileName,f->getMesh()->getName().c_str()));
AssignStaticWritePropertiesTo(*mm);
const MEDFileMesh *mmPtr(mm);
- const MEDFileUMesh *mmuPtr=dynamic_cast<const MEDFileUMesh *>(mmPtr);
+ const MEDFileUMesh *mmuPtr(dynamic_cast<const MEDFileUMesh *>(mmPtr));
if(!mmuPtr)
throw INTERP_KERNEL::Exception("WriteField : only umeshes are supported now !");
- MCAuto<MEDCouplingFieldDouble> f2(f->deepCopy());
- MEDCouplingUMesh *m=dynamic_cast<MEDCouplingUMesh *>(const_cast<MEDCouplingMesh *>(f2->getMesh()));
+ MCAuto< typename MEDCoupling::Traits<T>::FieldType > f2(f->deepCopy());
+ MEDCouplingUMesh *m(dynamic_cast<MEDCouplingUMesh *>(const_cast<MEDCouplingMesh *>(f2->getMesh())));
if(!m)
throw INTERP_KERNEL::Exception("WriteField : only umesh in input field supported !");
- MCAuto<DataArrayInt> o2n=m->getRenumArrForMEDFileFrmt();
+ MCAuto<DataArrayInt> o2n(m->getRenumArrForMEDFileFrmt());
f2->renumberCells(o2n->begin(),false);
m=static_cast<MEDCouplingUMesh *>(const_cast<MEDCouplingMesh *>(f2->getMesh()));
- MCAuto<MEDCouplingUMesh> mread=mmuPtr->getMeshAtLevel(m->getMeshDimension()-mm->getMeshDimension());
+ MCAuto<MEDCouplingUMesh> mread(mmuPtr->getMeshAtLevel(m->getMeshDimension()-mm->getMeshDimension()));
if(f2->getTypeOfField()!=ON_NODES)
{
m->tryToShareSameCoordsPermute(*mread,_EPS_FOR_NODE_COMP);
- DataArrayInt *part=0;
- bool b=mread->areCellsIncludedIn(m,_COMP_FOR_CELL,part);
+ DataArrayInt *part(NULL);
+ bool b(mread->areCellsIncludedIn(m,_COMP_FOR_CELL,part));
MCAuto<DataArrayInt> partSafe(part);
if(!b)
{
std::ostringstream oss; oss << "WriteField : The file \""<< fileName << "\" already contains a mesh named \""<< f->getMesh()->getName() << "\" and this mesh in the file is not compatible (a subpart) with the mesh you intend to write ! This is maybe due to a too strict policy ! Try with to lease it by calling SetCompPolicyForCell !";
throw INTERP_KERNEL::Exception(oss.str().c_str());
}
- MCAuto<MEDFileField1TS> f1ts(MEDFileField1TS::New());
+ MCAuto< typename MLFieldTraits<T>::F1TSType > f1ts(MLFieldTraits<T>::F1TSType::New());
AssignStaticWritePropertiesTo(*f1ts);
if(part->isIota(mread->getNumberOfCells()))
f1ts->setFieldNoProfileSBT(f2);
}
else
{
- DataArrayInt *part=0;
- bool b=mread->getCoords()->areIncludedInMe(m->getCoords(),_EPS_FOR_NODE_COMP,part);
+ DataArrayInt *part(NULL);
+ bool b(mread->getCoords()->areIncludedInMe(m->getCoords(),_EPS_FOR_NODE_COMP,part));
MCAuto<DataArrayInt> partSafe(part);
if(!b)
{
std::ostringstream oss; oss << "WriteField : The file \""<< fileName << "\" already contains a mesh named \""<< f->getMesh()->getName() << "\" and this mesh in the file is not compatible (a subpart regarding nodes) with the mesh you intend to write ! This is maybe due to a too strict epsilon ! Try with to lease it by calling SetEpsilonForNodeComp !";
throw INTERP_KERNEL::Exception(oss.str().c_str());
}
- MCAuto<MEDFileField1TS> f1ts(MEDFileField1TS::New());
+ MCAuto< typename MLFieldTraits<T>::F1TSType > f1ts(MLFieldTraits<T>::F1TSType::New());
AssignStaticWritePropertiesTo(*f1ts);
if(part->isIota(mread->getNumberOfNodes()))
f1ts->setFieldNoProfileSBT(f2);
}
}
-void MEDCoupling::WriteFieldDep(const std::string& fileName, const MEDCoupling::MEDCouplingFieldDouble *f, bool writeFromScratch)
+void MEDCoupling::WriteField(const std::string& fileName, const MEDCoupling::MEDCouplingField *f, bool writeFromScratch)
+{
+ if(!f)
+ throw INTERP_KERNEL::Exception("WriteField : input field is null !");
+ {
+ const MEDCoupling::MEDCouplingFieldDouble *f1(dynamic_cast<const MEDCoupling::MEDCouplingFieldDouble *>(f));
+ if(f1)
+ WriteFieldT<double>(fileName,f1,writeFromScratch);
+ return ;
+ }
+ {
+ const MEDCoupling::MEDCouplingFieldInt *f1(dynamic_cast<const MEDCoupling::MEDCouplingFieldInt *>(f));
+ if(f1)
+ WriteFieldT<int>(fileName,f1,writeFromScratch);
+ return ;
+ }
+ {
+ const MEDCoupling::MEDCouplingFieldFloat *f1(dynamic_cast<const MEDCoupling::MEDCouplingFieldFloat *>(f));
+ if(f1)
+ WriteFieldT<float>(fileName,f1,writeFromScratch);
+ return ;
+ }
+ throw INTERP_KERNEL::Exception("WriteField : input field is not in FLOAT32, FLOAT64, INT32 !");
+}
+
+void MEDCoupling::WriteFieldDep(const std::string& fileName, const MEDCoupling::MEDCouplingField *f, bool writeFromScratch)
{
WriteField(fileName,f,writeFromScratch);
}
-void MEDCoupling::WriteFieldUsingAlreadyWrittenMesh(const std::string& fileName, const MEDCoupling::MEDCouplingFieldDouble *f)
+template<class T>
+void WriteFieldUsingAlreadyWrittenMeshT(const std::string& fileName, const typename MEDCoupling::Traits<T>::FieldType *f)
{
if(!f)
- throw INTERP_KERNEL::Exception("WriteFieldUsingAlreadyWrittenMesh : input field is null !");
+ throw INTERP_KERNEL::Exception("WriteFieldUsingAlreadyWrittenMeshT : input field is null !");
f->checkConsistencyLight();
- int status=MEDLoaderBase::getStatusOfFile(fileName);
+ int status(MEDLoaderBase::getStatusOfFile(fileName));
if(status!=MEDLoaderBase::EXIST_RW)
{
std::ostringstream oss; oss << "File with name \'" << fileName << "\' has not valid permissions or not exists !";
throw INTERP_KERNEL::Exception(oss.str().c_str());
}
- MCAuto<MEDFileField1TS> f1ts(MEDFileField1TS::New());
+ MCAuto< typename MLFieldTraits<T>::F1TSType > f1ts(MLFieldTraits<T>::F1TSType::New());
AssignStaticWritePropertiesTo(*f1ts);
MEDCouplingUMesh *m(dynamic_cast<MEDCouplingUMesh *>(const_cast<MEDCouplingMesh *>(f->getMesh())));
if(m)
{
MCAuto<DataArrayInt> o2n(m->getRenumArrForMEDFileFrmt());
- MCAuto<MEDCouplingFieldDouble> f2(f->deepCopy());
+ MCAuto< typename MEDCoupling::Traits<T>::FieldType > f2(f->deepCopy());
f2->renumberCells(o2n->begin(),false);
f1ts->setFieldNoProfileSBT(f2);
}
f1ts->setFieldNoProfileSBT(f);
f1ts->write(fileName,0);
}
+
+void MEDCoupling::WriteFieldUsingAlreadyWrittenMesh(const std::string& fileName, const MEDCoupling::MEDCouplingField *f)
+{
+ if(!f)
+ throw INTERP_KERNEL::Exception("WriteFieldUsingAlreadyWrittenMesh : input field is null !");
+ {
+ const MEDCoupling::MEDCouplingFieldDouble *f1(dynamic_cast<const MEDCoupling::MEDCouplingFieldDouble *>(f));
+ if(f1)
+ WriteFieldUsingAlreadyWrittenMeshT<double>(fileName,f1);
+ return ;
+ }
+ {
+ const MEDCoupling::MEDCouplingFieldInt *f1(dynamic_cast<const MEDCoupling::MEDCouplingFieldInt *>(f));
+ if(f1)
+ WriteFieldUsingAlreadyWrittenMeshT<int>(fileName,f1);
+ return ;
+ }
+ {
+ const MEDCoupling::MEDCouplingFieldFloat *f1(dynamic_cast<const MEDCoupling::MEDCouplingFieldFloat *>(f));
+ if(f1)
+ WriteFieldUsingAlreadyWrittenMeshT<float>(fileName,f1);
+ return ;
+ }
+ throw INTERP_KERNEL::Exception("WriteFieldUsingAlreadyWrittenMesh : input field is not in FLOAT32, FLOAT64, INT32 !");
+}
MEDLOADER_EXPORT void WriteUMeshesPartition(const std::string& fileName, const std::string& meshName, const std::vector<const MEDCoupling::MEDCouplingUMesh *>& meshes, bool writeFromScratch);
MEDLOADER_EXPORT void WriteUMeshesPartitionDep(const std::string& fileName, const std::string& meshName, const std::vector<const MEDCoupling::MEDCouplingUMesh *>& meshes, bool writeFromScratch);
MEDLOADER_EXPORT void WriteUMeshes(const std::string& fileName, const std::vector<const MEDCoupling::MEDCouplingUMesh *>& meshes, bool writeFromScratch);
- MEDLOADER_EXPORT void WriteField(const std::string& fileName, const MEDCoupling::MEDCouplingFieldDouble *f, bool writeFromScratch);
- MEDLOADER_EXPORT void WriteFieldDep(const std::string& fileName, const MEDCoupling::MEDCouplingFieldDouble *f, bool writeFromScratch);
- MEDLOADER_EXPORT void WriteFieldUsingAlreadyWrittenMesh(const std::string& fileName, const MEDCoupling::MEDCouplingFieldDouble *f);
+ MEDLOADER_EXPORT void WriteField(const std::string& fileName, const MEDCoupling::MEDCouplingField *f, bool writeFromScratch);
+ MEDLOADER_EXPORT void WriteFieldDep(const std::string& fileName, const MEDCoupling::MEDCouplingField *f, bool writeFromScratch);
+ MEDLOADER_EXPORT void WriteFieldUsingAlreadyWrittenMesh(const std::string& fileName, const MEDCoupling::MEDCouplingField *f);
MEDLOADER_EXPORT void AssignStaticWritePropertiesTo(MEDCoupling::MEDFileWritable& obj);
}
{
int readUMeshDimFromFile(const std::string& fileName, const std::string& meshName, std::vector<int>& possibilities);
void dispatchElems(int nbOfElemCell, int nbOfElemFace, int& nbOfElem, med_entity_type& whichEntity);
- void writeFieldWithoutReadingAndMappingOfMeshInFile(const std::string& fileName, const MEDCoupling::MEDCouplingFieldDouble *f, bool writeFromScratch);
+ template<class T>
+ void writeFieldWithoutReadingAndMappingOfMeshInFile(const std::string& fileName, const typename MEDCoupling::Traits<T>::FieldType *f, bool writeFromScratch);
med_int getIdFromMeshName(med_idt fid, const std::string& meshName, std::string& trueMeshName);
std::vector<std::string> getMeshNamesFid(med_idt fid);
}
void WriteMesh(const std::string& fileName, const MEDCoupling::MEDCouplingMesh *mesh, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
void WriteUMesh(const std::string& fileName, const MEDCoupling::MEDCouplingUMesh *mesh, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
void WriteUMeshDep(const std::string& fileName, const MEDCoupling::MEDCouplingUMesh *mesh, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
- void WriteField(const std::string& fileName, const MEDCoupling::MEDCouplingFieldDouble *f, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
- void WriteFieldDep(const std::string& fileName, const MEDCoupling::MEDCouplingFieldDouble *f, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
- void WriteFieldUsingAlreadyWrittenMesh(const std::string& fileName, const MEDCoupling::MEDCouplingFieldDouble *f) throw(INTERP_KERNEL::Exception);
+ void WriteField(const std::string& fileName, const MEDCoupling::MEDCouplingField *f, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
+ void WriteFieldDep(const std::string& fileName, const MEDCoupling::MEDCouplingField *f, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
+ void WriteFieldUsingAlreadyWrittenMesh(const std::string& fileName, const MEDCoupling::MEDCouplingField *f) throw(INTERP_KERNEL::Exception);
}
%rename (MEDFileVersion) MEDFileVersionSwig;