From: apo Date: Mon, 15 Aug 2005 04:32:14 +0000 (+0000) Subject: To improve memory usage X-Git-Tag: BR-D5-38-2003_D2005-12-09~121 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=010925413a6429ba7c6e126429cd35d1e44f7b7f;p=modules%2Fvisu.git To improve memory usage - no VISU SubProfile data structure does not hold corresponding MED::ProfileInfo --- diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index aac143c6..e390193a 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -170,8 +170,6 @@ namespace aSubProfile->myNbCells = aProfileInfo->myElemNum.size(); aSubProfile->myName = aProfileInfo->GetName(); - aSubProfile->myProfileInfo = aProfileInfo; - aSubProfile->myStatus = eAddPart; } } @@ -1257,13 +1255,17 @@ LoadGaussMesh(const MED::PWrapper& theMed, if(aGaussInfo){ aName = aGaussInfo->GetName(); if(!aSubMeshID.empty()){ - MED::PProfileInfo aProfileInfo = aSubProfile->myProfileInfo; - const MED::TElemNum& anElemNum = aProfileInfo->myElemNum; - anIsGaussCoord3D = MED::GetGaussCoord3D(aGaussInfo, - aCellInfo, - aNodeInfo, - aGaussCoord, - anElemNum); + const std::string& aProfileName = aSubProfile->myName; + MED::PProfileInfo aProfileInfo = MED::GetProfileInfo(*theMed, + aProfileName); + if(aProfileInfo){ + const MED::TElemNum& anElemNum = aProfileInfo->myElemNum; + anIsGaussCoord3D = MED::GetGaussCoord3D(aGaussInfo, + aCellInfo, + aNodeInfo, + aGaussCoord, + anElemNum); + } }else anIsGaussCoord3D = MED::GetGaussCoord3D(aGaussInfo, aCellInfo, @@ -1272,12 +1274,16 @@ LoadGaussMesh(const MED::PWrapper& theMed, } }else{ if(!aSubMeshID.empty()){ - MED::PProfileInfo aProfileInfo = aSubProfile->myProfileInfo; - const MED::TElemNum& anElemNum = aProfileInfo->myElemNum; - anIsGaussCoord3D = MED::GetBaryCenter(aCellInfo, - aNodeInfo, - aGaussCoord, - anElemNum); + const std::string& aProfileName = aSubProfile->myName; + MED::PProfileInfo aProfileInfo = MED::GetProfileInfo(*theMed, + aProfileName); + if(aProfileInfo){ + const MED::TElemNum& anElemNum = aProfileInfo->myElemNum; + anIsGaussCoord3D = MED::GetBaryCenter(aCellInfo, + aNodeInfo, + aGaussCoord, + anElemNum); + } }else anIsGaussCoord3D = MED::GetBaryCenter(aCellInfo, aNodeInfo, diff --git a/src/CONVERTOR/VISU_MedConvertor.hxx b/src/CONVERTOR/VISU_MedConvertor.hxx index f97575f8..5bc6ff06 100644 --- a/src/CONVERTOR/VISU_MedConvertor.hxx +++ b/src/CONVERTOR/VISU_MedConvertor.hxx @@ -29,7 +29,6 @@ namespace VISU //--------------------------------------------------------------- struct TMEDSubProfile: virtual TSubProfileImpl { - MED::PProfileInfo myProfileInfo; MED::EGeometrieElement myMGeom; }; typedef SharedPtr PMEDSubProfile;