From: Anthony Geay Date: Wed, 24 Aug 2016 14:54:11 +0000 (+0200) Subject: Porting to new API of MEDFileIntField X-Git-Tag: V8_1_0rc1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f8c7a434ba8797c580c2fe4c532a4cbac580d309;p=modules%2Fparavis.git Porting to new API of MEDFileIntField --- diff --git a/src/Plugins/MEDWriter/IO/vtkMEDWriter.cxx b/src/Plugins/MEDWriter/IO/vtkMEDWriter.cxx index 8fd42052..d268f5e4 100644 --- a/src/Plugins/MEDWriter/IO/vtkMEDWriter.cxx +++ b/src/Plugins/MEDWriter/IO/vtkMEDWriter.cxx @@ -60,6 +60,7 @@ #include "MEDFileField.hxx" #include "MEDFileData.hxx" #include "MEDCouplingMemArray.hxx" +#include "MEDCouplingFieldInt.hxx" #include "MEDCouplingFieldDouble.hxx" #include "MEDCouplingRefCountObject.hxx" @@ -86,6 +87,7 @@ using MEDCoupling::MEDCouplingMesh; using MEDCoupling::MEDCouplingUMesh; using MEDCoupling::MEDCouplingCMesh; using MEDCoupling::MEDCouplingFieldDouble; +using MEDCoupling::MEDCouplingFieldInt; using MEDCoupling::MCAuto; vtkStandardNewMacro(vtkMEDWriter); @@ -343,17 +345,21 @@ void AppendMCFieldFrom(MEDCoupling::TypeOfField tf, MEDCouplingMesh *mesh, MEDFi fieldName=daiPtr->getName(); if((fieldName!=FAMFIELD_FOR_CELLS || tf!=MEDCoupling::ON_CELLS) && (fieldName!=FAMFIELD_FOR_NODES || tf!=MEDCoupling::ON_NODES)) { - MCAuto f(MEDCouplingFieldDouble::New(tf)); + MCAuto f(MEDCouplingFieldInt::New(tf)); f->setName(fieldName); f->setMesh(mesh); MCAuto fmts(MEDFileIntFieldMultiTS::New()); MCAuto f1ts(MEDFileIntField1TS::New()); if(!n2oPtr) - f1ts->setFieldNoProfileSBT(f,daiPtr); + { + f->setArray(dai); + f1ts->setFieldNoProfileSBT(f); + } else { MCAuto dai2(daiPtr->selectByTupleId(n2oPtr->begin(),n2oPtr->end())); - f1ts->setFieldNoProfileSBT(f,dai2); + f->setArray(dai2); + f1ts->setFieldNoProfileSBT(f); } fmts->pushBackTimeStep(f1ts); fs->pushField(fmts);