From 5a8838a67c5b1518e34f05fe68dac14dcebcc379 Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 11 Aug 2005 05:49:30 +0000 Subject: [PATCH] To split the large Build method into less parts. First step - extraction BuildMeshOnEntityMap functionality --- src/CONVERTOR/VISU_MedConvertor.cxx | 272 +++++++++++++++------------- 1 file changed, 149 insertions(+), 123 deletions(-) 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 = "<