From 4d682bfc50600ca3cc6d76b9ad0f09e928b89660 Mon Sep 17 00:00:00 2001 From: apo Date: Wed, 31 Aug 2005 07:11:38 +0000 Subject: [PATCH] To avoid compilation errors --- src/CONVERTOR/VISU_Convertor_impl.hxx | 2 +- src/CONVERTOR/VISU_MedConvertor.cxx | 20 ++++++++--------- src/VISU_I/VISU_CorbaMedConvertor.cxx | 31 ++++++++++++++++++++------- 3 files changed, 34 insertions(+), 19 deletions(-) diff --git a/src/CONVERTOR/VISU_Convertor_impl.hxx b/src/CONVERTOR/VISU_Convertor_impl.hxx index 644192c3..15c4bb1c 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.hxx +++ b/src/CONVERTOR/VISU_Convertor_impl.hxx @@ -286,7 +286,7 @@ namespace VISU //--------------------------------------------------------------- - typedef std::map TGeom2SubMesh; + typedef std::map TGeom2SubMesh; struct TMeshOnEntityImpl: virtual TMeshOnEntity, virtual TSource { diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index ac8ae78f..2a25db1f 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -1011,11 +1011,11 @@ VISU_MedConvertor } TGeom2SubMesh& aGeom2SubMesh = aMeshOnEntity->myGeom2SubMesh; - TSubMeshImpl& aSubMesh = aGeom2SubMesh[VTK_VERTEX]; - TCell2Connect& aConnForCellType = aSubMesh.myCell2Connect; - aConnForCellType.resize(aNbElem); + PSubMeshImpl aSubMesh = aGeom2SubMesh[VTK_VERTEX]; + TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect; + aCell2Connect.resize(aNbElem); for (int iElem = 0; iElem < aNbElem; iElem++) - aConnForCellType[iElem] = VISU::TConnect(1,iElem); + aCell2Connect[iElem] = VISU::TConnect(1,iElem); theMesh->myIsDone = true; @@ -1115,8 +1115,8 @@ VISU_MedConvertor MED::PPolygoneInfo aPolygoneInfo = theMed->GetPPolygoneInfo(aMeshInfo,aMEntity,aMGeom); TInt aNbElem = aPolygoneInfo->GetNbElem(); if(aNbElem > 0){ - TSubMeshImpl& aSubMesh = aGeom2SubMesh[aVGeom]; - TCell2Connect& aCell2Connect = aSubMesh.myCell2Connect; + PSubMeshImpl aSubMesh = aGeom2SubMesh[VTK_VERTEX]; + TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect; aCell2Connect.resize(aNbElem); for(TInt iElem = 0; iElem < aNbElem; iElem++) { @@ -1135,8 +1135,8 @@ VISU_MedConvertor TInt aNbElem = aPolyedreInfo->GetNbElem(); if(aNbElem > 0){ - TSubMeshImpl& aSubMesh = aGeom2SubMesh[aVGeom]; - TCell2Connect& aCell2Connect = aSubMesh.myCell2Connect; + PSubMeshImpl aSubMesh = aGeom2SubMesh[VTK_VERTEX]; + TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect; aCell2Connect.resize(aNbElem); for(TInt iElem = 0; iElem < aNbElem; iElem++){ @@ -1172,8 +1172,8 @@ VISU_MedConvertor TInt aNbElem = aCellInfo->GetNbElem(); if(aNbElem > 0){ - TSubMeshImpl& aSubMesh = aGeom2SubMesh[aVGeom]; - TCell2Connect& aCell2Connect = aSubMesh.myCell2Connect; + PSubMeshImpl aSubMesh = aGeom2SubMesh[aVGeom]; + TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect; aCell2Connect.resize(aNbElem); TInt aMNbNodes = MEDGeom2NbNodes(aMGeom); diff --git a/src/VISU_I/VISU_CorbaMedConvertor.cxx b/src/VISU_I/VISU_CorbaMedConvertor.cxx index 676609c5..26b14fbf 100644 --- a/src/VISU_I/VISU_CorbaMedConvertor.cxx +++ b/src/VISU_I/VISU_CorbaMedConvertor.cxx @@ -974,7 +974,9 @@ VISU_MEDConvertor if(MYDEBUG) MESSAGE("LoadPoints - Filling aMeshOnEntity with type NODE_ENTITY"); - TCell2Connect& aCell2Connect = aMeshOnEntity->myGeom2Cell2Connect[VTK_VERTEX]; + TGeom2SubMesh& aGeom2SubMesh = aMeshOnEntity->myGeom2SubMesh; + PSubMeshImpl aSubMesh = aGeom2SubMesh[VTK_VERTEX]; + TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect; aCell2Connect.resize(aNbElem); for(int iElem = 0; iElem < aNbElem; iElem++) aCell2Connect[iElem] = TConnect(1,iElem); @@ -1047,6 +1049,7 @@ VISU_MEDConvertor int iGeomEnd = GetEntity2Geom(aVEntity,aGeomElems); const SALOME_MED::medEntityMesh& aMEntity = VTKEntityToMED(aVEntity); const TNamedPointCoords& aCoords = theMesh->myNamedPointCoords; + TGeom2SubMesh& aGeom2SubMesh = theMeshOnEntity->myGeom2SubMesh; int aNbPoints = aCoords.GetNbPoints(); for(int iGeom = 0, aCounter = 0; iGeom < iGeomEnd; iGeom++){ @@ -1058,7 +1061,8 @@ VISU_MEDConvertor if (iNumElemEnd > 0) { SALOME_MED::long_array_var conn = aMedMesh->getConnectivity(SALOME_MED::MED_FULL_INTERLACE,SALOME_MED::MED_NODAL,aMEntity,aGeom); - TCell2Connect& aCell2Connect = theMeshOnEntity->myGeom2Cell2Connect[aVGeom]; + PSubMeshImpl aSubMesh = aGeom2SubMesh[aVGeom]; + TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect; std::vector aConnect(aMNbNodes); int aNbConnForElem = conn->length()/iNumElemEnd; @@ -1122,6 +1126,7 @@ VISU_MEDConvertor if(theFamily->myIsDone) return 0; + const VISU::TGeom2SubMesh& aGeom2SubMesh = theMeshOnEntity->myGeom2SubMesh; SALOME_MED::FAMILY_var aMedFamily = theFamily->myFamily; CORBA::Boolean anIsOnAllElements = aMedFamily->isOnAllElements(); if(!anIsOnAllElements){ @@ -1132,8 +1137,17 @@ VISU_MEDConvertor SALOME_MED::medGeometryElement aGeom = aGeoms[iGeom]; SALOME_MED::long_array_var aCellNumForType = aMedFamily->getNumber(aGeom); int aVGeom = MEDGeomToVTK(aGeom); + + int iNumElemEndTmp = 0; + TGeom2SubMesh::const_iterator anIter = aGeom2SubMesh.find(aVGeom); + if(anIter != aGeom2SubMesh.end()){ + const VISU::TSubMeshImpl& aSubMesh = anIter->second; + const VISU::TCell2Connect& anArray = aSubMesh.myCell2Connect; + iNumElemEndTmp = anArray.size(); + } + TSubMeshID& aSubMeshID = theFamily->myGeom2SubMeshID[aVGeom]; - int iNumElemEndTmp = theMeshOnEntity->myGeom2Cell2Connect[aVGeom].size(); + int iNumElemEnd = aCellNumForType->length(); int aCounter = theMeshOnEntity->myCellsFirstIndex[aGeom].first; @@ -1154,11 +1168,12 @@ VISU_MEDConvertor } } }else{ - const TGeom2Cell2Connect& aCellsConn = theMeshOnEntity->myGeom2Cell2Connect; - TGeom2Cell2Connect::const_iterator aCellsConnIter = aCellsConn.begin(); - for(; aCellsConnIter != aCellsConn.end(); aCellsConnIter++){ - int aVGeom = aCellsConnIter->first; - const TCell2Connect& aCell2Connect = aCellsConnIter->second; + const VISU::TGeom2SubMesh& aGeom2SubMesh = theMeshOnEntity->myGeom2SubMesh; + VISU::TGeom2SubMesh::const_iterator anIter = aGeom2SubMesh.begin(); + for(; anIter != aGeom2SubMesh.end(); anIter++){ + int aVGeom = anIter->first; + const VISU::TSubMeshImpl& aSubMesh = anIter->second; + const VISU::TCell2Connect& aCell2Connect = aSubMesh.myCell2Connect; TSubMeshID& aSubMeshID = theFamily->myGeom2SubMeshID[aVGeom]; int iNumElemEnd = aCell2Connect.size(); for(int iNumElem = 0; iNumElem < iNumElemEnd; iNumElem++) -- 2.39.2