static int MYTHREADDEBUG = 0;
static int MY_FAMILY_DEBUG = 0;
static int MY_GROUP_DEBUG = 0;
-//#define _DEXCEPT_
+#define _DEXCEPT_
#else
static int MYDEBUG = 0;
static int MYVALUEDEBUG = 0;
const MED::TGeom2Size& theGeom2Size,
VISU::TMEDValForTime& theValForTime)
{
+ TTimerLog aTimerLog("InitProfile");
INITMSG(MYDEBUG,"InitProfile"<<endl);
TProfileMap& aProfileMap = theMeshOnEntity.myProfileMap;
const MED::TGeom2Size& theGeom2Size,
VISU::TMEDValForTime& theValForTime)
{
+ TTimerLog aTimerLog("GetGaussKey");
INITMSG(MYDEBUG,"GetGaussKey"<<endl);
TGaussKey aGaussKey;
const MED::TGeom2Size& theGeom2Size,
VISU::TMEDValForTime& theValForTime)
{
+ TTimerLog aTimerLog("InitGaussMesh");
INITMSG(MYDEBUG,"InitGaussMesh"<<endl);
if(theMeshOnEntity.myEntity == NODE_ENTITY)
const MED::TGeom2Size& theGeom2Size,
VISU::TMEDValForTime& theValForTime)
{
+ TTimerLog aTimerLog("InitGaussProfile");
INITMSG(MYDEBUG,"InitGaussProfile"<<endl);
// The order of the function calls is important
const MED::PNodeInfo& theNodeInfo,
const MED::PWrapper& theMEDWrapper)
{
+ TTimerLog aTimerLog("BuildMeshOnEntityMap");
INITMSG(MYDEBUG,"BuildMeshOnEntityMap"<<endl);
MED::PMeshInfo aMeshInfo = theMesh->myMeshInfo;
const std::string& aMeshName = theMesh->myName;
const MED::TKey2Gauss& theKey2Gauss,
MED::PWrapper theMEDWrapper)
{
+ TTimerLog aTimerLog("BuildFieldMap");
TInt aNbFields = theMEDWrapper->GetNbFields();
MED::PMeshInfo aMeshInfo = theMesh->myMeshInfo;
const std::string& aMeshName = theMesh->myName;
INITMSG(MYDEBUG,"BuildFieldMap: aNbFields = "<<aNbFields<<"\n");
for(TInt iField = 1; iField <= aNbFields; iField++){
+ TTimerLog aTimerLog("BuildFieldMap - GetPFieldInfo");
MED::PFieldInfo aFieldInfo = theMEDWrapper->GetPFieldInfo(aMeshInfo,iField);
TInt aNbComp = aFieldInfo->GetNbComp();
std::string aFieldName = aFieldInfo->GetName();
MED::TGeom2Size aGeom2Size;
- MED::EEntiteMaillage aMEntity;
+ MED::EEntiteMaillage aMEntity = MED::EEntiteMaillage(-1);
TInt aNbTimeStamps = theMEDWrapper->GetNbTimeStamps(aFieldInfo,
theEntityInfo,
aMEntity,
aGeom2Size);
- if(aNbTimeStamps < 1)
+ if(int(aMEntity) < 0 || aNbTimeStamps < 1)
continue;
TEntity aVEntity = MEDEntityToVTK(aMEntity);
}
for(TInt iTimeStamp = 1; iTimeStamp <= aNbTimeStamps; iTimeStamp++){
+ TTimerLog aTimerLog("BuildFieldMap - GetPTimeStampInfo");
MED::PTimeStampInfo aTimeStampInfo = theMEDWrapper->GetPTimeStampInfo(aFieldInfo,
aMEntity,
aGeom2Size,
iTimeStamp);
TFloat aDt = aTimeStampInfo->GetDt();
std::string anUnitDt = aTimeStampInfo->GetUnitDt();
- MED::PTimeStampVal aTimeStampVal = theMEDWrapper->GetPTimeStampVal(aTimeStampInfo,
- theMKey2Profile,
- theKey2Gauss);
- TValField& aValField = aField->myValField;
- PMEDValForTime aValForTime = aValField[iTimeStamp](new TMEDValForTime());
- aValForTime->myId = iTimeStamp;
- aValForTime->myFieldName = aField->myName;
- aValForTime->myEntity = aField->myEntity;
- aValForTime->myMeshName = aField->myMeshName;
- aValForTime->myNbGauss = aTimeStampInfo->GetNbGauss();
- aValForTime->myTime = VISU::TTime(aDt,anUnitDt);
- INITMSG(MYDEBUG,"aDt = '"<<aDt<<", "<<anUnitDt<<"'\n");
-
- InitGaussProfile(theMEDWrapper,
- aMeshInfo,
- aTimeStampVal,
- aMeshOnEntity,
- aMEntity,
- aGeom2Size,
- aValForTime);
+ {
+ TTimerLog aTimerLog("BuildFieldMap - GetPTimeStampVal");
+ MED::PTimeStampVal aTimeStampVal = theMEDWrapper->GetPTimeStampVal(aTimeStampInfo,
+ theMKey2Profile,
+ theKey2Gauss);
+ TValField& aValField = aField->myValField;
+ PMEDValForTime aValForTime = aValField[iTimeStamp](new TMEDValForTime());
+ aValForTime->myId = iTimeStamp;
+ aValForTime->myFieldName = aField->myName;
+ aValForTime->myEntity = aField->myEntity;
+ aValForTime->myMeshName = aField->myMeshName;
+ aValForTime->myNbGauss = aTimeStampInfo->GetNbGauss();
+ aValForTime->myTime = VISU::TTime(aDt,anUnitDt);
+ INITMSG(MYDEBUG,"aDt = '"<<aDt<<", "<<anUnitDt<<"'\n");
+
+ InitGaussProfile(theMEDWrapper,
+ aMeshInfo,
+ aTimeStampVal,
+ aMeshOnEntity,
+ aMEntity,
+ aGeom2Size,
+ aValForTime);
+ }
}
}
}
const MED::TFamilyInfoSet& theFamilyInfoSet,
MED::PWrapper theMEDWrapper)
{
+ TTimerLog aTimerLog("BuildFamilyMap");
INITMSG(MYDEBUG,"BuildFamilyMap\n");
MED::PMeshInfo aMeshInfo = theMesh->myMeshInfo;
MED::TEntity2FamilySet aEntity2FamilySet = MED::GetEntity2FamilySet(theMEDWrapper,theEntity2TGeom2ElemInfo,theFamilyInfoSet);
BuildGroupMap(PMEDMesh theMesh,
const MED::TFamilyInfoSet& theFamilyInfoSet)
{
- INITMSG(MYDEBUG,"BuildGroupMap:\n");
+ TTimerLog aTimerLog("BuildGroupMap");
+ INITMSG(MYDEBUG,"BuildGroupMap\n");
TGroupMap& aGroupMap = theMesh->myGroupMap;
MED::TGroupInfo aGroupInfo = MED::GetGroupInfo(theFamilyInfoSet);
MED::TGroupInfo::const_iterator aGroupInfoIter = aGroupInfo.begin();
VISU_MedConvertor
::Build()
{
+ TTimerLog aTimerLog("Build");
MED::PWrapper aMed = MED::CrWrapper(myFileInfo.absFilePath().latin1());
MED::TKey2Gauss aKey2Gauss = MED::GetKey2Gauss(aMed);
BuildGroupMap(aMesh,
aFamilyInfoSet);
#endif
-
PCalculateMinMax aCalculateMinMax(new TCalculateMinMax(aMesh,
aEntityInfo,
aMKey2Profile,
aKey2Gauss,
aMed));
-
+
boost::thread aThread(boost::bind(&CalculateMinMax,aCalculateMinMax));
#ifndef _DEXCEPT_
}catch(std::exception& exc){
::LoadMeshOnEntity(VISU::PMeshImpl theMesh,
VISU::PMeshOnEntityImpl theMeshOnEntity)
{
+ TTimerLog aTimerLog("LoadMeshOnEntity");
MED::PWrapper aMed = MED::CrWrapper(myFileInfo.absFilePath().latin1());
const TEntity& anEntity = theMeshOnEntity->myEntity;
VISU::PMeshOnEntityImpl theMeshOnEntity,
VISU::PFamilyImpl theFamily)
{
+ TTimerLog aTimerLog("LoadFamilyOnEntity");
MED::PWrapper aMed = MED::CrWrapper(myFileInfo.absFilePath().latin1());
const TEntity& anEntity = theMeshOnEntity->myEntity;
::LoadMeshOnGroup(VISU::PMeshImpl theMesh,
const VISU::TFamilySet& theFamilySet)
{
+ TTimerLog aTimerLog("LoadMeshOnGroup");
MED::PWrapper aMed = MED::CrWrapper(myFileInfo.absFilePath().latin1());
int isPointsUpdated = 0, isCellsOnEntityUpdated = 0;
TFamilySet::const_iterator aFamilyIter = theFamilySet.begin();
VISU::PFieldImpl theField,
VISU::PValForTimeImpl theValForTime)
{
+ TTimerLog aTimerLog("LoadValForTimeOnMesh");
MED::PWrapper aMed = MED::CrWrapper(myFileInfo.absFilePath().latin1());
const TEntity& anEntity = theMeshOnEntity->myEntity;
VISU::PFieldImpl theField,
VISU::PValForTimeImpl theValForTime)
{
+ TTimerLog aTimerLog("LoadValForTimeOnGaussPts");
MED::PWrapper aMed = MED::CrWrapper(myFileInfo.absFilePath().latin1());
const TEntity& anEntity = theMeshOnEntity->myEntity;
::LoadPoints(const MED::PWrapper& theMed,
VISU::PMEDMesh theMesh)
{
+ TTimerLog aTimerLog("LoadValForTimeOnGaussPts");
try{
//Check on existing family
PMEDMeshOnEntity aMeshOnEntity = theMesh->myMeshOnEntityMap[VISU::NODE_ENTITY];
const VISU::PMEDMesh theMesh,
const VISU::PMEDFamily theFamily)
{
+ TTimerLog aTimerLog("LoadPointsOnFamily");
try{
if(theFamily->myIsDone)
return 0;
const VISU::PMEDMesh theMesh,
const VISU::PMEDMeshOnEntity theMeshOnEntity)
{
+ TTimerLog aTimerLog("LoadCellsOnEntity");
#ifndef _DEXCEPT_
try{
#endif
const VISU::PMEDMeshOnEntity theMeshOnEntity,
const VISU::PMEDFamily theFamily)
{
+ TTimerLog aTimerLog("LoadCellsOnFamily");
#ifndef _DEXCEPT_
try{
#endif
VISU::TMEDValForTime& theValForTime,
VISU::TMEDMeshOnEntity& theMeshOnEntity)
{
+ TTimerLog aTimerLog("LoadProfile");
INITMSG(MYDEBUG,"LoadProfile"<<endl);
PMEDProfile aProfile = theValForTime.myProfile;
VISU::TMEDValForTime& theValForTime,
VISU::TMEDMeshOnEntity& theMeshOnEntity)
{
+ TTimerLog aTimerLog("LoadGaussMesh");
INITMSG(MYDEBUG,"LoadGaussMesh"<<endl);
PMEDGaussMesh aGaussMesh = theValForTime.myGaussMesh;
bool theIsGauss,
bool& theIsDone)
{
+ TTimerLog aTimerLog("LoadValForTime");
INITMSG(MYDEBUG,"LoadValForTime - theIsGauss = "<<theIsGauss<<endl);
//Check on loading already done
VISU::PMEDField theField,
VISU::PMEDValForTime theValForTime)
{
+ TTimerLog aTimerLog("LoadValForTimeOnMesh");
PIDMapperFilter anIDMapperFilter = theValForTime->myIDMapperFilter;
return LoadValForTime(theMed,
theMesh,
VISU::PMEDField theField,
VISU::PMEDValForTime theValForTime)
{
+ TTimerLog aTimerLog("LoadValForTimeOnGaussPts");
PGaussPtsIDFilter aGaussPtsIDFilter = theValForTime->myGaussPtsIDFilter;
return LoadValForTime(theMed,
theMesh,