From ef5d82e080958ee1b1b8c7827c50b0fe604dab40 Mon Sep 17 00:00:00 2001 From: apo Date: Mon, 24 Jan 2005 12:58:07 +0000 Subject: [PATCH] [Bug PAL7784] REGR: wrong Export-Import Mesh in med --- src/MEDWrapper/Base/MED_Algorithm.cxx | 34 +- src/MEDWrapper/Base/MED_Common.hxx | 23 +- src/MEDWrapper/Base/MED_Structures.cxx | 58 +- src/MEDWrapper/Base/MED_Structures.hxx | 23 +- src/MEDWrapper/Base/MED_TStructures.hxx | 101 ++-- src/MEDWrapper/Base/MED_TWrapper.hxx | 328 ++++++----- src/MEDWrapper/Base/MED_Wrapper.cxx | 118 +++- src/MEDWrapper/Base/MED_Wrapper.hxx | 659 ++++++++++++++--------- src/MEDWrapper/Factory/MED_Factory.hxx | 2 - src/MEDWrapper/Factory/MED_Test.cxx | 28 +- src/MEDWrapper/V2_1/MED_V2_1_Wrapper.hxx | 17 +- src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx | 325 ++++++----- 12 files changed, 1042 insertions(+), 674 deletions(-) diff --git a/src/MEDWrapper/Base/MED_Algorithm.cxx b/src/MEDWrapper/Base/MED_Algorithm.cxx index 2c0e4dc2a..fb9e24fa3 100644 --- a/src/MEDWrapper/Base/MED_Algorithm.cxx +++ b/src/MEDWrapper/Base/MED_Algorithm.cxx @@ -83,18 +83,6 @@ namespace MED{ { PCellInfo aCellInfo = theWrapper.GetPCellInfo(theMeshInfo,anEntity,aGeo); aElemSet.insert(aCellInfo); - if(MYDEBUG){ - TInt aNbElem = aCellInfo->GetNbElem(); - INITMSG(MYDEBUG,"aGeo = "<GetConnDim(); - for(TInt iConn = 0; iConn < iConnEnd; iConn++){ - ADDMSG(MYVALUEDEBUG,aCellInfo->GetConn(iElem,iConn)<<","); - } - ADDMSG(MYVALUEDEBUG," "); - } - ADDMSG(MYDEBUG,"\n"); - } } } } @@ -110,24 +98,14 @@ namespace MED{ const PMeshInfo& theMeshInfo) { MSG(MYDEBUG,"GetFamilies(...)"); + TErr anErr; TFamilyGroup aGroup; TInt aNbFam = theWrapper.GetNbFamilies(*theMeshInfo); INITMSG(MYDEBUG,"GetNbFamilies() = "<GetName(); - TInt aNbAttr = aFamilyInfo->GetNbAttr(); - TInt aNbGroup = aFamilyInfo->GetNbGroup(); - INITMSG(MYDEBUG, - "aFamilyName = '"<GetGroupName(iGroup); - INITMSG(MYDEBUG,"aGroupName = '"<= 0) + aGroup.insert(aFamilyInfo); } ADDMSG(MYDEBUG,"\n"); return aGroup; @@ -147,6 +125,8 @@ namespace MED{ aGroup[aFamilyInfo->GetGroupName(iGroup)].insert(aFamilyInfo); } } + +#ifdef _DEBUG_ if(MYDEBUG){ TGroupInfo::const_iterator anIter = aGroup.begin(); for(; anIter != aGroup.end(); anIter++){ @@ -161,6 +141,8 @@ namespace MED{ } ADDMSG(MYDEBUG,"\n"); } +#endif + return aGroup; } diff --git a/src/MEDWrapper/Base/MED_Common.hxx b/src/MEDWrapper/Base/MED_Common.hxx index 9435a2dc8..5cac8fbd1 100644 --- a/src/MEDWrapper/Base/MED_Common.hxx +++ b/src/MEDWrapper/Base/MED_Common.hxx @@ -97,14 +97,21 @@ namespace MED{ const TEntity2GeomSet& GetEntity2GeomSet(); - inline TInt GetNbConn(EEntiteMaillage theEntity, - EGeometrieElement theElem, - TInt theMeshDim) - { - TInt anElemDim = theElem / 100, nsup = 0; - if(theEntity == eMAILLE && anElemDim < theMeshDim) nsup = 1; - return nsup + theElem % 100; - } + enum EVersion {eVUnknown = -1, eV2_1, eV2_2}; + + TInt GetNbConnectivities(EGeometrieElement typmai); + + template + TInt GetNbConn(EGeometrieElement typmai, + TInt mdim); + + template<> + TInt GetNbConn(EGeometrieElement typmai, + TInt mdim); + + template<> + TInt GetNbConn(EGeometrieElement typmai, + TInt mdim); struct TNameInfo; typedef MED::shared_ptr PNameInfo; diff --git a/src/MEDWrapper/Base/MED_Structures.cxx b/src/MEDWrapper/Base/MED_Structures.cxx index 7ba5c359c..3ec5eece4 100644 --- a/src/MEDWrapper/Base/MED_Structures.cxx +++ b/src/MEDWrapper/Base/MED_Structures.cxx @@ -22,6 +22,60 @@ using namespace MED; #define GETINDEX(anArray,ind) anArray.at(ind) #endif +namespace MED{ + + TInt GetNbConnectivities(EGeometrieElement typmai) + { + TInt taille = typmai%100; + return taille; + } + + template<> + TInt GetNbConn(EGeometrieElement typmai, + TInt mdim) + { + TInt edim = typmai / 100; + TInt nsup = 0; + + if (mdim == 2 || mdim == 3) + if (edim == 1) + nsup = 1; + + if (mdim == 3) + if (edim == 2) + nsup = 1; + + TInt taille = nsup+typmai%100; + return taille; + } + + template<> + TInt GetNbConn(EGeometrieElement typmai, + TInt mdim) + { + TInt taille = typmai%100; + return taille; + } + + std::string GetString(TInt theId, TInt theStep, + const TString& theString) + { + const char* aPos = &GETINDEX(theString,theId*theStep); + TInt aSize = std::min(TInt(strlen(aPos)),theStep); + return std::string(aPos,aSize); + } + + void SetString(TInt theId, TInt theStep, + TString& theString, + const std::string& theValue) + { + TInt aSize = std::min(TInt(theValue.size()+1),theStep); + char* aPos = &GETINDEX(theString,theId*theStep); + strncpy(aPos,theValue.c_str(),aSize); + } + +} + //--------------------------------------------------------------- TInt TFamilyInfo::GetAttrId(TInt theId) const { return GETINDEX(myAttrId,theId); @@ -63,11 +117,11 @@ void TNodeInfo::SetNodeCoord(TInt theId,TInt theComp,TFloat theVal) { //--------------------------------------------------------------- TInt TCellInfo::GetConn(TInt theElemId, TInt theConnId) const { - return GETINDEX(myConn,myConnDim*theElemId + theConnId); + return GETINDEX(myConn,GetConnDim()*theElemId + theConnId); } void TCellInfo::SetConn(TInt theElemId, TInt theConnId, TInt theVal){ - GETINDEX(myConn,myConnDim*theElemId + theConnId) = theVal; + GETINDEX(myConn,GetConnDim()*theElemId + theConnId) = theVal; } //--------------------------------------------------------------- TInt TPolygoneInfo::GetNbConn(TInt theElemId) const { diff --git a/src/MEDWrapper/Base/MED_Structures.hxx b/src/MEDWrapper/Base/MED_Structures.hxx index 5dad42751..888c3aeb1 100644 --- a/src/MEDWrapper/Base/MED_Structures.hxx +++ b/src/MEDWrapper/Base/MED_Structures.hxx @@ -36,22 +36,12 @@ namespace MED{ //--------------------------------------------------------------- typedef std::vector TString; - inline std::string GetString(TInt theId, TInt theStep, - const TString& theString) - { - const char* aPos = &theString[theId*theStep]; - TInt aSize = std::min(TInt(strlen(aPos)),theStep); - return std::string(aPos,aSize); - } - - inline void SetString(TInt theId, TInt theStep, - TString& theString, - const std::string& theValue) - { - TInt aSize = std::min(TInt(theValue.size()+1),theStep); - strncpy(&theString[theId*theStep],theValue.c_str(),aSize); - } + std::string GetString(TInt theId, TInt theStep, + const TString& theString); + void SetString(TInt theId, TInt theStep, + TString& theString, + const std::string& theValue); //--------------------------------------------------------------- struct TBase @@ -186,8 +176,7 @@ namespace MED{ EConnectivite myTConn; EConnectivite GetConn() const { return myTConn;} - TInt myConnDim; - TInt GetConnDim() const { return myConnDim;} + virtual TInt GetConnDim() const = 0; TElemNum myConn; TInt GetConn(TInt theElemId, TInt theConnId) const; diff --git a/src/MEDWrapper/Base/MED_TStructures.hxx b/src/MEDWrapper/Base/MED_TStructures.hxx index 674c5518a..15319fe7e 100644 --- a/src/MEDWrapper/Base/MED_TStructures.hxx +++ b/src/MEDWrapper/Base/MED_TStructures.hxx @@ -39,7 +39,7 @@ namespace MED{ const TInt LNOM = 80; //--------------------------------------------------------------- - template + template struct TTNameInfo: virtual TNameInfo { TTNameInfo(const std::string& theValue = "") @@ -59,10 +59,10 @@ namespace MED{ //--------------------------------------------------------------- - template - struct TTMeshInfo: TMeshInfo, TTNameInfo + template + struct TTMeshInfo: TMeshInfo, TTNameInfo { - typedef TTNameInfo TNameInfoBase; + typedef TTNameInfo TNameInfoBase; TTMeshInfo(const PMeshInfo& theInfo): TNameInfoBase(theInfo->GetName()) @@ -98,10 +98,10 @@ namespace MED{ //--------------------------------------------------------------- - template - struct TTFamilyInfo: TFamilyInfo, TTNameInfo + template + struct TTFamilyInfo: TFamilyInfo, TTNameInfo { - typedef TTNameInfo TNameInfoBase; + typedef TTNameInfo TNameInfoBase; TTFamilyInfo(const PMeshInfo& theMeshInfo, const PFamilyInfo& theInfo): TNameInfoBase(theInfo->GetName()) @@ -206,7 +206,7 @@ namespace MED{ //--------------------------------------------------------------- - template + template struct TTElemInfo: virtual TElemInfo { TTElemInfo(const PMeshInfo& theMeshInfo, const PElemInfo& theInfo) @@ -301,10 +301,10 @@ namespace MED{ //--------------------------------------------------------------- - template - struct TTNodeInfo: TNodeInfo, TTElemInfo + template + struct TTNodeInfo: TNodeInfo, TTElemInfo { - typedef TTElemInfo TElemInfoBase; + typedef TTElemInfo TElemInfoBase; TTNodeInfo(const PMeshInfo& theMeshInfo, const PNodeInfo& theInfo): TElemInfoBase(theMeshInfo,theInfo) @@ -399,10 +399,10 @@ namespace MED{ }; //--------------------------------------------------------------- - template - struct TTPolygoneInfo: TPolygoneInfo, TTElemInfo + template + struct TTPolygoneInfo: TPolygoneInfo, TTElemInfo { - typedef TTElemInfo TElemInfoBase; + typedef TTElemInfo TElemInfoBase; TTPolygoneInfo(const PMeshInfo& theMeshInfo, const PPolygoneInfo& theInfo): TElemInfoBase(theMeshInfo,theInfo) @@ -445,10 +445,10 @@ namespace MED{ const TIntVector& theFamilyNums, const TIntVector& theElemNums, const TStringVector& theElemNames = TStringVector()): - TTElemInfo(theMeshInfo, - theFamilyNums, - theElemNums, - theElemNames) + TElemInfoBase(theMeshInfo, + theFamilyNums, + theElemNums, + theElemNames) { myTEntity = theTEntity; myTGeom = theTGeom; @@ -459,10 +459,10 @@ namespace MED{ } }; //--------------------------------------------------------------- - template - struct TTPolyedreInfo: TPolyedreInfo, TTElemInfo + template + struct TTPolyedreInfo: TPolyedreInfo, TTElemInfo { - typedef TTElemInfo TElemInfoBase; + typedef TTElemInfo TElemInfoBase; TTPolyedreInfo(const PMeshInfo& theMeshInfo, const PPolyedreInfo& theInfo): TElemInfoBase(theMeshInfo,theInfo) @@ -511,10 +511,10 @@ namespace MED{ const TIntVector& theFamilyNums, const TIntVector& theElemNums, const TStringVector& theElemNames = TStringVector()): - TTElemInfo(theMeshInfo, - theFamilyNums, - theElemNums, - theElemNames) + TElemInfoBase(theMeshInfo, + theFamilyNums, + theElemNums, + theElemNames) { myTEntity = theTEntity; myTGeom = theTGeom; @@ -528,10 +528,10 @@ namespace MED{ }; //--------------------------------------------------------------- - template - struct TTCellInfo: TCellInfo, TTElemInfo + template + struct TTCellInfo: TCellInfo, TTElemInfo { - typedef TTElemInfo TElemInfoBase; + typedef TTElemInfo TElemInfoBase; TTCellInfo(const PMeshInfo& theMeshInfo, const PCellInfo& theInfo): TElemInfoBase(theMeshInfo,theInfo) @@ -539,11 +539,11 @@ namespace MED{ myTEntity = theInfo->GetEntity(); myTGeom = theInfo->GetGeom(); myTConn = theInfo->GetConn(); - myConnDim = theInfo->GetConnDim(); - myConn.resize(myNbElem*myConnDim); + TInt aConnDim = GetNbConnectivities(myTGeom); + myConn.resize(myNbElem*GetNbConn(myTGeom,myMeshInfo->myDim)); for(TInt anElemId = 0; anElemId < myNbElem; anElemId++){ - for(TInt anConnId = 0; anConnId < myConnDim; anConnId++){ + for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){ SetConn(anElemId,anConnId,theInfo->GetConn(anElemId,anConnId)); } } @@ -564,8 +564,7 @@ namespace MED{ myTEntity = theTEntity; myTGeom = theTGeom; myTConn = theTConn; - myConnDim = GetNbConn(myTEntity,myTGeom,theMeshInfo->myDim); - myConn.resize(theNbElem*myConnDim); + myConn.resize(theNbElem*GetNbConn(theTGeom,theMeshInfo->myDim)); } TTCellInfo(const PMeshInfo& theMeshInfo, @@ -576,28 +575,38 @@ namespace MED{ const TIntVector& theFamilyNums, const TIntVector& theElemNums, const TStringVector& theElemNames = TStringVector()): - TTElemInfo(theMeshInfo, - theFamilyNums, - theElemNums, - theElemNames) + TElemInfoBase(theMeshInfo, + theFamilyNums, + theElemNums, + theElemNames) { myTEntity = theTEntity; myTGeom = theTGeom; myTConn = theTConn; - myConnDim = GetNbConn(myTEntity,myTGeom,theMeshInfo->myDim); - myConn.resize(theConnectivities.size()); - for(TInt anId = 0, anEnd = myConn.size(); anId < anEnd; anId++){ - myConn[anId] = theConnectivities[anId]; + + TInt aConnDim = GetNbConnectivities(myTGeom); + myNbElem = theConnectivities.size() / aConnDim; + myConn.resize(myNbElem*GetNbConn(myTGeom,myMeshInfo->myDim)); + for(TInt anElemId = 0; anElemId < myNbElem; anElemId++){ + for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){ + SetConn(anElemId,anConnId,theConnectivities[anElemId*aConnDim+anConnId]); + } } + } + + virtual TInt GetConnDim() const { + return GetNbConn(myTGeom,myMeshInfo->myDim); + } + }; //--------------------------------------------------------------- - template - struct TTFieldInfo: TFieldInfo, TTNameInfo + template + struct TTFieldInfo: TFieldInfo, TTNameInfo { - typedef TTNameInfo TNameInfoBase; + typedef TTNameInfo TNameInfoBase; TTFieldInfo(const PMeshInfo& theMeshInfo, const PFieldInfo& theInfo): TNameInfoBase(theInfo->GetName()) @@ -660,7 +669,7 @@ namespace MED{ //--------------------------------------------------------------- - template + template struct TTTimeStampInfo: TTimeStampInfo { TTTimeStampInfo(const PFieldInfo& theFieldInfo, const PTimeStampInfo& theInfo) @@ -728,7 +737,7 @@ namespace MED{ //--------------------------------------------------------------- - template + template struct TTTimeStampVal: TTimeStampVal { TTTimeStampVal(const PTimeStampInfo& theTimeStampInfo, const PTimeStampVal& theInfo) diff --git a/src/MEDWrapper/Base/MED_TWrapper.hxx b/src/MEDWrapper/Base/MED_TWrapper.hxx index ecfb13874..e07ae30f8 100644 --- a/src/MEDWrapper/Base/MED_TWrapper.hxx +++ b/src/MEDWrapper/Base/MED_TWrapper.hxx @@ -34,36 +34,42 @@ namespace MED{ - template + template class TTWrapper: public TWrapper{ public: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual PMeshInfo CrMeshInfo(TInt theDim = 0, - const std::string& theValue = "", - EMaillage theType = eNON_STRUCTURE, - const std::string& theDesc = "") + virtual + PMeshInfo + CrMeshInfo(TInt theDim = 0, + const std::string& theValue = "", + EMaillage theType = eNON_STRUCTURE, + const std::string& theDesc = "") { - return PMeshInfo(new TTMeshInfo + return PMeshInfo(new TTMeshInfo (theDim, theValue, theType, theDesc)); } - virtual PMeshInfo CrMeshInfo(const PMeshInfo& theInfo) + virtual + PMeshInfo + CrMeshInfo(const PMeshInfo& theInfo) { - return PMeshInfo(new TTMeshInfo(theInfo)); + return PMeshInfo(new TTMeshInfo(theInfo)); } - + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual PFamilyInfo CrFamilyInfo(const PMeshInfo& theMeshInfo, - TInt theNbGroup = 0, - TInt theNbAttr = 0, - TInt theId = 0, - const std::string& theValue = "") + virtual + PFamilyInfo + CrFamilyInfo(const PMeshInfo& theMeshInfo, + TInt theNbGroup = 0, + TInt theNbAttr = 0, + TInt theId = 0, + const std::string& theValue = "") { - return PFamilyInfo(new TTFamilyInfo + return PFamilyInfo(new TTFamilyInfo (theMeshInfo, theNbGroup, theNbAttr, @@ -71,15 +77,17 @@ namespace MED{ theValue)); } - virtual PFamilyInfo CrFamilyInfo(const PMeshInfo& theMeshInfo, - const std::string& theValue, - TInt theId, - const MED::TStringSet& theGroupNames, - const MED::TStringVector& theAttrDescs = MED::TStringVector(), - const MED::TIntVector& theAttrIds = MED::TIntVector(), - const MED::TIntVector& theAttrVals = MED::TIntVector()) + virtual + PFamilyInfo + CrFamilyInfo(const PMeshInfo& theMeshInfo, + const std::string& theValue, + TInt theId, + const MED::TStringSet& theGroupNames, + const MED::TStringVector& theAttrDescs = MED::TStringVector(), + const MED::TIntVector& theAttrIds = MED::TIntVector(), + const MED::TIntVector& theAttrVals = MED::TIntVector()) { - return PFamilyInfo(new TTFamilyInfo + return PFamilyInfo(new TTFamilyInfo (theMeshInfo, theValue, theId, @@ -89,23 +97,27 @@ namespace MED{ theAttrVals)); } - virtual PFamilyInfo CrFamilyInfo(const PMeshInfo& theMeshInfo, - const PFamilyInfo& theInfo) + virtual + PFamilyInfo + CrFamilyInfo(const PMeshInfo& theMeshInfo, + const PFamilyInfo& theInfo) { - return PFamilyInfo(new TTFamilyInfo + return PFamilyInfo(new TTFamilyInfo (theMeshInfo, theInfo)); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual PNodeInfo CrNodeInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - ERepere theSystem = eCART, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) + virtual + PNodeInfo + CrNodeInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + ERepere theSystem = eCART, + EBooleen theIsElemNum = eVRAI, + EBooleen theIsElemNames = eVRAI) { - return PNodeInfo(new TTNodeInfo + return PNodeInfo(new TTNodeInfo (theMeshInfo, theNbElem, theSystem, @@ -113,16 +125,18 @@ namespace MED{ theIsElemNames)); } - virtual PNodeInfo CrNodeInfo(const PMeshInfo& theMeshInfo, - ERepere theSystem, - const TFloatVector& theNodeCoords, - const TStringVector& theCoordNames, - const TStringVector& theCoordUnits, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, - const TStringVector& theElemNames = TStringVector()) + virtual + PNodeInfo + CrNodeInfo(const PMeshInfo& theMeshInfo, + ERepere theSystem, + const TFloatVector& theNodeCoords, + const TStringVector& theCoordNames, + const TStringVector& theCoordUnits, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums, + const TStringVector& theElemNames = TStringVector()) { - return PNodeInfo(new TTNodeInfo + return PNodeInfo(new TTNodeInfo (theMeshInfo, theSystem, theNodeCoords, @@ -133,25 +147,29 @@ namespace MED{ theElemNames)); } - virtual PNodeInfo CrNodeInfo(const PMeshInfo& theMeshInfo, - const PNodeInfo& theInfo) + virtual + PNodeInfo + CrNodeInfo(const PMeshInfo& theMeshInfo, + const PNodeInfo& theInfo) { - return PNodeInfo(new TTNodeInfo + return PNodeInfo(new TTNodeInfo (theMeshInfo, theInfo)); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual PPolygoneInfo CrPolygoneInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - TInt theNbConn, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn = eNOD, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) + virtual + PPolygoneInfo + CrPolygoneInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + TInt theNbConn, + EEntiteMaillage theTEntity, + EGeometrieElement theTGeom, + EConnectivite theTConn = eNOD, + EBooleen theIsElemNum = eVRAI, + EBooleen theIsElemNames = eVRAI) { - return PPolygoneInfo(new TTPolygoneInfo + return PPolygoneInfo(new TTPolygoneInfo (theMeshInfo, theNbElem, theNbConn, @@ -162,17 +180,19 @@ namespace MED{ theIsElemNames)); } - virtual PPolygoneInfo CrPolygoneInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, - const TIntVector& theConnectivities, - const TIntVector& theIndexes, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, - const TStringVector& theElemNames = TStringVector()) + virtual + PPolygoneInfo + CrPolygoneInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theTEntity, + EGeometrieElement theTGeom, + EConnectivite theTConn, + const TIntVector& theConnectivities, + const TIntVector& theIndexes, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums, + const TStringVector& theElemNames = TStringVector()) { - return PPolygoneInfo(new TTPolygoneInfo + return PPolygoneInfo(new TTPolygoneInfo (theMeshInfo, theTEntity, theTGeom, @@ -184,26 +204,30 @@ namespace MED{ theElemNames)); } - virtual PPolygoneInfo CrPolygoneInfo(const PMeshInfo& theMeshInfo, - const PPolygoneInfo& theInfo) + virtual + PPolygoneInfo + CrPolygoneInfo(const PMeshInfo& theMeshInfo, + const PPolygoneInfo& theInfo) { - return PPolygoneInfo(new TTPolygoneInfo + return PPolygoneInfo(new TTPolygoneInfo (theMeshInfo, theInfo)); } - + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual PPolyedreInfo CrPolyedreInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - TInt theNbConn, - TInt theNbFaces, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn = eNOD, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) + virtual + PPolyedreInfo + CrPolyedreInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + TInt theNbConn, + TInt theNbFaces, + EEntiteMaillage theTEntity, + EGeometrieElement theTGeom, + EConnectivite theTConn = eNOD, + EBooleen theIsElemNum = eVRAI, + EBooleen theIsElemNames = eVRAI) { - return PPolyedreInfo(new TTPolyedreInfo + return PPolyedreInfo(new TTPolyedreInfo (theMeshInfo, theNbElem, theNbConn, @@ -215,18 +239,20 @@ namespace MED{ theIsElemNames)); } - virtual PPolyedreInfo CrPolyedreInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, - const TIntVector& theConnectivities, - const TIntVector& theFacesIndexes, - const TIntVector& theIndexes, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, - const TStringVector& theElemNames = TStringVector()) + virtual + PPolyedreInfo + CrPolyedreInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theTEntity, + EGeometrieElement theTGeom, + EConnectivite theTConn, + const TIntVector& theConnectivities, + const TIntVector& theFacesIndexes, + const TIntVector& theIndexes, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums, + const TStringVector& theElemNames = TStringVector()) { - return PPolyedreInfo(new TTPolyedreInfo + return PPolyedreInfo(new TTPolyedreInfo (theMeshInfo, theTEntity, theTGeom, @@ -239,24 +265,28 @@ namespace MED{ theElemNames)); } - virtual PPolyedreInfo CrPolyedreInfo(const PMeshInfo& theMeshInfo, - const PPolyedreInfo& theInfo) + virtual + PPolyedreInfo + CrPolyedreInfo(const PMeshInfo& theMeshInfo, + const PPolyedreInfo& theInfo) { - return PPolyedreInfo(new TTPolyedreInfo + return PPolyedreInfo(new TTPolyedreInfo (theMeshInfo, theInfo)); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual PCellInfo CrCellInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn = eNOD, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) + virtual + PCellInfo + CrCellInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + EEntiteMaillage theTEntity, + EGeometrieElement theTGeom, + EConnectivite theTConn = eNOD, + EBooleen theIsElemNum = eVRAI, + EBooleen theIsElemNames = eVRAI) { - return PCellInfo(new TTCellInfo + return PCellInfo(new TTCellInfo (theMeshInfo, theNbElem, theTEntity, @@ -266,16 +296,18 @@ namespace MED{ theIsElemNames)); } - virtual PCellInfo CrCellInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, - const TIntVector& theConnectivities, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, - const TStringVector& theElemNames = TStringVector()) + virtual + PCellInfo + CrCellInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theTEntity, + EGeometrieElement theTGeom, + EConnectivite theTConn, + const TIntVector& theConnectivities, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums, + const TStringVector& theElemNames = TStringVector()) { - return PCellInfo(new TTCellInfo + return PCellInfo(new TTCellInfo (theMeshInfo, theTEntity, theTGeom, @@ -286,24 +318,28 @@ namespace MED{ theElemNames)); } - virtual PCellInfo CrCellInfo(const PMeshInfo& theMeshInfo, - const PCellInfo& theInfo) + virtual + PCellInfo + CrCellInfo(const PMeshInfo& theMeshInfo, + const PCellInfo& theInfo) { - return PCellInfo(new TTCellInfo + return PCellInfo(new TTCellInfo (theMeshInfo, theInfo)); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual PFieldInfo CrFieldInfo(const PMeshInfo& theMeshInfo, - TInt theNbComp = 0, - ETypeChamp theType = eFLOAT64, - const std::string& theValue = "", - EBooleen theIsLocal = eVRAI, - TInt theNbRef = 1) + virtual + PFieldInfo + CrFieldInfo(const PMeshInfo& theMeshInfo, + TInt theNbComp = 0, + ETypeChamp theType = eFLOAT64, + const std::string& theValue = "", + EBooleen theIsLocal = eVRAI, + TInt theNbRef = 1) { - return PFieldInfo(new TTFieldInfo + return PFieldInfo(new TTFieldInfo (theMeshInfo, theNbComp, theType, @@ -312,27 +348,31 @@ namespace MED{ theNbRef)); } - virtual PFieldInfo CrFieldInfo(const PMeshInfo& theMeshInfo, - const PFieldInfo& theInfo) + virtual + PFieldInfo + CrFieldInfo(const PMeshInfo& theMeshInfo, + const PFieldInfo& theInfo) { - return PFieldInfo(new TTFieldInfo + return PFieldInfo(new TTFieldInfo (theMeshInfo, theInfo)); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual PTimeStampInfo CrTimeStampInfo(const PFieldInfo& theFieldInfo, - EEntiteMaillage theEntity, - const TGeom& theGeom, - TInt theNbGauss = 0, - TInt theNumDt = 0, - TInt theNumOrd = 0, - TFloat theDt = 0, - const std::string& theUnitDt = "", - const std::string& theGaussName = "") + virtual + PTimeStampInfo + CrTimeStampInfo(const PFieldInfo& theFieldInfo, + EEntiteMaillage theEntity, + const TGeom& theGeom, + TInt theNbGauss = 0, + TInt theNumDt = 0, + TInt theNumOrd = 0, + TFloat theDt = 0, + const std::string& theUnitDt = "", + const std::string& theGaussName = "") { - return PTimeStampInfo(new TTTimeStampInfo + return PTimeStampInfo(new TTTimeStampInfo (theFieldInfo, theEntity, theGeom, @@ -344,30 +384,36 @@ namespace MED{ theGaussName)); } - virtual PTimeStampInfo CrTimeStampInfo(const PFieldInfo& theFieldInfo, - const PTimeStampInfo& theInfo) + virtual + PTimeStampInfo + CrTimeStampInfo(const PFieldInfo& theFieldInfo, + const PTimeStampInfo& theInfo) { - return PTimeStampInfo(new TTTimeStampInfo + return PTimeStampInfo(new TTTimeStampInfo (theFieldInfo, theInfo)); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual PTimeStampVal CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, - const std::string& thePflName = "", - EModeProfil thePflMode = eCOMPACT) + virtual + PTimeStampVal + CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, + const std::string& thePflName = "", + EModeProfil thePflMode = eCOMPACT) { - return PTimeStampVal(new TTTimeStampVal + return PTimeStampVal(new TTTimeStampVal (theTimeStampInfo, thePflName, thePflMode)); } - virtual PTimeStampVal CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, - const PTimeStampVal& theInfo) + virtual + PTimeStampVal + CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, + const PTimeStampVal& theInfo) { - return PTimeStampVal(new TTTimeStampVal + return PTimeStampVal(new TTTimeStampVal (theTimeStampInfo, theInfo)); } diff --git a/src/MEDWrapper/Base/MED_Wrapper.cxx b/src/MEDWrapper/Base/MED_Wrapper.cxx index 1c01b2716..f536162c7 100644 --- a/src/MEDWrapper/Base/MED_Wrapper.cxx +++ b/src/MEDWrapper/Base/MED_Wrapper.cxx @@ -9,33 +9,88 @@ #include "MED_Wrapper.hxx" #include "MED_Utilities.hxx" +#ifdef _DEBUG_ +static int MYDEBUG = 0; +static int MYVALUEDEBUG = 0; +#else +static int MYDEBUG = 0; +static int MYVALUEDEBUG = 0; +#endif + namespace MED{ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - PMeshInfo TWrapper::GetPMeshInfo(TInt theId) + PMeshInfo TWrapper::GetPMeshInfo(TInt theId, + TErr* theErr) { PMeshInfo anInfo = CrMeshInfo(); - GetMeshInfo(theId,*anInfo); + GetMeshInfo(theId,*anInfo,theErr); return anInfo; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - PFamilyInfo TWrapper::GetPFamilyInfo(const PMeshInfo& theMeshInfo, TInt theId) + PFamilyInfo TWrapper::GetPFamilyInfo(const PMeshInfo& theMeshInfo, + TInt theId, + TErr* theErr) { TInt aNbAttr = GetNbFamAttr(theId,*theMeshInfo); TInt aNbGroup = GetNbFamGroup(theId,*theMeshInfo); PFamilyInfo anInfo = CrFamilyInfo(theMeshInfo,aNbGroup,aNbAttr); - GetFamilyInfo(theId,*anInfo); + GetFamilyInfo(theId,*anInfo,theErr); + +#ifdef _DEBUG_ + string aName = anInfo->GetName(); + INITMSG(MYDEBUG, + "aFamilyName = '"<GetGroupName(iGroup); + INITMSG(MYDEBUG,"aGroupName = '"<myDim; + TInt aNbElem = anInfo->GetNbElem(); + INITMSG(MYDEBUG,"GetPNodeInfo - aCoords: "<myCoord; + for(TInt iElem = 0; iElem < aNbElem; iElem++){ + for(TInt iDim = 0, anId = iElem*aDim; iDim < aDim; iDim++, anId++){ + ADDMSG(MYVALUEDEBUG,aCoord[anId]<<","); + } + ADDMSG(MYVALUEDEBUG," "); + } + ADDMSG(MYDEBUG,endl); + + BEGMSG(MYDEBUG,"GetPNodeInfo - GetFamNum: "); + for(TInt iElem = 0; iElem < aNbElem; iElem++){ + ADDMSG(MYVALUEDEBUG,anInfo->GetFamNum(iElem)<<", "); + } + ADDMSG(MYDEBUG,endl); + + if(anInfo->IsElemNum()){ + BEGMSG(MYDEBUG,"GetPNodeInfo - GetElemNum: "); + for(TInt iElem = 0; iElem < aNbElem; iElem++){ + ADDMSG(MYVALUEDEBUG,anInfo->GetElemNum(iElem)<<", "); + } + ADDMSG(MYDEBUG,endl); + } + + ADDMSG(MYDEBUG,endl); +#endif + return anInfo; } @@ -71,21 +126,54 @@ namespace MED{ PCellInfo TWrapper::GetPCellInfo(const PMeshInfo& theMeshInfo, EEntiteMaillage theEntity, EGeometrieElement theGeom, - EConnectivite theConn) + EConnectivite theConn, + TErr* theErr) { TInt aNbElem = GetNbCells(*theMeshInfo,theEntity,theGeom,theConn); PCellInfo anInfo = CrCellInfo(theMeshInfo,aNbElem,theEntity,theGeom,theConn); - GetCellInfo(*anInfo); + GetCellInfo(*anInfo,theErr); + +#ifdef _DEBUG_ + TInt aConnDim = anInfo->GetConnDim(); + INITMSG(MYDEBUG,"GetPCellInfo - theEntity = "<GetConn(iElem,iConn)<<","); + } + ADDMSG(MYVALUEDEBUG," "); + } + ADDMSG(MYDEBUG,endl); + + BEGMSG(MYDEBUG,"GetPCellInfo - GetFamNum: "); + for(TInt iElem = 0; iElem < aNbElem; iElem++){ + ADDMSG(MYVALUEDEBUG,anInfo->GetFamNum(iElem)<<", "); + } + ADDMSG(MYDEBUG,endl); + + if(anInfo->IsElemNum()){ + BEGMSG(MYDEBUG,"GetPCellInfo - GetElemNum: "); + for(TInt iElem = 0; iElem < aNbElem; iElem++){ + ADDMSG(MYVALUEDEBUG,anInfo->GetElemNum(iElem)<<", "); + } + ADDMSG(MYDEBUG,endl); + } + + ADDMSG(MYDEBUG,endl); +#endif + return anInfo; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - PFieldInfo TWrapper::GetPFieldInfo(const PMeshInfo& theMeshInfo, TInt theId) + PFieldInfo TWrapper::GetPFieldInfo(const PMeshInfo& theMeshInfo, + TInt theId, + TErr* theErr) { TInt aNbComp = GetNbComp(theId); PFieldInfo anInfo = CrFieldInfo(theMeshInfo,aNbComp); - GetFieldInfo(theId,*anInfo); + GetFieldInfo(theId,*anInfo,theErr); return anInfo; } @@ -94,19 +182,21 @@ namespace MED{ PTimeStampInfo TWrapper::GetPTimeStampInfo(const PFieldInfo& theFieldInfo, EEntiteMaillage theEntity, const MED::TGeom& theGeom, - TInt theId) + TInt theId, + TErr* theErr) { PTimeStampInfo anInfo = CrTimeStampInfo(theFieldInfo,theEntity,theGeom); - GetTimeStampInfo(theId,*anInfo); + GetTimeStampInfo(theId,*anInfo,theErr); return anInfo; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - PTimeStampVal TWrapper::GetPTimeStampVal(const PTimeStampInfo& theTimeStampInfo) + PTimeStampVal TWrapper::GetPTimeStampVal(const PTimeStampInfo& theTimeStampInfo, + TErr* theErr) { PTimeStampVal anInfo = CrTimeStampVal(theTimeStampInfo); - GetTimeStampVal(*anInfo); + GetTimeStampVal(*anInfo,theErr); return anInfo; } } diff --git a/src/MEDWrapper/Base/MED_Wrapper.hxx b/src/MEDWrapper/Base/MED_Wrapper.hxx index e0ccbd9f3..4865a156e 100644 --- a/src/MEDWrapper/Base/MED_Wrapper.hxx +++ b/src/MEDWrapper/Base/MED_Wrapper.hxx @@ -35,313 +35,452 @@ namespace MED{ struct TWrapper{ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual PMeshInfo CrMeshInfo(TInt theDim = 0, - const std::string& theValue = "", - EMaillage theType = eNON_STRUCTURE, - const std::string& theDesc = "") = 0; - - virtual PMeshInfo CrMeshInfo(const PMeshInfo& theInfo) = 0; - - virtual TInt GetNbMeshes(TErr* theErr = NULL) = 0; + virtual + PMeshInfo + CrMeshInfo(TInt theDim = 0, + const std::string& theValue = "", + EMaillage theType = eNON_STRUCTURE, + const std::string& theDesc = "") = 0; + + virtual + PMeshInfo + CrMeshInfo(const PMeshInfo& theInfo) = 0; + + virtual + TInt + GetNbMeshes(TErr* theErr = NULL) = 0; - virtual void GetMeshInfo(TInt theMeshId, TMeshInfo&, - TErr* theErr = NULL) = 0; - - virtual void SetMeshInfo(const TMeshInfo& theInfo, - TErr* theErr = NULL) = 0; + virtual + void + GetMeshInfo(TInt theMeshId, TMeshInfo&, + TErr* theErr = NULL) = 0; + + virtual + void + SetMeshInfo(const TMeshInfo& theInfo, + TErr* theErr = NULL) = 0; - virtual PMeshInfo GetPMeshInfo(TInt theId); + virtual + PMeshInfo + GetPMeshInfo(TInt theId, + TErr* theErr = NULL); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual TInt GetNbFamilies(const TMeshInfo& theMeshInfo, - TErr* theErr = NULL) = 0; - - virtual TInt GetNbFamAttr(TInt theFamId, - const TMeshInfo& theInfo, - TErr* theErr = NULL) = 0; - - virtual TInt GetNbFamGroup(TInt theFamId, - const TMeshInfo& theInfo, - TErr* theErr = NULL) = 0; + virtual + TInt + GetNbFamilies(const TMeshInfo& theMeshInfo, + TErr* theErr = NULL) = 0; + + virtual + TInt + GetNbFamAttr(TInt theFamId, + const TMeshInfo& theInfo, + TErr* theErr = NULL) = 0; - virtual void GetFamilyInfo(TInt theFamId, - TFamilyInfo& theInfo, - TErr* theErr = NULL) = 0; + virtual + TInt + GetNbFamGroup(TInt theFamId, + const TMeshInfo& theInfo, + TErr* theErr = NULL) = 0; - virtual void SetFamilyInfo(const TFamilyInfo& theInfo, - TErr* theErr = NULL) = 0; + virtual + void + GetFamilyInfo(TInt theFamId, + TFamilyInfo& theInfo, + TErr* theErr = NULL) = 0; - virtual PFamilyInfo CrFamilyInfo(const PMeshInfo& theMeshInfo, - TInt theNbGroup = 0, - TInt theNbAttr = 0, - TInt theId = 0, - const std::string& theValue = "") = 0; + virtual + void + SetFamilyInfo(const TFamilyInfo& theInfo, + TErr* theErr = NULL) = 0; + + virtual + PFamilyInfo + CrFamilyInfo(const PMeshInfo& theMeshInfo, + TInt theNbGroup = 0, + TInt theNbAttr = 0, + TInt theId = 0, + const std::string& theValue = "") = 0; + + virtual + PFamilyInfo + CrFamilyInfo(const PMeshInfo& theMeshInfo, + const std::string& theValue, + TInt theId, + const TStringSet& theGroupNames, + const TStringVector& theAttrDescs = TStringVector(), + const TIntVector& theAttrIds = TIntVector(), + const TIntVector& theAttrVals = TIntVector()) = 0; + + virtual + PFamilyInfo + CrFamilyInfo(const PMeshInfo& theMeshInfo, + const PFamilyInfo& theInfo) = 0; + + PFamilyInfo + GetPFamilyInfo(const PMeshInfo& theMeshInfo, + TInt theId, + TErr* theErr = NULL); - virtual PFamilyInfo CrFamilyInfo(const PMeshInfo& theMeshInfo, - const std::string& theValue, - TInt theId, - const TStringSet& theGroupNames, - const TStringVector& theAttrDescs = TStringVector(), - const TIntVector& theAttrIds = TIntVector(), - const TIntVector& theAttrVals = TIntVector()) = 0; - - virtual PFamilyInfo CrFamilyInfo(const PMeshInfo& theMeshInfo, - const PFamilyInfo& theInfo) = 0; - - PFamilyInfo GetPFamilyInfo(const PMeshInfo& theMeshInfo, TInt theId); - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual TInt GetNbNodes(const TMeshInfo& theMeshInfo, - TErr* theErr = NULL) = 0; + virtual + TInt + GetNbNodes(const TMeshInfo& theMeshInfo, + TErr* theErr = NULL) = 0; - virtual void GetNodeInfo(TNodeInfo& theInfo, - TErr* theErr = NULL) = 0; - - virtual void SetNodeInfo(const TNodeInfo& theInfo, - TErr* theErr = NULL) = 0; + virtual + void + GetNodeInfo(TNodeInfo& theInfo, + TErr* theErr = NULL) = 0; + + virtual + void + SetNodeInfo(const TNodeInfo& theInfo, + TErr* theErr = NULL) = 0; + + virtual + PNodeInfo + CrNodeInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + ERepere theSystem = eCART, + EBooleen theIsElemNum = eVRAI, + EBooleen theIsElemNames = eVRAI) = 0; + + virtual + PNodeInfo + CrNodeInfo(const PMeshInfo& theMeshInfo, + ERepere theSystem, + const TFloatVector& theNodeCoords, + const TStringVector& theCoordNames, + const TStringVector& theCoordUnits, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums, + const TStringVector& theElemNames = TStringVector()) = 0; + + virtual + PNodeInfo + CrNodeInfo(const PMeshInfo& theMeshInfo, + const PNodeInfo& theInfo) = 0; + + PNodeInfo + GetPNodeInfo(const PMeshInfo& theMeshInfo, + TErr* theErr = NULL); - virtual PNodeInfo CrNodeInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - ERepere theSystem = eCART, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) = 0; - - virtual PNodeInfo CrNodeInfo(const PMeshInfo& theMeshInfo, - ERepere theSystem, - const TFloatVector& theNodeCoords, - const TStringVector& theCoordNames, - const TStringVector& theCoordUnits, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, - const TStringVector& theElemNames = TStringVector()) = 0; - - virtual PNodeInfo CrNodeInfo(const PMeshInfo& theMeshInfo, - const PNodeInfo& theInfo) = 0; - - PNodeInfo GetPNodeInfo(const PMeshInfo& theMeshInfo); - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual void GetPolygoneInfo(TPolygoneInfo& theInfo, - TErr* theErr = NULL) {}; - virtual void SetPolygoneInfo(const TPolygoneInfo& theInfo, - TErr* theErr = NULL) {}; - virtual TInt GetNbPolygones(const TMeshInfo& theMeshInfo, - EEntiteMaillage, - EGeometrieElement, - EConnectivite, - TErr* theErr = NULL) { return 0;}; - - virtual TInt GetNbPolygoneConn(const TMeshInfo& theMeshInfo, - EEntiteMaillage, - EGeometrieElement, - EConnectivite, - TErr* theErr = NULL){ return 0;}; - - virtual PPolygoneInfo CrPolygoneInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - TInt theNbConn, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn = eNOD, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) + virtual + void + GetPolygoneInfo(TPolygoneInfo& theInfo, + TErr* theErr = NULL) + {} + + virtual + void + SetPolygoneInfo(const TPolygoneInfo& theInfo, + TErr* theErr = NULL) + {} + + virtual + TInt + GetNbPolygones(const TMeshInfo& theMeshInfo, + EEntiteMaillage, + EGeometrieElement, + EConnectivite, + TErr* theErr = NULL) + { return 0;} + + virtual + TInt + GetNbPolygoneConn(const TMeshInfo& theMeshInfo, + EEntiteMaillage, + EGeometrieElement, + EConnectivite, + TErr* theErr = NULL) + { return 0;} + + virtual + PPolygoneInfo + CrPolygoneInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + TInt theNbConn, + EEntiteMaillage theTEntity, + EGeometrieElement theTGeom, + EConnectivite theTConn = eNOD, + EBooleen theIsElemNum = eVRAI, + EBooleen theIsElemNames = eVRAI) { return PPolygoneInfo(); - }; - - virtual PPolygoneInfo CrPolygoneInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, - const TIntVector& theConnectivities, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, - const TStringVector& theElemNames = TStringVector()) + } + + virtual + PPolygoneInfo + CrPolygoneInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theTEntity, + EGeometrieElement theTGeom, + EConnectivite theTConn, + const TIntVector& theConnectivities, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums, + const TStringVector& theElemNames = TStringVector()) { return PPolygoneInfo(); - }; + } - virtual PPolygoneInfo CrPolygoneInfo(const PMeshInfo& theMeshInfo, - const PPolygoneInfo& theInfo) + virtual + PPolygoneInfo + CrPolygoneInfo(const PMeshInfo& theMeshInfo, + const PPolygoneInfo& theInfo) { return PPolygoneInfo(); - }; + } + + PPolygoneInfo + GetPPolygoneInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConn = eNOD); - PPolygoneInfo GetPPolygoneInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConn = eNOD); - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual void GetPolyedreInfo(TPolyedreInfo& theInfo, - TErr* theErr = NULL) {}; - virtual void SetPolyedreInfo(const TPolyedreInfo& theInfo, - TErr* theErr = NULL) {}; - virtual TInt GetNbPolyedres(const TMeshInfo& theMeshInfo, - EEntiteMaillage, - EGeometrieElement, + virtual + void + GetPolyedreInfo(TPolyedreInfo& theInfo, + TErr* theErr = NULL) + {} + + virtual + void + SetPolyedreInfo(const TPolyedreInfo& theInfo, + TErr* theErr = NULL) + {} + + virtual + TInt + GetNbPolyedres(const TMeshInfo& theMeshInfo, + EEntiteMaillage, + EGeometrieElement, EConnectivite, - TErr* theErr = NULL) { return 0;}; - - virtual void GetNbPolyedreConnF(const TMeshInfo& theMeshInfo, - EConnectivite theConn, - TInt& nf, - TInt& nc, - TErr* theErr = NULL){}; - - virtual PPolyedreInfo CrPolyedreInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - TInt theNbConn, - TInt theNbFaces, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn = eNOD, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) + TErr* theErr = NULL) + { return 0;} + + virtual + void + GetNbPolyedreConnF(const TMeshInfo& theMeshInfo, + EConnectivite theConn, + TInt& nf, + TInt& nc, + TErr* theErr = NULL) + {} + + virtual + PPolyedreInfo + CrPolyedreInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + TInt theNbConn, + TInt theNbFaces, + EEntiteMaillage theTEntity, + EGeometrieElement theTGeom, + EConnectivite theTConn = eNOD, + EBooleen theIsElemNum = eVRAI, + EBooleen theIsElemNames = eVRAI) { return PPolyedreInfo(); - }; - - virtual PPolyedreInfo CrPolyedreInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, - const TIntVector& theConnectivities, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, - const TStringVector& theElemNames = TStringVector()) + } + + virtual + PPolyedreInfo + CrPolyedreInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theTEntity, + EGeometrieElement theTGeom, + EConnectivite theTConn, + const TIntVector& theConnectivities, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums, + const TStringVector& theElemNames = TStringVector()) { return PPolyedreInfo(); - }; + } - virtual PPolyedreInfo CrPolyedreInfo(const PMeshInfo& theMeshInfo, - const PPolyedreInfo& theInfo) + virtual + PPolyedreInfo + CrPolyedreInfo(const PMeshInfo& theMeshInfo, + const PPolyedreInfo& theInfo) { return PPolyedreInfo(); - }; + } + + PPolyedreInfo + GetPPolyedreInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConn = eNOD); - PPolyedreInfo GetPPolyedreInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConn = eNOD); - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual TEntityInfo GetEntityInfo(const TMeshInfo& theMeshInfo, - EConnectivite theTConn = eNOD, - TErr* theErr = NULL) = 0; - - virtual TInt GetNbCells(const TMeshInfo& theMeshInfo, - EEntiteMaillage, - EGeometrieElement, - EConnectivite theTConn = eNOD, - TErr* theErr = NULL) = 0; - - virtual void GetCellInfo(TCellInfo& theInfo, - TErr* theErr = NULL) = 0; - - virtual void SetCellInfo(const TCellInfo& theInfo, - TErr* theErr = NULL) = 0; - - virtual PCellInfo CrCellInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn = eNOD, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) = 0; - - virtual PCellInfo CrCellInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theTEntity, - EGeometrieElement theTGeom, - EConnectivite theTConn, - const TIntVector& theConnectivities, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, - const TStringVector& theElemNames = TStringVector()) = 0; - - virtual PCellInfo CrCellInfo(const PMeshInfo& theMeshInfo, - const PCellInfo& theInfo) = 0; - - PCellInfo GetPCellInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConn = eNOD); + virtual + TEntityInfo + GetEntityInfo(const TMeshInfo& theMeshInfo, + EConnectivite theTConn = eNOD, + TErr* theErr = NULL) = 0; + + virtual + TInt + GetNbCells(const TMeshInfo& theMeshInfo, + EEntiteMaillage, + EGeometrieElement, + EConnectivite theTConn = eNOD, + TErr* theErr = NULL) = 0; + + virtual + void + GetCellInfo(TCellInfo& theInfo, + TErr* theErr = NULL) = 0; + + virtual + void + SetCellInfo(const TCellInfo& theInfo, + TErr* theErr = NULL) = 0; + + virtual + PCellInfo + CrCellInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + EEntiteMaillage theTEntity, + EGeometrieElement theTGeom, + EConnectivite theTConn = eNOD, + EBooleen theIsElemNum = eVRAI, + EBooleen theIsElemNames = eVRAI) = 0; + + virtual + PCellInfo + CrCellInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theTEntity, + EGeometrieElement theTGeom, + EConnectivite theTConn, + const TIntVector& theConnectivities, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums, + const TStringVector& theElemNames = TStringVector()) = 0; + + virtual + PCellInfo + CrCellInfo(const PMeshInfo& theMeshInfo, + const PCellInfo& theInfo) = 0; + + PCellInfo + GetPCellInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConn = eNOD, + TErr* theErr = NULL); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual TInt GetNbFields(TErr* theErr = NULL) = 0; + virtual + TInt + GetNbFields(TErr* theErr = NULL) = 0; - virtual TInt GetNbComp(TInt theFieldId, - TErr* theErr = NULL) = 0; + virtual + TInt + GetNbComp(TInt theFieldId, + TErr* theErr = NULL) = 0; - virtual void GetFieldInfo(TInt theFieldId, - TFieldInfo& theInfo, - TErr* theErr = NULL) = 0; - - virtual void SetFieldInfo(const TFieldInfo& theInfo, - TErr* theErr = NULL) = 0; + virtual + void + GetFieldInfo(TInt theFieldId, + TFieldInfo& theInfo, + TErr* theErr = NULL) = 0; + + virtual + void + SetFieldInfo(const TFieldInfo& theInfo, + TErr* theErr = NULL) = 0; - virtual PFieldInfo CrFieldInfo(const PMeshInfo& theMeshInfo, - TInt theNbComp = 0, - ETypeChamp theType = eFLOAT64, - const std::string& theValue = "", - EBooleen theIsLocal = eVRAI, - TInt theNbRef = 1) = 0; - - virtual PFieldInfo CrFieldInfo(const PMeshInfo& theMeshInfo, - const PFieldInfo& theInfo) = 0; - - PFieldInfo GetPFieldInfo(const PMeshInfo& theMeshInfo, TInt theId); + virtual + PFieldInfo + CrFieldInfo(const PMeshInfo& theMeshInfo, + TInt theNbComp = 0, + ETypeChamp theType = eFLOAT64, + const std::string& theValue = "", + EBooleen theIsLocal = eVRAI, + TInt theNbRef = 1) = 0; + + virtual + PFieldInfo + CrFieldInfo(const PMeshInfo& theMeshInfo, + const PFieldInfo& theInfo) = 0; + + PFieldInfo + GetPFieldInfo(const PMeshInfo& theMeshInfo, + TInt theId, + TErr* theErr = NULL); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual TInt GetNbTimeStamps(const TFieldInfo& theInfo, - const TEntityInfo& theEntityInfo, - EEntiteMaillage& theEntity, - TGeom& theGeom, - TErr* theErr = NULL) = 0; - - virtual void GetTimeStampInfo(TInt theTimeStampId, - TTimeStampInfo& theInfo, - TErr* theErr = NULL) = 0; - - virtual PTimeStampInfo CrTimeStampInfo(const PFieldInfo& theFieldInfo, - EEntiteMaillage theEntity, - const TGeom& theGeom, - TInt theNbGauss = 0, - TInt theNumDt = 0, - TInt theNumOrd = 0, - TFloat theDt = 0, - const std::string& theUnitDt = "", - const std::string& theGaussName = "") = 0; - - virtual PTimeStampInfo CrTimeStampInfo(const PFieldInfo& theFieldInfo, - const PTimeStampInfo& theInfo) = 0; - - PTimeStampInfo GetPTimeStampInfo(const PFieldInfo& theFieldInfo, - EEntiteMaillage theEntity, - const MED::TGeom& theGeom, - TInt theId); + virtual + TInt + GetNbTimeStamps(const TFieldInfo& theInfo, + const TEntityInfo& theEntityInfo, + EEntiteMaillage& theEntity, + TGeom& theGeom, + TErr* theErr = NULL) = 0; + + virtual + void + GetTimeStampInfo(TInt theTimeStampId, + TTimeStampInfo& theInfo, + TErr* theErr = NULL) = 0; + + virtual + PTimeStampInfo + CrTimeStampInfo(const PFieldInfo& theFieldInfo, + EEntiteMaillage theEntity, + const TGeom& theGeom, + TInt theNbGauss = 0, + TInt theNumDt = 0, + TInt theNumOrd = 0, + TFloat theDt = 0, + const std::string& theUnitDt = "", + const std::string& theGaussName = "") = 0; + + virtual + PTimeStampInfo + CrTimeStampInfo(const PFieldInfo& theFieldInfo, + const PTimeStampInfo& theInfo) = 0; + + PTimeStampInfo + GetPTimeStampInfo(const PFieldInfo& theFieldInfo, + EEntiteMaillage theEntity, + const MED::TGeom& theGeom, + TInt theId, + TErr* theErr = NULL); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual void GetTimeStampVal(TTimeStampVal& theVal, - TErr* theErr = NULL) = 0; + virtual + void + GetTimeStampVal(TTimeStampVal& theVal, + TErr* theErr = NULL) = 0; - virtual void SetTimeStamp(const TTimeStampVal& theTimeStampVal, - TErr* theErr = NULL) = 0; - - virtual PTimeStampVal CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, - const std::string& thePflName = "", - EModeProfil thePflMode = eCOMPACT) = 0; - - virtual PTimeStampVal CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, - const PTimeStampVal& theInfo) = 0; - - PTimeStampVal GetPTimeStampVal(const PTimeStampInfo& theTimeStampInfo); + virtual + void + SetTimeStamp(const TTimeStampVal& theTimeStampVal, + TErr* theErr = NULL) = 0; + + virtual + PTimeStampVal + CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, + const std::string& thePflName = "", + EModeProfil thePflMode = eCOMPACT) = 0; + + virtual + PTimeStampVal + CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, + const PTimeStampVal& theInfo) = 0; + + PTimeStampVal + GetPTimeStampVal(const PTimeStampInfo& theTimeStampInfo, + TErr* theErr = NULL); }; diff --git a/src/MEDWrapper/Factory/MED_Factory.hxx b/src/MEDWrapper/Factory/MED_Factory.hxx index 3bdb2ae72..ba2116894 100644 --- a/src/MEDWrapper/Factory/MED_Factory.hxx +++ b/src/MEDWrapper/Factory/MED_Factory.hxx @@ -33,8 +33,6 @@ namespace MED{ - enum EVersion {eVUnknown = -1, eV2_1, eV2_2}; - EVersion GetVersionId(const std::string& theFileName); PWrapper CrWrapper(const std::string& theFileName); diff --git a/src/MEDWrapper/Factory/MED_Test.cxx b/src/MEDWrapper/Factory/MED_Test.cxx index 50dcd0499..2167c17cb 100644 --- a/src/MEDWrapper/Factory/MED_Test.cxx +++ b/src/MEDWrapper/Factory/MED_Test.cxx @@ -166,6 +166,9 @@ void CopyMed(const PWrapper& theMed, TInt aNbGroup = aFamilyInfo->GetNbGroup(); TInt aNbAttr = aFamilyInfo->GetNbAttr(); TInt anId = aFamilyInfo->GetId(); + if(anId == 0) + continue; + aName = aFamilyInfo->GetName(); INITMSG(MYDEBUG,"aName = '"<GetPNodeInfo(aMeshInfo); - TInt aNbNodes = aNodeInfo->GetNbElem(); - INITMSG(MYDEBUG,"GetNodeInfo - aNbNodes = "<myCoord; - for(TInt iNode = 0; iNode < aNbNodes; iNode++){ - for(TInt iDim = 0, anId = iNode*aDim; iDim < aDim; iDim++, anId++){ - ADDMSG(MYVALUEDEBUG,aCoord[anId]<<","); - aCoord[anId] += theIncr; - } - ADDMSG(MYVALUEDEBUG," "); - } - ADDMSG(MYDEBUG,endl); PNodeInfo aNodeInfo2 = theMed->CrNodeInfo(aMeshInfo2,aNodeInfo); if(MYWRITEDEBUG) theMed2->SetNodeInfo(aNodeInfo2); continue; @@ -268,15 +260,7 @@ void CopyMed(const PWrapper& theMed, } default: PCellInfo aCellInfo = theMed->GetPCellInfo(aMeshInfo,anEntity,aGeom); - TInt aConnDim = aCellInfo->GetConnDim(); - for(TInt iElem = 0; iElem < aNbElem; iElem++){ - for(TInt iConn = 0; iConn < aConnDim; iConn++){ - ADDMSG(MYVALUEDEBUG,aCellInfo->GetConn(iElem,iConn)<<","); - } - ADDMSG(MYVALUEDEBUG," "); - } - ADDMSG(MYDEBUG,endl); - PCellInfo aCellInfo2 = theMed->CrCellInfo(aMeshInfo2,aCellInfo); + PCellInfo aCellInfo2 = theMed2->CrCellInfo(aMeshInfo2,aCellInfo); if(MYWRITEDEBUG) theMed2->SetCellInfo(aCellInfo2); } } @@ -292,7 +276,7 @@ void CopyMed(const std::string& theFileName, MED::EVersion theVersion, int theNbCopy) { - MSG(MYDEBUG,"CopyMed - theFileName = '"< TVMeshInfo; + typedef MED::TTMeshInfo TVMeshInfo; - typedef MED::TTFamilyInfo TVFamilyInfo; + typedef MED::TTFamilyInfo TVFamilyInfo; - typedef MED::TTNodeInfo TVNodeInfo; + typedef MED::TTNodeInfo TVNodeInfo; - typedef MED::TTCellInfo TVCellInfo; + typedef MED::TTCellInfo TVCellInfo; - typedef MED::TTFieldInfo TVFieldInfo; + typedef MED::TTFieldInfo TVFieldInfo; - typedef MED::TTTimeStampInfo TVTimeStampInfo; + typedef MED::TTTimeStampInfo TVTimeStampInfo; - typedef MED::TTTimeStampVal TVTimeStampVal; + typedef MED::TTTimeStampVal TVTimeStampVal; //--------------------------------------------------------------- class TFile; @@ -57,7 +57,8 @@ namespace MED{ typedef enum {eLECT, eECRI, eREMP} EModeAcces; //--------------------------------------------------------------- - class TVWrapper: public MED::TTWrapper{ + class TVWrapper: public MED::TTWrapper + { TVWrapper(); TVWrapper(const TVWrapper&); TVWrapper& operator=(const TVWrapper&); diff --git a/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx b/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx index ac113af85..6adcab87c 100644 --- a/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx +++ b/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx @@ -37,19 +37,19 @@ namespace MED{ const TInt PNOM = 16; - typedef MED::TTMeshInfo TVMeshInfo; + typedef MED::TTMeshInfo TVMeshInfo; - typedef MED::TTFamilyInfo TVFamilyInfo; + typedef MED::TTFamilyInfo TVFamilyInfo; - typedef MED::TTNodeInfo TVNodeInfo; + typedef MED::TTNodeInfo TVNodeInfo; - typedef MED::TTCellInfo TVCellInfo; + typedef MED::TTCellInfo TVCellInfo; - typedef MED::TTFieldInfo TVFieldInfo; + typedef MED::TTFieldInfo TVFieldInfo; - typedef MED::TTTimeStampInfo TVTimeStampInfo; + typedef MED::TTTimeStampInfo TVTimeStampInfo; - typedef MED::TTTimeStampVal TVTimeStampVal; + typedef MED::TTTimeStampVal TVTimeStampVal; //--------------------------------------------------------------- class TFile; @@ -58,7 +58,7 @@ namespace MED{ typedef enum {eLECTURE, eLECTURE_ECRITURE, eLECTURE_AJOUT, eCREATION} EModeAcces; //--------------------------------------------------------------- - class TVWrapper: public MED::TTWrapper{ + class TVWrapper: public MED::TTWrapper{ TVWrapper(); TVWrapper(const TVWrapper&); TVWrapper& operator=(const TVWrapper&); @@ -67,164 +67,233 @@ namespace MED{ TVWrapper(const std::string& theFileName); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual TInt GetNbMeshes(TErr* theErr = NULL); + virtual + TInt + GetNbMeshes(TErr* theErr = NULL); - virtual void GetMeshInfo(TInt theMeshId, MED::TMeshInfo&, + virtual + void + GetMeshInfo(TInt theMeshId, MED::TMeshInfo&, TErr* theErr = NULL); - virtual void SetMeshInfo(const MED::TMeshInfo& theInfo, - TErr* theErr = NULL); + virtual + void + SetMeshInfo(const MED::TMeshInfo& theInfo, + TErr* theErr = NULL); void SetMeshInfo(const MED::TMeshInfo& theInfo, EModeAcces theMode, TErr* theErr = NULL); - + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual TInt GetNbFamilies(const MED::TMeshInfo& theMeshInfo, - TErr* theErr = NULL); - - virtual TInt GetNbFamAttr(TInt theFamId, - const MED::TMeshInfo& theInfo, - TErr* theErr = NULL); - - virtual TInt GetNbFamGroup(TInt theFamId, - const MED::TMeshInfo& theInfo, - TErr* theErr = NULL); + virtual + TInt + GetNbFamilies(const MED::TMeshInfo& theMeshInfo, + TErr* theErr = NULL); + + virtual + TInt + GetNbFamAttr(TInt theFamId, + const MED::TMeshInfo& theInfo, + TErr* theErr = NULL); - virtual void GetFamilyInfo(TInt theFamId, - MED::TFamilyInfo& theInfo, - TErr* theErr = NULL); - - virtual void SetFamilyInfo(const MED::TFamilyInfo& theInfo, - TErr* theErr = NULL); + virtual + TInt + GetNbFamGroup(TInt theFamId, + const MED::TMeshInfo& theInfo, + TErr* theErr = NULL); + + virtual + void + GetFamilyInfo(TInt theFamId, + MED::TFamilyInfo& theInfo, + TErr* theErr = NULL); + + virtual + void + SetFamilyInfo(const MED::TFamilyInfo& theInfo, + TErr* theErr = NULL); + + void + SetFamilyInfo(const MED::TFamilyInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); - void SetFamilyInfo(const MED::TFamilyInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual TInt GetNbNodes(const MED::TMeshInfo& theMeshInfo, - TErr* theErr = NULL); + virtual + TInt + GetNbNodes(const MED::TMeshInfo& theMeshInfo, + TErr* theErr = NULL); - virtual void GetNodeInfo(MED::TNodeInfo& theInfo, - TErr* theErr = NULL); - - virtual void SetNodeInfo(const MED::TNodeInfo& theInfo, - TErr* theErr = NULL); + virtual + void + GetNodeInfo(MED::TNodeInfo& theInfo, + TErr* theErr = NULL); + + virtual + void + SetNodeInfo(const MED::TNodeInfo& theInfo, + TErr* theErr = NULL); + + void + SetNodeInfo(const MED::TNodeInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); - void SetNodeInfo(const MED::TNodeInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual void GetPolygoneInfo(TPolygoneInfo& theInfo, - TErr* theErr = NULL); - - virtual void SetPolygoneInfo(const TPolygoneInfo& theInfo, + virtual + void + GetPolygoneInfo(TPolygoneInfo& theInfo, + TErr* theErr = NULL); + + virtual + void + SetPolygoneInfo(const TPolygoneInfo& theInfo, TErr* theErr = NULL); - void SetPolygoneInfo(const MED::TPolygoneInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - - virtual TInt GetNbPolygones(const TMeshInfo& theMeshInfo, - EEntiteMaillage, - EGeometrieElement, - EConnectivite, - TErr* theErr = NULL); + void + SetPolygoneInfo(const MED::TPolygoneInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); + + virtual + TInt + GetNbPolygones(const TMeshInfo& theMeshInfo, + EEntiteMaillage, + EGeometrieElement, + EConnectivite, + TErr* theErr = NULL); - virtual TInt GetNbPolygoneConn(const TMeshInfo& theMeshInfo, - EEntiteMaillage, - EGeometrieElement, - EConnectivite, - TErr* theErr = NULL); + virtual + TInt + GetNbPolygoneConn(const TMeshInfo& theMeshInfo, + EEntiteMaillage, + EGeometrieElement, + EConnectivite, + TErr* theErr = NULL); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual void GetPolyedreInfo(TPolyedreInfo& theInfo, - TErr* theErr = NULL); - - virtual void SetPolyedreInfo(const TPolyedreInfo& theInfo, - TErr* theErr = NULL); + virtual + void + GetPolyedreInfo(TPolyedreInfo& theInfo, + TErr* theErr = NULL); - void SetPolyedreInfo(const MED::TPolyedreInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - - virtual TInt GetNbPolyedres(const TMeshInfo& theMeshInfo, - EEntiteMaillage, - EGeometrieElement, - EConnectivite, - TErr* theErr = NULL); + virtual + void + SetPolyedreInfo(const TPolyedreInfo& theInfo, + TErr* theErr = NULL); + + void + SetPolyedreInfo(const MED::TPolyedreInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); - virtual void GetNbPolyedreConnF(const TMeshInfo& theMeshInfo, - EConnectivite, - TInt& nf, - TInt& nc, - TErr* theErr = NULL); + virtual + TInt + GetNbPolyedres(const TMeshInfo& theMeshInfo, + EEntiteMaillage, + EGeometrieElement, + EConnectivite, + TErr* theErr = NULL); + + virtual + void + GetNbPolyedreConnF(const TMeshInfo& theMeshInfo, + EConnectivite, + TInt& nf, + TInt& nc, + TErr* theErr = NULL); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual TEntityInfo GetEntityInfo(const MED::TMeshInfo& theMeshInfo, - EConnectivite theTConn = eNOD, - TErr* theErr = NULL); + virtual + TEntityInfo + GetEntityInfo(const MED::TMeshInfo& theMeshInfo, + EConnectivite theTConn = eNOD, + TErr* theErr = NULL); - virtual TInt GetNbCells(const MED::TMeshInfo& theMeshInfo, - EEntiteMaillage, - EGeometrieElement, - EConnectivite theTConn = eNOD, - TErr* theErr = NULL); + virtual + TInt + GetNbCells(const MED::TMeshInfo& theMeshInfo, + EEntiteMaillage, + EGeometrieElement, + EConnectivite theTConn = eNOD, + TErr* theErr = NULL); - virtual void GetCellInfo(MED::TCellInfo& theInfo, - TErr* theErr = NULL); - - virtual void SetCellInfo(const MED::TCellInfo& theInfo, - TErr* theErr = NULL); + virtual + void + GetCellInfo(MED::TCellInfo& theInfo, + TErr* theErr = NULL); + + virtual + void + SetCellInfo(const MED::TCellInfo& theInfo, + TErr* theErr = NULL); + + void + SetCellInfo(const MED::TCellInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); - void SetCellInfo(const MED::TCellInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual TInt GetNbFields(TErr* theErr = NULL); + virtual + TInt + GetNbFields(TErr* theErr = NULL); - virtual TInt GetNbComp(TInt theFieldId, - TErr* theErr = NULL); + virtual + TInt + GetNbComp(TInt theFieldId, + TErr* theErr = NULL); - virtual void GetFieldInfo(TInt theFieldId, - MED::TFieldInfo& theInfo, - TErr* theErr = NULL); - - virtual void SetFieldInfo(const MED::TFieldInfo& theInfo, - TErr* theErr = NULL); + virtual + void + GetFieldInfo(TInt theFieldId, + MED::TFieldInfo& theInfo, + TErr* theErr = NULL); + + virtual + void + SetFieldInfo(const MED::TFieldInfo& theInfo, + TErr* theErr = NULL); + + void + SetFieldInfo(const MED::TFieldInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); - void SetFieldInfo(const MED::TFieldInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual TInt GetNbTimeStamps(const MED::TFieldInfo& theInfo, - const MED::TEntityInfo& theEntityInfo, - EEntiteMaillage& theEntity, - TGeom& theGeom, - TErr* theErr = NULL); + virtual + TInt + GetNbTimeStamps(const MED::TFieldInfo& theInfo, + const MED::TEntityInfo& theEntityInfo, + EEntiteMaillage& theEntity, + TGeom& theGeom, + TErr* theErr = NULL); - virtual void GetTimeStampInfo(TInt theTimeStampId, - MED::TTimeStampInfo& theInfo, - TErr* theErr = NULL); - - virtual void GetTimeStampVal(MED::TTimeStampVal& theVal, - TErr* theErr = NULL); + virtual + void + GetTimeStampInfo(TInt theTimeStampId, + MED::TTimeStampInfo& theInfo, + TErr* theErr = NULL); - virtual void SetTimeStamp(const MED::TTimeStampVal& theTimeStampVal, - TErr* theErr = NULL); + virtual + void + GetTimeStampVal(MED::TTimeStampVal& theVal, + TErr* theErr = NULL); + + virtual + void + SetTimeStamp(const MED::TTimeStampVal& theTimeStampVal, + TErr* theErr = NULL); + + void + SetTimeStamp(const MED::TTimeStampVal& theTimeStampVal, + EModeAcces theMode, + TErr* theErr = NULL); - void SetTimeStamp(const MED::TTimeStampVal& theTimeStampVal, - EModeAcces theMode, - TErr* theErr = NULL); - protected: PFile myFile; }; -- 2.39.2