From c1f5c9d1bfeb9ca00ac6871adb50d8006e193b33 Mon Sep 17 00:00:00 2001 From: apo Date: Tue, 2 Aug 2005 09:57:13 +0000 Subject: [PATCH] To separate Gauss Points utility functions from base MEDWrapper API --- src/CONVERTOR/VISU_MedConvertor.cxx | 32 ++++++++++++++++------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index 4296266d..cf46fa0c 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -31,12 +31,13 @@ #include "MED_Factory.hxx" #include "MED_Algorithm.hxx" +#include "MED_GaussUtils.hxx" #include "MED_Utilities.hxx" #include #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); -- 2.39.2