static int MYDEBUG = 0;
#endif
-//#define _DEXCEPT_
+#define _DEXCEPT_
void parseFile(const char* theFileName) {
#ifndef _DEXCEPT_
{
//---------------------------------------------------------------
TIsVTKDone::TIsVTKDone():
- myIsVTKDone(false)
+ myIsVTKDone(false),
+ myIsDone(false)
{}
PGaussImpl aGauss = theGaussSubMesh->myGauss;
INITMSG(MYDEBUG,"GetGaussSubMesh - aGeom = "<<aGauss->myGeom<<endl);
+ if(!theGaussSubMesh->myIsDone)
+ return;
+
if(theGaussSubMesh->myIsVTKDone)
return;
- TVTKSource& aSource = theGaussSubMesh->mySource;
+ TVTKSource& aSource = theGaussSubMesh->mySource;
GetSource(aSource,theGaussSubMesh,theMeshOnEntity);
INITMSGA(MYDEBUG,0,"GetNumberOfPoints - "<<aSource->GetNumberOfPoints()<<endl);
BEGMSG(MYDEBUG,"GetNumberOfCells - "<<aSource->GetNumberOfCells()<<endl);
struct TIsVTKDone: virtual TBaseStructure
{
TIsVTKDone();
+ bool myIsDone;
bool myIsVTKDone;
};
PMEDFamily aFamily = GetFamily(aMeshOnEntity,theFamilyName);
//Check on loading already done
- if(theMesh->myIsMEDDone)
+ if(theMesh->myIsDone)
if(!aFamily)
return 0;
- else if(!aFamily->myIsMEDDone)
+ else if(!aFamily->myIsDone)
return 0;
- INITMSG(MYDEBUG,"LoadPoints - theMesh->myIsMEDDone = "<<theMesh->myIsMEDDone<<
+ INITMSG(MYDEBUG,"LoadPoints - theMesh->myIsDone = "<<theMesh->myIsDone<<
"; theFamilyName = '"<<theFamilyName<<"'\n");
//Main part of code
MED::PNodeInfo aNodeInfo = theMed->GetPNodeInfo(theMesh->myMeshInfo);
TInt aNbElem = aNodeInfo->GetNbElem();
- if(!theMesh->myIsMEDDone){
+ if(!theMesh->myIsDone){
TInt aDim = theMesh->myDim;
TNamedPointCoords& aCoords = theMesh->myNamedPointCoords;
for (int iElem = 0; iElem < aNbElem; iElem++)
aConnForCellType[iElem] = VISU::TConnect(1,iElem);
- theMesh->myIsMEDDone = true;
+ theMesh->myIsDone = true;
}
if(aFamily){
- if(!aFamily->myIsMEDDone){
+ if(!aFamily->myIsDone){
if(aNbElem > 0){
TSubMeshID& aSubMeshID = aFamily->myGeom2SubMeshID[VTK_VERTEX];
for (int iElem = 0; iElem < aNbElem; iElem++)
if(aNodeInfo->GetFamNum(iElem) == aFamily->myId)
aSubMeshID.push_back(iElem);
}
- aFamily->myIsMEDDone = true;
+ aFamily->myIsDone = true;
}
}
INITMSG(MYDEBUG,"LoadProfile"<<endl);
PMEDProfile aProfile = theValForTime.myProfile;
- if(aProfile->myIsMEDDone)
+ if(aProfile->myIsDone)
return;
const TGeom2SubProfile& aGeom2SubProfile = aProfile->myGeom2SubProfile;
}
}
- aProfile->myIsMEDDone = true;
+ aProfile->myIsDone = true;
}
INITMSG(MYDEBUG,"LoadGaussMesh"<<endl);
PMEDGaussMesh aGaussMesh = theValForTime.myGaussMesh;
- if(aGaussMesh->myIsMEDDone)
+ if(aGaussMesh->myIsDone)
return;
const MED::PMeshInfo& aMeshInfo = theMesh->myMeshInfo;
if(anIter2 != aGeom2GaussSubMesh.end()){
PMEDGaussSubMesh aGaussSubMesh = anIter2->second;
+ if(aGaussSubMesh->myIsDone)
+ continue;
+
PMEDGauss aGauss = aGaussSubMesh->myGauss;
MED::PGaussInfo aGaussInfo = aGauss->myGaussInfo;
aSlice[aDimId] = aCoordSlice[aDimId];
}
}
-
+
+ aGaussSubMesh->myIsDone = true;;
+
INITMSG(MYDEBUG,
"- aVGeom = "<<aVGeom<<
"; aName = '"<<aGaussInfo->GetName()<<"'"<<
"; aNbCells = "<<aNbCells<<
endl);
}
+
}else{
INITMSG(MYDEBUG,
}
}
- aGaussMesh->myIsMEDDone = true;
+ aGaussMesh->myIsDone = true;
}
INITMSG(MYDEBUG,"LoadField"<<endl);
//Check on loading already done
- if(theValForTime->myIsMEDDone)
+ if(theValForTime->myIsDone)
return 0;
//Main part of code
}
}
- theValForTime->myIsMEDDone = true;
+ theValForTime->myIsDone = true;
return 1;
}
namespace VISU
{
//---------------------------------------------------------------
- struct TIsMEDDone: virtual TBaseStructure
- {
- bool myIsMEDDone;
- TIsMEDDone():
- myIsMEDDone(false)
- {}
- };
-
-
- //---------------------------------------------------------------
- struct TMEDMesh: virtual TMeshImpl, virtual TIsMEDDone
+ struct TMEDMesh: virtual TMeshImpl
{
MED::PMeshInfo myMeshInfo;
MED::TEntityInfo myEntityInfo;
//---------------------------------------------------------------
- struct TMEDProfile: virtual TProfileImpl, virtual TIsMEDDone
+ struct TMEDProfile: virtual TProfileImpl
{};
typedef SharedPtr<TMEDProfile> PMEDProfile;
//---------------------------------------------------------------
- struct TMEDGaussMesh: virtual TGaussMeshImpl, virtual TIsMEDDone
+ struct TMEDGaussMesh: virtual TGaussMeshImpl
{};
typedef SharedPtr<TMEDGaussMesh> PMEDGaussMesh;
//---------------------------------------------------------------
- struct TMEDFamily: virtual TFamilyImpl, virtual TIsMEDDone
+ struct TMEDFamily: virtual TFamilyImpl
{};
typedef SharedPtr<TMEDFamily> PMEDFamily;
//---------------------------------------------------------------
- struct TMEDValForTime: virtual TValForTimeImpl, virtual TIsMEDDone
+ struct TMEDValForTime: virtual TValForTimeImpl
{};
typedef SharedPtr<TMEDValForTime> PMEDValForTime;
PCFamily aFamily = GetFamily(aMeshOnEntity,theFamilyName);
//Check on loading already done
- if(theMesh->myIsCDone)
+ if(theMesh->myIsDone)
if(!aFamily)
return 0;
- else if(!aFamily->myIsCDone)
+ else if(!aFamily->myIsDone)
return 0;
if(MYDEBUG)
throw std::runtime_error("LoadPoints >> There is no points in the mesh !!!");
SALOME_MED::double_array_var aCCoord = aMedMesh->getCoordinates(SALOME_MED::MED_FULL_INTERLACE);
- if(!theMesh->myIsCDone){
+ if(!theMesh->myIsDone){
for(int iElem = 0, anId = 0; iElem < aNbElem; iElem++){
VISU::TCoordSlice aCoordSlice = aCoords.GetCoordSlice(iElem);
for(int iDim = 0; iDim < aDim; iDim++)
for(int iElem = 0; iElem < aNbElem; iElem++)
aCell2Connect[iElem] = TConnect(1,iElem);
- theMesh->myIsCDone = true;
+ theMesh->myIsDone = true;
}
if(aFamily){
- if(!aFamily->myIsCDone){
+ if(!aFamily->myIsDone){
if(MYDEBUG) MESSAGE("LoadPoints - Filling aFamily Geom2SubMeshID");
SALOME_MED::FAMILY_var aMedFamily = aFamily->myFamily;
}
}
- aFamily->myIsCDone = true;
+ aFamily->myIsDone = true;
}
}
VISU::PCValForTime theValForTime)
{
//Check on loading already done
- if(theValForTime->myIsCDone)
+ if(theValForTime->myIsDone)
return 0;
SALOME_MED::FIELD_var aMEDField = theValForTime->myField;
if(MYDEBUG) MESSAGE("VISU_MEDConvertor::LoadField - There is FIELDINT = "<<anArray->length());
::ImportField(anArray,theMesh,theField,theValForTime,theMeshOnEntity);
}
+
+ theValForTime->myIsDone = true;
+
return 1;
}
namespace VISU
{
//---------------------------------------------------------------
- struct TIsCDone: virtual TBaseStructure
- {
- bool myIsCDone;
- TIsCDone():
- myIsCDone(false)
- {}
- };
-
-
- //---------------------------------------------------------------
- struct TCMesh: virtual TMeshImpl, virtual TIsCDone
+ struct TCMesh: virtual TMeshImpl
{
SALOME_MED::MESH_var myMesh;
};
//---------------------------------------------------------------
- struct TCMeshOnEntity: virtual TMeshOnEntityImpl, virtual TIsCDone
+ struct TCMeshOnEntity: virtual TMeshOnEntityImpl
{
SALOME_MED::SUPPORT_var mySupport;
typedef std::pair<int,int> TIndexAndSize;
//---------------------------------------------------------------
- struct TCFamily: virtual TFamilyImpl, virtual TIsCDone
+ struct TCFamily: virtual TFamilyImpl
{
SALOME_MED::FAMILY_var myFamily;
};
//---------------------------------------------------------------
- struct TCValForTime: virtual TValForTimeImpl, virtual TIsCDone
+ struct TCValForTime: virtual TValForTimeImpl
{
SALOME_MED::FIELD_var myField;
};