From d31dcc9689ba8b8916f2a7cc9372b2ed3258566b Mon Sep 17 00:00:00 2001 From: apo Date: Mon, 29 Aug 2005 07:16:59 +0000 Subject: [PATCH] To introduce ID's mapping --- src/CONVERTOR/VISUConvertor.cxx | 40 +++++++------------- src/CONVERTOR/VISU_Convertor_impl.cxx | 19 ++++++---- src/CONVERTOR/VISU_MedConvertor.cxx | 53 ++++++++++++++++----------- 3 files changed, 57 insertions(+), 55 deletions(-) diff --git a/src/CONVERTOR/VISUConvertor.cxx b/src/CONVERTOR/VISUConvertor.cxx index 3e0d804a..34c4de0b 100644 --- a/src/CONVERTOR/VISUConvertor.cxx +++ b/src/CONVERTOR/VISUConvertor.cxx @@ -83,24 +83,10 @@ void parseFile(const char* theFileName) VISU::TValField::const_iterator aValFieldIter = aValField.begin(); for(; aValFieldIter != aValField.end(); aValFieldIter++){ int aTimeStamp = aValFieldIter->first; - // - vtkUnstructuredGrid *aOut; - //int aNbNodes, aNbCells, i; - //VISU::TGaussPointID aID; - // - aOut=aCon->GetTimeStampOnGaussPts(aMeshName,anEntity,aFieldName,aTimeStamp); - - //aNbNodes=aOut->GetNumberOfPoints(); - //aNbCells=aOut->GetNumberOfCells(); - //printf("aNbNodes =%d\n", aNbNodes); - //printf("aNbCells =%d\n", aNbCells); - // - //VISU::PGaussMesh pGaussMesh=aCon->GetGaussMesh(aMeshName,anEntity,aFieldName,aTimeStamp); - // - //for (i=0; iGetObjId(i); - // } - // + if(anEntity != VISU::NODE_ENTITY) + aCon->GetTimeStampOnGaussPts(aMeshName,anEntity,aFieldName,aTimeStamp); + else + aCon->GetTimeStampOnMesh(aMeshName,anEntity,aFieldName,aTimeStamp); //goto OK; } } @@ -113,15 +99,7 @@ void parseFile(const char* theFileName) aCon->GetMeshOnEntity(aMeshName,anEntity); } - continue; - - //Importing groups - const VISU::TGroupMap& aGroupMap = aMesh->myGroupMap; - VISU::TGroupMap::const_iterator aGroupMapIter = aGroupMap.begin(); - for(; aGroupMapIter != aGroupMap.end(); aGroupMapIter++){ - const string& aGroupName = aGroupMapIter->first; - aCon->GetMeshOnGroup(aMeshName,aGroupName); - } + //continue; //Import families aMeshOnEntityMapIter = aMeshOnEntityMap.begin(); @@ -137,6 +115,14 @@ void parseFile(const char* theFileName) } } + //Importing groups + const VISU::TGroupMap& aGroupMap = aMesh->myGroupMap; + VISU::TGroupMap::const_iterator aGroupMapIter = aGroupMap.begin(); + for(; aGroupMapIter != aGroupMap.end(); aGroupMapIter++){ + const string& aGroupName = aGroupMapIter->first; + aCon->GetMeshOnGroup(aMeshName,aGroupName); + } + } MSG(MYDEBUG,"OK"); #ifndef _DEXCEPT_ diff --git a/src/CONVERTOR/VISU_Convertor_impl.cxx b/src/CONVERTOR/VISU_Convertor_impl.cxx index 65973f9f..5183abf4 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.cxx +++ b/src/CONVERTOR/VISU_Convertor_impl.cxx @@ -58,8 +58,8 @@ static float ERR_SIZE_CALC = 1.00; static int MYVTKDEBUG = 0; #ifdef _DEBUG_ -static int MYDEBUG = 1; -static int MYDEBUGWITHFILES = 1; +static int MYDEBUG = 0; +static int MYDEBUGWITHFILES = 0; #else static int MYDEBUG = 0; static int MYDEBUGWITHFILES = 0; @@ -747,7 +747,7 @@ namespace for(; aGeom2Cell2ConnectIter != aGeom2Cell2Connect.end(); aGeom2Cell2ConnectIter++){ const VISU::TCell2Connect& anArray = aGeom2Cell2ConnectIter->second; vtkIdType aGeom = aGeom2Cell2ConnectIter->first; - INITMSG(MYDEBUG,"aGeom = "<myGeom2SubMeshID; if(aGeom2SubMeshID.empty()) @@ -756,7 +756,7 @@ namespace VISU::TGeom2SubMeshID::const_iterator aGeom2SubMeshIDIter = aGeom2SubMeshID.find(aGeom); if(aGeom2SubMeshIDIter != aGeom2SubMeshID.end()){ const VISU::TSubMeshID& aSubMeshID = aGeom2SubMeshIDIter->second; - INITMSG(MYDEBUG,"aSubMeshID.size() = "<DebugOn(); @@ -1322,10 +1323,11 @@ VISU_Convertor_impl BEGMSG(MYVTKDEBUG,"GetCellLinks() = "<GetCellLinks()->GetActualMemorySize()*1000)<myIsDone = "<myIsDone<< @@ -1278,7 +1286,6 @@ LoadProfile(const MED::PWrapper& theMed, } { const MED::PMeshInfo& aMeshInfo = theMesh->myMeshInfo; - MED::PNodeInfo aNodeInfo = theMed->GetPNodeInfo(aMeshInfo); TEntity aVEntity = theMeshOnEntity.myEntity; MED::EEntiteMaillage aMEntity = VTKEntityToMED(aVEntity); @@ -1288,13 +1295,17 @@ LoadProfile(const MED::PWrapper& theMed, for(; anIter != aGeom2SubProfile.end(); anIter++){ const PMEDSubProfile& aSubProfile = anIter->second; MED::EGeometrieElement aMGeom = aSubProfile->myMGeom; - MED::PCellInfo aCellInfo = theMed->GetPCellInfo(aMeshInfo, - aMEntity, - aMGeom); + MED::PElemInfo anElemInfo; + if(aMEntity == MED::eNOEUD) + anElemInfo = theMed->GetPNodeInfo(aMeshInfo); + else + anElemInfo = theMed->GetPCellInfo(aMeshInfo, + aMEntity, + aMGeom); - aSubProfile->myIsElemNum = aCellInfo->IsElemNum(); + aSubProfile->myIsElemNum = anElemInfo->IsElemNum(); if(aSubProfile->myIsElemNum) - aSubProfile->myElemNum = aCellInfo->myElemNum; + aSubProfile->myElemNum = anElemInfo->myElemNum; aSubProfile->myNamedPointCoords = theMesh->myNamedPointCoords; } -- 2.39.2