From: Anthony GEAY Date: Thu, 24 Sep 2020 19:44:40 +0000 (+0200) Subject: WIP X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0648a208d48828ea1845401d02830732481496b8;p=tools%2Fmedcoupling.git WIP --- diff --git a/src/MEDLoader/MEDFileField.hxx b/src/MEDLoader/MEDFileField.hxx index 2bc60251a..01a274580 100644 --- a/src/MEDLoader/MEDFileField.hxx +++ b/src/MEDLoader/MEDFileField.hxx @@ -18,8 +18,7 @@ // // Author : Anthony Geay (EDF R&D) -#ifndef __MEDFILEFIELD_HXX__ -#define __MEDFILEFIELD_HXX__ +#pragma once #include "MEDLoaderDefines.hxx" @@ -36,7 +35,7 @@ #include "MEDLoaderTraits.hxx" #include "MEDCouplingTraits.hxx" #include "MEDCouplingRefCountObject.hxx" -#include "MEDCouplingFieldInt.hxx" +#include "MEDCouplingFieldInt32.hxx" #include "MEDCouplingMemArray.hxx" #include "MEDCouplingPartDefinition.hxx" @@ -154,5 +153,3 @@ namespace MEDCoupling int _nb_iter; }; } - -#endif diff --git a/src/MEDLoader/MEDFileField.txx b/src/MEDLoader/MEDFileField.txx index 0a10c74fe..020e7fa5c 100644 --- a/src/MEDLoader/MEDFileField.txx +++ b/src/MEDLoader/MEDFileField.txx @@ -18,12 +18,11 @@ // // Author : Anthony Geay (EDF R&D) -#ifndef __MEDFILEFIELD_TXX__ -#define __MEDFILEFIELD_TXX__ +#pragma once #include "MEDFileField.hxx" #include "MEDCouplingTraits.hxx" -#include "MEDCouplingFieldInt.hxx" +#include "MEDCouplingFieldInt32.hxx" #include "MEDCouplingFieldFloat.hxx" #include "MEDCouplingFieldDouble.hxx" #include "MEDCouplingFieldTemplate.hxx" @@ -1397,5 +1396,3 @@ namespace MEDCoupling return ret.retn(); } } - -#endif diff --git a/src/MEDLoader/MEDLoader.cxx b/src/MEDLoader/MEDLoader.cxx index 4899e483c..982f39bf0 100644 --- a/src/MEDLoader/MEDLoader.cxx +++ b/src/MEDLoader/MEDLoader.cxx @@ -30,7 +30,7 @@ #include "MEDCouplingMemArray.hxx" #include "MEDCouplingFieldDouble.hxx" #include "MEDCouplingFieldFloat.hxx" -#include "MEDCouplingFieldInt.hxx" +#include "MEDCouplingFieldInt32.hxx" #include "MEDCouplingGaussLocalization.hxx" #include "MEDCouplingTraits.hxx" #include "MCAuto.hxx" @@ -1266,8 +1266,8 @@ MCAuto MEDCoupling::ReadField(const std::string& MCAuto f1(MEDCoupling::DynamicCast(f)); if(f1.isNotNull()) { - MCAuto ret(f1->field(mesh)); - return MEDCoupling::DynamicCast(ret); + MCAuto ret(f1->field(mesh)); + return MEDCoupling::DynamicCast(ret); } } { @@ -1393,7 +1393,7 @@ namespace MEDCoupling MCAuto f1(MEDCoupling::DynamicCast(f)); if(f1.isNotNull()) { - MCAuto ret(ReadFieldCellLikeT(f1,type,fileName,meshName,meshDimRelToMax,fieldName,iteration,order)); + MCAuto ret(ReadFieldCellLikeT(f1,type,fileName,meshName,meshDimRelToMax,fieldName,iteration,order)); return ret.retn(); } } @@ -1470,7 +1470,7 @@ MEDCoupling::MEDCouplingField *MEDCoupling::ReadFieldNode(const std::string& fil MCAuto f1(MEDCoupling::DynamicCast(f)); if(f1.isNotNull()) { - MCAuto ret(ReadFieldNodeT(f1,fileName,meshName,meshDimRelToMax,fieldName,iteration,order)); + MCAuto ret(ReadFieldNodeT(f1,fileName,meshName,meshDimRelToMax,fieldName,iteration,order)); return ret.retn(); } } @@ -1744,7 +1744,7 @@ void MEDCoupling::WriteField(const std::string& fileName, const MEDCoupling::MED } } { - const MEDCoupling::MEDCouplingFieldInt *f1(dynamic_cast(f)); + const MEDCoupling::MEDCouplingFieldInt32 *f1(dynamic_cast(f)); if(f1) { WriteFieldT(fileName,f1,writeFromScratch); @@ -1805,7 +1805,7 @@ void MEDCoupling::WriteFieldUsingAlreadyWrittenMesh(const std::string& fileName, return ; } { - const MEDCoupling::MEDCouplingFieldInt *f1(dynamic_cast(f)); + const MEDCoupling::MEDCouplingFieldInt32 *f1(dynamic_cast(f)); if(f1) WriteFieldUsingAlreadyWrittenMeshT(fileName,f1); return ; diff --git a/src/MEDLoader/Swig/MEDLoaderCommon.i b/src/MEDLoader/Swig/MEDLoaderCommon.i index 062e28200..89705d67c 100644 --- a/src/MEDLoader/Swig/MEDLoaderCommon.i +++ b/src/MEDLoader/Swig/MEDLoaderCommon.i @@ -2387,16 +2387,16 @@ namespace MEDCoupling static MEDFileIntField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true); MEDCoupling::MEDFileField1TS *convertToDouble(bool isDeepCpyGlobs=true) const; // - void setFieldNoProfileSBT(const MEDCouplingFieldInt *field); - void setFieldProfile(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile); - void setFieldProfileFlatly(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile); - void copyTimeInfoFrom(MEDCouplingFieldInt *mcf); - MEDCouplingFieldInt *field(const MEDFileMesh *mesh) const; - MEDCouplingFieldInt *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const; - MEDCouplingFieldInt *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const; - MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const; - MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const; - MEDCouplingFieldInt *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const; + void setFieldNoProfileSBT(const MEDCouplingFieldInt32 *field); + void setFieldProfile(const MEDCouplingFieldInt32 *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile); + void setFieldProfileFlatly(const MEDCouplingFieldInt32 *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile); + void copyTimeInfoFrom(MEDCouplingFieldInt32 *mcf); + MEDCouplingFieldInt32 *field(const MEDFileMesh *mesh) const; + MEDCouplingFieldInt32 *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const; + MEDCouplingFieldInt32 *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const; + MEDCouplingFieldInt32 *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const; + MEDCouplingFieldInt32 *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const; + MEDCouplingFieldInt32 *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const; %extend { MEDFileIntField1TS() @@ -3076,15 +3076,15 @@ namespace MEDCoupling static MEDFileIntFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true); static MEDFileIntFieldMultiTS *New(DataArrayByte *db); // - void appendFieldNoProfileSBT(const MEDCouplingFieldInt *field); - void appendFieldProfile(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile); + void appendFieldNoProfileSBT(const MEDCouplingFieldInt32 *field); + void appendFieldProfile(const MEDCouplingFieldInt32 *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile); MEDCoupling::MEDFileFieldMultiTS *convertToDouble(bool isDeepCpyGlobs=true) const; - MEDCouplingFieldInt *field(int iteration, int order, const MEDFileMesh *mesh) const; - MEDCouplingFieldInt *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const; - MEDCouplingFieldInt *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const; - MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const; - MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const; - MEDCouplingFieldInt *getFieldAtLevelOld(TypeOfField type, int iteration, int order, const std::string& mname, int meshDimRelToMax, int renumPol=0) const; + MEDCouplingFieldInt32 *field(int iteration, int order, const MEDFileMesh *mesh) const; + MEDCouplingFieldInt32 *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const; + MEDCouplingFieldInt32 *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const; + MEDCouplingFieldInt32 *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const; + MEDCouplingFieldInt32 *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const; + MEDCouplingFieldInt32 *getFieldAtLevelOld(TypeOfField type, int iteration, int order, const std::string& mname, int meshDimRelToMax, int renumPol=0) const; %extend { MEDFileIntFieldMultiTS()