From: apo Date: Tue, 13 Sep 2005 08:25:39 +0000 (+0000) Subject: 1. First implementation of Min/Max filed's values calculation. X-Git-Tag: BR-D5-38-2003_D2005-12-10~205 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=904ac4f993539d09e2f15a443bc8f96189b3e639;p=modules%2Fvisu.git 1. First implementation of Min/Max filed's values calculation. 2. Porting to new MEDWrapper feature - iteration by Gauss Points values through components --- diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index eb9222d5..1e36439c 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -512,6 +512,59 @@ namespace } + //--------------------------------------------------------------- + void + CalculateMinMax(MED::PTimeStampVal theTimeStampVal, + PMEDField theField, + PMEDValForTime theValForTime) + { + TInt aNbComp = theField->myNbComp; + TMinMaxArr& aMinMaxArr = theField->myMinMaxArr; + const MED::TTimeStampVal& aTimeStampValRef = theTimeStampVal; + + PMEDProfile aProfile = theValForTime->myProfile; + TGeom2SubProfile& aGeom2SubProfile = aProfile->myGeom2SubProfile; + TGeom2SubProfile::const_iterator anIter = aGeom2SubProfile.begin(); + for(; anIter != aGeom2SubProfile.end(); anIter++){ + vtkIdType aVGeom = anIter->first; + PMEDSubProfile aSubProfile(anIter->second); + + TInt aNbElem = aSubProfile->myNbCells; + TInt aNbGauss = theValForTime->GetNbGauss(aVGeom); + + if(aSubProfile->myStatus != eRemoveAll){ + INITMSG(MYDEBUG, + "- aVGeom = "<myFieldMap; PMEDField aField = aFieldMap[aFieldName](new TMEDField()); aField->myId = iField; - aField->myNbComp = aNbComp; + aField->InitArrays(aNbComp); aField->myEntity = aVEntity; aField->myName = aFieldName; aField->myMeshName = aMeshName; aField->myDataSize = aMeshOnEntity->myNbCells * aNbComp; - aField->myCompNames.resize(aNbComp); - aField->myUnitNames.resize(aNbComp); INITMSG(MYDEBUG,"myName = '"<myName<<"'"<< "; myId = "<myId<< @@ -586,6 +637,10 @@ namespace aMeshOnEntity, aGeom2Size, aValForTime); + + CalculateMinMax(aTimeStampVal, + aField, + aValForTime); } } } @@ -1611,7 +1666,7 @@ LoadValForTime(const MED::PWrapper& theMed, theField->myDataSize = 0; - const MED::TTimeStampVal& aTimeVal = aTimeStampVal; + const MED::TTimeStampVal& aTimeStampValRef = aTimeStampVal; TGeom2SubProfile::const_iterator anIter = aGeom2SubProfile.begin(); for(; anIter != aGeom2SubProfile.end(); anIter++){ vtkIdType aVGeom = anIter->first; @@ -1633,10 +1688,10 @@ LoadValForTime(const MED::PWrapper& theMed, aVMeshValue.Init(aNbElem,aNbGauss,aNbComp); MED::EGeometrieElement aMGeom = aSubProfile->myMGeom; - const MED::TMeshValue& aMMeshValue = aTimeVal.GetMeshValue(aMGeom); + const MED::TMeshValue& aMMeshValue = aTimeStampValRef.GetMeshValue(aMGeom); for(TInt iElem = 0; iElem < aNbElem; iElem++){ TValueSliceArr aVValueSliceArr = aVMeshValue.GetGaussValueSliceArr(iElem); - MED::TCValueSliceArr aMValueSliceArr = aMMeshValue.GetValueSliceArr(iElem); + MED::TCValueSliceArr aMValueSliceArr = aMMeshValue.GetGaussValueSliceArr(iElem); ADDMSG(MYVALUEDEBUG,"{"); for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){ TValueSlice& aVValueSlice = aVValueSliceArr[iGauss];