From: apo Date: Fri, 13 Jan 2006 08:52:55 +0000 (+0000) Subject: To improve importing sequence of timestamps from MED object X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=df900d06b34f3d26648c44bb72b80c957aeaf13d;p=modules%2Fvisu.git To improve importing sequence of timestamps from MED object --- diff --git a/src/VISU_I/VISU_CorbaMedConvertor.cxx b/src/VISU_I/VISU_CorbaMedConvertor.cxx index 98e81b68..0994d246 100644 --- a/src/VISU_I/VISU_CorbaMedConvertor.cxx +++ b/src/VISU_I/VISU_CorbaMedConvertor.cxx @@ -39,7 +39,7 @@ using namespace VISU; #define USER_INTERLACE MED_FULL_INTERLACE #ifdef _DEBUG_ -static int MYDEBUG = 0; +static int MYDEBUG = 1; #else static int MYDEBUG = 0; #endif @@ -580,12 +580,16 @@ VISU_MEDConvertor::Build(SALOME_MED::MED_ptr theMED) GetCellsSize(aNbCells,aCellsSize,aMeshOnSupport,aVEntity); if(aNbCells > 0){ - PCMeshOnEntity aMeshOnEntity = aMeshOnEntityMap[aVEntity](new TCMeshOnEntity()); - aMeshOnEntity->myMeshName = aMeshName.in(); - aMeshOnEntity->myEntity = aVEntity; - aMeshOnEntity->myNbCells = aNbCells; - aMeshOnEntity->myCellsSize = aCellsSize; - aMeshOnEntity->mySupport = aMEDSupport; + TMeshOnEntityMap::const_iterator aMeshOnEntityMapIter = aMeshOnEntityMap.find(aVEntity); + if(aMeshOnEntityMapIter == aMeshOnEntityMap.end()){ + PCMeshOnEntity aMeshOnEntity(new TCMeshOnEntity()); + aMeshOnEntity->myMeshName = aMeshName.in(); + aMeshOnEntity->myEntity = aVEntity; + aMeshOnEntity->myNbCells = aNbCells; + aMeshOnEntity->myCellsSize = aCellsSize; + aMeshOnEntity->mySupport = aMEDSupport; + aMeshOnEntityMap[aVEntity] = aMeshOnEntity; + } } } } @@ -621,20 +625,25 @@ VISU_MEDConvertor::Build(SALOME_MED::MED_ptr theMED) GetCellsSize(aNbCells,aCellsSize,aMEDFamily); if(MYDEBUG) - MESSAGE("VISU_MEDConvertor::Build - aFamily = '"<myNbCells = "<myNbCells); - } + }else + aField = aFieldMapIter->second; + TValField& aValField = aField->myValField; int anId = aMEDField->getIterationNumber(); PCValForTime aValForTime = aValField[anId](new TCValForTime()); @@ -855,8 +900,11 @@ VISU_MEDConvertor::Build(SALOMEDS::ChildIterator_ptr theTimeStampIterator) aValForTime->myTime = TTime(aDT,""); aValForTime->myField = aMEDField; if(MYDEBUG) - MESSAGE("VISU_MEDConvertor::Build - aMeshName = '"<