]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To separate Gauss Points utility functions from base MEDWrapper API
authorapo <apo@opencascade.com>
Tue, 2 Aug 2005 09:57:13 +0000 (09:57 +0000)
committerapo <apo@opencascade.com>
Tue, 2 Aug 2005 09:57:13 +0000 (09:57 +0000)
src/CONVERTOR/VISU_MedConvertor.cxx

index 4296266d33585a18a598a9c0628130e7561cfb53..cf46fa0c6e11b9c2c28e5cbc1c6fa12b21d0b735 100644 (file)
 
 #include "MED_Factory.hxx"
 #include "MED_Algorithm.hxx"
+#include "MED_GaussUtils.hxx"
 #include "MED_Utilities.hxx"
 
 #include <vtkCellType.h>
 
 #define _EDF_NODE_IDS_
-//#define _DEXCEPT_
+#define _DEXCEPT_
 
 using namespace std;
 using namespace VISU;
@@ -46,7 +47,7 @@ using MED::TFloat;
 using MED::EBooleen;
 
 #ifdef _DEBUG_
-static int MYDEBUG = 0;
+static int MYDEBUG = 1;
 static int MY_FAMILY_DEBUG = 0;
 static int MY_GROUP_DEBUG = 0;
 #else
@@ -619,7 +620,7 @@ VISU_MedConvertor
        }
       }
 
-      //continue;
+      continue;
 
       MED::TFamilyGroup aFamilyGroup = MED::GetFamilies(aMed,aMeshInfo);
       MED::TFamilyByEntity aFamilyByEntity = MED::GetFamiliesByEntity(aMed,aElemGroup,aFamilyGroup);
@@ -1174,22 +1175,24 @@ LoadGaussMesh(const MED::PWrapper& theMed,
        PMEDSubProfile aSubProfile = aGaussSubMesh->mySubProfile;
        const TSubMeshID& aSubMeshID = aSubProfile->mySubMeshID;
 
+       bool anIsGaussCoord3D = false;
        if(!aSubMeshID.empty()){
          MED::PProfileInfo aProfileInfo = aSubProfile->myProfileInfo;
          const MED::TElemNum& anElemNum = aProfileInfo->myElemNum;
-         MED::GetGaussCoord3D(aGaussInfo,
-                              aCellInfo,
-                              aNodeInfo,
-                              aGaussCoord,
-                              anElemNum);
+         anIsGaussCoord3D = MED::GetGaussCoord3D(aGaussInfo,
+                                                 aCellInfo,
+                                                 aNodeInfo,
+                                                 aGaussCoord,
+                                                 anElemNum);
        }else
-         MED::GetGaussCoord3D(aGaussInfo,
-                              aCellInfo,
-                              aNodeInfo,
-                              aGaussCoord);
+         anIsGaussCoord3D = MED::GetGaussCoord3D(aGaussInfo,
+                                                 aCellInfo,
+                                                 aNodeInfo,
+                                                 aGaussCoord);
 
-       if(TInt aNbGauss = aGaussCoord.GetNbGauss()){
+       if(anIsGaussCoord3D){
          TPointCoords& aCoords = aGaussSubMesh->myPointCoords;
+         TInt aNbGauss = aGaussCoord.GetNbGauss();
          TInt aNbElem = aGaussCoord.GetNbElem();
          TInt aDim = aGaussCoord.GetDim();
          vtkIdType aNbCells = aNbElem*aNbGauss;
@@ -1295,6 +1298,7 @@ VISU_MedConvertor
 
   theField->myDataSize = 0;
 
+  const MED::TTimeStampVal& aTimeVal = aTimeStampVal;
   TGeom2SubProfile::const_iterator anIter = aGeom2SubProfile.begin();
   for(; anIter != aGeom2SubProfile.end(); anIter++){
     vtkIdType aVGeom = anIter->first;
@@ -1316,7 +1320,7 @@ VISU_MedConvertor
       aVMeshValue.Init(aNbElem,aNbGauss,aNbComp);
 
       MED::EGeometrieElement aMGeom = VTKGeomToMED(aVGeom);
-      const MED::TMeshValue& aMMeshValue = aTimeStampVal->GetMeshValue(aMGeom);
+      const MED::TMeshValue& aMMeshValue = aTimeVal.GetMeshValue(aMGeom);
       for(TInt iElem = 0; iElem < aNbElem; iElem++){
        TValueSliceArr aVValueSliceArr = aVMeshValue.GetGaussValueSliceArr(iElem);
        MED::TCValueSliceArr aMValueSliceArr = aMMeshValue.GetValueSliceArr(iElem);