]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
[Bug PAL7784] New: REGR: wrong Export-Import Mesh in med
authorapo <apo@opencascade.com>
Tue, 25 Jan 2005 06:35:10 +0000 (06:35 +0000)
committerapo <apo@opencascade.com>
Tue, 25 Jan 2005 06:35:10 +0000 (06:35 +0000)
src/MEDWrapper/Base/MED_Algorithm.cxx
src/MEDWrapper/Base/MED_Utilities.hxx
src/MEDWrapper/V2_1/MED_V2_1_Wrapper.cxx
src/MEDWrapper/V2_2/MED_V2_2_Wrapper.cxx

index fb9e24fa33805624f202e97ae544d39d4200c3a9..a1a42ed965a6a711f4042e18eb1dfc8a01aa3b67 100644 (file)
@@ -159,9 +159,8 @@ namespace MED{
     INITMSG(MYDEBUG,"GetNbFields() = "<<aNbFields<<"\n");
     for(TInt iField = 1; iField <= aNbFields; iField++){
       PFieldInfo aFieldInfo = theWrapper.GetPFieldInfo(theMeshInfo,iField);
-      TInt aNbComp = aFieldInfo->GetNbComp();
-      string aName = aFieldInfo->GetName();
-      INITMSG(MYDEBUG,"aFieldName = '"<<aName<<"'; aNbComp = "<<aNbComp<<"; ");
+      INITMSG(MYDEBUG,"aFieldName = '"<<aFieldInfo->GetName()<<
+             "'; aNbComp = "<<aFieldInfo->GetNbComp()<<"; ");
       MED::TGeom aGeom;
       EEntiteMaillage anEntity = EEntiteMaillage(-1);
       TInt aNbTimeStamps = theWrapper.GetNbTimeStamps(aFieldInfo,theEntityInfo,anEntity,aGeom);
index 96f1b30fca3452e60e28fc7097e77d60a5ff4ec1..3c3882cc79ea4ca4ce9098b6e3ddd298cdb5edd6 100644 (file)
@@ -48,7 +48,7 @@ namespace MED{
   };
 };
 
-
+//#define _DEBUG_
 #ifdef _DEBUG_
   #define MSG(deb,msg) if(deb) std::cout<<MED::PrefixPrinter::GetPrefix()<<msg<<" ("<<__FILE__<<" ["<<__LINE__<<"])\n"
   #define BEGMSG(deb,msg) if(deb) std::cout<<MED::PrefixPrinter::GetPrefix()<<msg
index 8b71d6071e27a6087ec2dfb18e60370a6f6fc166..a406c0d4b4952f9d511a92904463eccc313df1d7 100644 (file)
@@ -430,7 +430,7 @@ namespace MED{
        return anInfo;
       
       TInt aNbElem = GetNbNodes(theMeshInfo);
-      if(aNbElem>0){
+      if(aNbElem > 0){
        anInfo[eNOEUD][ePOINT1] = aNbElem;
        const TEntity2GeomSet& anEntity2GeomSet = GetEntity2GeomSet();
        TEntity2GeomSet::const_iterator anIter = anEntity2GeomSet.begin();
@@ -442,10 +442,9 @@ namespace MED{
          TGeomSet::const_iterator anIterEnd2 = aGeomSet.end();
          for(; anIter2 != anIterEnd2; anIter2++){
            const EGeometrieElement& aGeom = *anIter2;
-           TInt aNb = GetNbCells(theMeshInfo,anEntity,aGeom,theTConn,theErr);
-           if(aNb>0){
-             anInfo[anEntity][aGeom] = aNb;
-           }
+           aNbElem = GetNbCells(theMeshInfo,anEntity,aGeom,theTConn,theErr);
+           if(aNbElem > 0)
+             anInfo[anEntity][aGeom] = aNbElem;
          }
        }
       }
@@ -466,9 +465,9 @@ namespace MED{
       
       MED::TMeshInfo& aMeshInfo = const_cast<MED::TMeshInfo&>(theMeshInfo);
       
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theTEntity);
-      med_geometrie_element& aGeom = static_cast<med_geometrie_element>(theTGeom);
-      med_connectivite& aConn = static_cast<med_connectivite>(theTConn);
+      med_entite_maillage anEntity = med_entite_maillage(theTEntity);
+      med_geometrie_element aGeom = med_geometrie_element(theTGeom);
+      med_connectivite aConn = med_connectivite(theTConn);
 
       return MEDnEntMaa(myFile->Id(),
                        &aMeshInfo.myName[0],
index 4585c08d0e0d8811290074cc98aa6c76146ceef4..60d40d48ee5e7689ed081f2cee612faf05419ae4 100644 (file)
@@ -720,10 +720,11 @@ namespace MED{
       
       TFileWrapper aFileWrapper(myFile,eLECTURE,theErr);
       
-      if(theErr && !*theErr)
+      if(theErr && *theErr < 0)
        return anInfo;
       
-      if(TInt aNbElem = GetNbNodes(theMeshInfo)){
+      TInt aNbElem = GetNbNodes(theMeshInfo);
+      if(aNbElem > 0){
        anInfo[eNOEUD][ePOINT1] = aNbElem;
        const TEntity2GeomSet& anEntity2GeomSet = GetEntity2GeomSet();
        TEntity2GeomSet::const_iterator anIter = anEntity2GeomSet.begin();
@@ -735,10 +736,9 @@ namespace MED{
          TGeomSet::const_iterator anIterEnd2 = aGeomSet.end();
          for(; anIter2 != anIterEnd2; anIter2++){
            const EGeometrieElement& aGeom = *anIter2;
-           TInt aNb = GetNbCells(theMeshInfo,anEntity,aGeom,theTConn,theErr);
-           if(aNb>0){
-             anInfo[anEntity][aGeom] = aNb;
-           }
+           aNbElem = GetNbCells(theMeshInfo,anEntity,aGeom,theTConn,theErr);
+           if(aNbElem > 0)
+             anInfo[anEntity][aGeom] = aNbElem;
          }
        }
       }
@@ -759,9 +759,9 @@ namespace MED{
       
       MED::TMeshInfo& aMeshInfo = const_cast<MED::TMeshInfo&>(theMeshInfo);
       
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theTEntity);
-      med_geometrie_element& aGeom = static_cast<med_geometrie_element>(theTGeom);
-      med_connectivite& aConn = static_cast<med_connectivite>(theTConn);
+      med_entite_maillage anEntity = med_entite_maillage(theTEntity);
+      med_geometrie_element aGeom = med_geometrie_element(theTGeom);
+      med_connectivite aConn = med_connectivite(theTConn);
 
       return MEDnEntMaa(myFile->Id(),
                        &aMeshInfo.myName[0],