From: apo Date: Thu, 11 Aug 2005 05:49:30 +0000 (+0000) Subject: To split the large Build method into less parts. X-Git-Tag: BR-D5-38-2003_D2005-12-09~130 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5a8838a67c5b1518e34f05fe68dac14dcebcc379;p=modules%2Fvisu.git To split the large Build method into less parts. First step - extraction BuildMeshOnEntityMap functionality --- diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index c7183855..3bf0b784 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -47,10 +47,10 @@ using MED::TFloat; using MED::EBooleen; #ifdef _DEBUG_ -static int MYDEBUG = 0; +static int MYDEBUG = 1; static int MYVALUEDEBUG = 0; -static int MY_FAMILY_DEBUG = 0; -static int MY_GROUP_DEBUG = 0; +static int MY_FAMILY_DEBUG = 1; +static int MY_GROUP_DEBUG = 1; #else static int MYDEBUG = 0; static int MYVALUEDEBUG = 0; @@ -377,6 +377,141 @@ namespace InitProfile(theTimeStampVal,theMeshOnEntity,theGeom2Size,theValForTime); InitGaussMesh(theTimeStampVal,theMeshOnEntity,theGeom2Size,theValForTime); } + + + //--------------------------------------------------------------- + typedef std::map TFamilyCounterMap; + + void + BuildMeshOnEntityMap(PMEDMesh theMesh, + TFamilyCounterMap& theFamilyNbCellsCounterMap, + TFamilyCounterMap& theFamilyCellsSizeCounterMap, + const MED::TEntityInfo& theEntityInfo, + MED::PNodeInfo theNodeInfo, + MED::PWrapper theMEDWrapper) + { + INITMSG(MYDEBUG,"BuildMeshOnEntityMap"<myMeshInfo; + const std::string& aMeshName = theMesh->myName; + TMeshOnEntityMap& aMeshOnEntityMap = theMesh->myMeshOnEntityMap; + MED::TEntityInfo::const_iterator anEntityIter = theEntityInfo.begin(); + for(; anEntityIter != theEntityInfo.end(); anEntityIter++){ + const MED::EEntiteMaillage& aMEntity = anEntityIter->first; + const MED::TGeom2Size& aGeom2Size = anEntityIter->second; + + TEntity aVEntity = MEDEntityToVTK(aMEntity); + PMEDMeshOnEntity aMeshOnEntity = aMeshOnEntityMap[aVEntity](new TMEDMeshOnEntity()); + aMeshOnEntity->myEntity = aVEntity; + aMeshOnEntity->myMeshName = aMeshName; + aMeshOnEntity->myGeom2Size = aGeom2Size; + + INITMSG(MYDEBUG, + "- aMEntity = "<myMeshOnEntityMap; - MED::TEntityInfo::iterator anEntityIter = aEntityInfo.begin(); - for(; anEntityIter != aEntityInfo.end(); anEntityIter++){ - const MED::EEntiteMaillage& aMEntity = anEntityIter->first; - const MED::TGeom2Size& aGeom2Size = anEntityIter->second; - - TEntity aVEntity = MEDEntityToVTK(aMEntity); - PMEDMeshOnEntity aMeshOnEntity = aMeshOnEntityMap[aVEntity](new TMEDMeshOnEntity()); - aMeshOnEntity->myEntity = aVEntity; - aMeshOnEntity->myMeshName = aMeshName; - aMeshOnEntity->myGeom2Size = aGeom2Size; - - INITMSG(MYDEBUG,"aMEntity = "<