#include "MED_GaussUtils.hxx"
#include "MED_Utilities.hxx"
-#include <boost/thread/thread.hpp>
-#include <boost/bind.hpp>
+#include "CASCatch_CatchSignals.hxx"
#include <vtkCellType.h>
INITMSG(MYDEBUG,"- iTimeStamp = "<<iTimeStamp<<endl);
#ifndef _DEXCEPT_
- try{
+ CASCatch_TRY{
+ try{
#endif
- MED::PTimeStampInfo aTimeStampInfo = aMed->GetPTimeStampInfo(aFieldInfo,
- aMEntity,
- aGeom2Size,
- iTimeStamp);
-
- MED::PTimeStampVal aTimeStampVal = aMed->GetPTimeStampVal(aTimeStampInfo,
- aMKey2Profile,
- aKey2Gauss);
-
- const MED::TGeom2Gauss& aGeom2Gauss = aTimeStampInfo->GetGeom2Gauss();
-
- const MED::TTimeStampVal& aTimeStampValRef = aTimeStampVal;
-
- const MED::TGeom2Value& aGeom2Value = aTimeStampValRef.myGeom2Value;
- MED::TGeom2Value::const_iterator anIter = aGeom2Value.begin();
- for(; anIter != aGeom2Value.end(); anIter++){
- const MED::TMeshValue& aMMeshValue = anIter->second;
- MED::EGeometrieElement aMGeom = anIter->first;
+ MED::PTimeStampInfo aTimeStampInfo = aMed->GetPTimeStampInfo(aFieldInfo,
+ aMEntity,
+ aGeom2Size,
+ iTimeStamp);
- TInt aNbElem = aMMeshValue.myNbElem;
- TInt aNbGauss = aMMeshValue.myNbGauss;
+ MED::PTimeStampVal aTimeStampVal = aMed->GetPTimeStampVal(aTimeStampInfo,
+ aMKey2Profile,
+ aKey2Gauss);
- MED::TGeom2Gauss::const_iterator aGaussIter = aGeom2Gauss.find(aMGeom);
- if(aGaussIter == aGeom2Gauss.end())
- aNbGauss = 1;
+ const MED::TGeom2Gauss& aGeom2Gauss = aTimeStampInfo->GetGeom2Gauss();
- INITMSG(MYDEBUG,
- "- aMGeom = "<<aMGeom<<
- "; aNbElem = "<<aNbElem<<
- "; aNbGauss = "<<aNbGauss<<
- endl);
+ const MED::TTimeStampVal& aTimeStampValRef = aTimeStampVal;
- // To calculate min/max per components
- for(TInt iElem = 0; iElem < aNbElem; iElem++){
- MED::TCValueSliceArr aMValueSliceArr = aMMeshValue.GetCompValueSliceArr(iElem);
- for(TInt iComp = 0; iComp < aNbComp; iComp++){
- const MED::TCValueSlice& aMValueSlice = aMValueSliceArr[iComp];
- TMinMax& aMinMax = aMinMaxArr[iComp+1];
- float& aMin = aMinMax.first;
- float& aMax = aMinMax.second;
- for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
- const float& aVal = aMValueSlice[iGauss];
- aMin = min(aMin,aVal);
- aMax = max(aMax,aVal);
+ const MED::TGeom2Value& aGeom2Value = aTimeStampValRef.myGeom2Value;
+ MED::TGeom2Value::const_iterator anIter = aGeom2Value.begin();
+ for(; anIter != aGeom2Value.end(); anIter++){
+ const MED::TMeshValue& aMMeshValue = anIter->second;
+ MED::EGeometrieElement aMGeom = anIter->first;
+
+ TInt aNbElem = aMMeshValue.myNbElem;
+ TInt aNbGauss = aMMeshValue.myNbGauss;
+
+ MED::TGeom2Gauss::const_iterator aGaussIter = aGeom2Gauss.find(aMGeom);
+ if(aGaussIter == aGeom2Gauss.end())
+ aNbGauss = 1;
+
+ INITMSG(MYDEBUG,
+ "- aMGeom = "<<aMGeom<<
+ "; aNbElem = "<<aNbElem<<
+ "; aNbGauss = "<<aNbGauss<<
+ endl);
+
+ // To calculate min/max per components
+ for(TInt iElem = 0; iElem < aNbElem; iElem++){
+ MED::TCValueSliceArr aMValueSliceArr = aMMeshValue.GetCompValueSliceArr(iElem);
+ for(TInt iComp = 0; iComp < aNbComp; iComp++){
+ const MED::TCValueSlice& aMValueSlice = aMValueSliceArr[iComp];
+ TMinMax& aMinMax = aMinMaxArr[iComp+1];
+ float& aMin = aMinMax.first;
+ float& aMax = aMinMax.second;
+ for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
+ const float& aVal = aMValueSlice[iGauss];
+ aMin = min(aMin,aVal);
+ aMax = max(aMax,aVal);
+ }
}
}
- }
-
- // To calculate min/max per vector modulus
- TMinMax& aMinMax = aMinMaxArr[0];
- float& aMin = aMinMax.first;
- float& aMax = aMinMax.second;
- for(TInt iElem = 0; iElem < aNbElem; iElem++){
- MED::TCValueSliceArr aMValueSliceArr = aMMeshValue.GetGaussValueSliceArr(iElem);
- for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
- const MED::TCValueSlice& aMValueSlice = aMValueSliceArr[iGauss];
- float aValue = 0.0;
- for(TInt iComp = 0; iComp < aNbComp2; iComp++){
- float aVal = aMValueSlice[iComp];
- aValue += aVal*aVal;
+
+ // To calculate min/max per vector modulus
+ TMinMax& aMinMax = aMinMaxArr[0];
+ float& aMin = aMinMax.first;
+ float& aMax = aMinMax.second;
+ for(TInt iElem = 0; iElem < aNbElem; iElem++){
+ MED::TCValueSliceArr aMValueSliceArr = aMMeshValue.GetGaussValueSliceArr(iElem);
+ for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
+ const MED::TCValueSlice& aMValueSlice = aMValueSliceArr[iGauss];
+ float aValue = 0.0;
+ for(TInt iComp = 0; iComp < aNbComp2; iComp++){
+ float aVal = aMValueSlice[iComp];
+ aValue += aVal*aVal;
+ }
+ aValue = sqrt(aValue);
+ aMin = min(aMin,aValue);
+ aMax = max(aMax,aValue);
}
- aValue = sqrt(aValue);
- aMin = min(aMin,aValue);
- aMax = max(aMax,aValue);
}
}
- }
#ifndef _DEXCEPT_
- }catch(std::exception& exc){
- MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
- }catch(...){
- MSG(MYDEBUG,"Unknown exception !!!");
+ }catch(std::exception& exc){
+ MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
+ }catch(...){
+ MSG(MYDEBUG,"Unknown exception !!!");
+ }
+ }CASCatch_CATCH(Standard_Failure){
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+ MSG(MYDEBUG,"Follow signal was occured in:\n"<<aFail->GetMessageString());
}
#endif
}