::GetNbGauss(vtkIdType theGeom) const
{
PGaussMeshImpl aGaussMesh = myGaussMesh;
- const TGeom2GaussSubMesh& aGeom2GaussSubMesh = aGaussMesh->myGeom2GaussSubMesh;
- TGeom2GaussSubMesh::const_iterator anIter = aGeom2GaussSubMesh.find(theGeom);
- if(anIter != aGeom2GaussSubMesh.end()){
- PGaussSubMesh aGaussSubMesh = anIter->second;
- PGaussImpl aGauss = aGaussSubMesh->myGauss;
- return aGauss->myNbPoints;
+ if(aGaussMesh){
+ const TGeom2GaussSubMesh& aGeom2GaussSubMesh = aGaussMesh->myGeom2GaussSubMesh;
+ TGeom2GaussSubMesh::const_iterator anIter = aGeom2GaussSubMesh.find(theGeom);
+ if(anIter != aGeom2GaussSubMesh.end()){
+ PGaussSubMesh aGaussSubMesh = anIter->second;
+ PGaussImpl aGauss = aGaussSubMesh->myGauss;
+ return aGauss->myNbPoints;
+ }
}
return myNbGauss;
}
PProfileImpl aProfile = aValForTime->myProfile;
PGaussMeshImpl aGaussMesh = aValForTime->myGaussMesh;
- const TGeom2GaussSubMesh& aGeom2GaussSubMesh = aGaussMesh->myGeom2GaussSubMesh;
- INITMSG(MYDEBUG,"aGeom2GaussSubMesh.size() = "<<aGeom2GaussSubMesh.size()<<endl);
- if(aGeom2GaussSubMesh.empty()){
+ INITMSG(MYDEBUG,"aGaussMesh = "<<bool(aGaussMesh)<<endl);
+ if(!aGaussMesh){
GetMeshOnProfile(aMesh,aVTKMeshOnEntity,aProfile);
TVTKAppendFilter& anAppendFilter = aProfile->myFilter;
aSource->ShallowCopy(anAppendFilter->GetOutput());
GetTimeStampOnProfile(aSource,aField,aValForTime);
}else{
+ const TGeom2GaussSubMesh& aGeom2GaussSubMesh = aGaussMesh->myGeom2GaussSubMesh;
GetGaussMesh(aMesh,aVTKMeshOnEntity,aGaussMesh);
TVTKAppendFilter& anAppendFilter = aGaussMesh->myFilter;
using MED::EBooleen;
#ifdef _DEBUG_
-static int MYDEBUG = 1;
+static int MYDEBUG = 0;
static int MY_FAMILY_DEBUG = 0;
static int MY_GROUP_DEBUG = 0;
#else
{
INITMSG(MYDEBUG,"GetGaussKey"<<endl);
+ TGaussKey aGaussKey;
PMEDProfile aProfile = theValForTime.myProfile;
TGeom2SubProfile& aGeom2SubProfile = aProfile->myGeom2SubProfile;
- TGaussKey aGaussKey;
const MED::TGeom2Profile& aGeom2Profile = theTimeStampVal.GetGeom2Profile();
const MED::TTimeStampInfo& aTimeStampInfo = theTimeStampVal.GetTimeStampInfo();
const MED::TGeom2Gauss& aGeom2Gauss = aTimeStampInfo.GetGeom2Gauss();
INITMSG(MYDEBUG,"anIter2 == aGeom2SubProfile.end!!"<<endl);
continue;
}
+ PMEDSubProfile aSubProfile = anIter2->second;
MED::TGeom2Size::const_iterator aTimeStampIter = theGeom2Size.find(aMGeom);
if(aTimeStampIter != theGeom2Size.end()){
- MED::TGeom2Gauss::const_iterator aGaussIter = aGeom2Gauss.find(aMGeom);
- if(aGaussIter != aGeom2Gauss.end()){
- PMEDGaussSubMesh aGaussSubMesh(new TMEDGaussSubMesh());
-
- PMEDSubProfile aSubProfile = anIter2->second;
- aGaussSubMesh->mySubProfile = aSubProfile;
- aGaussSubMesh->myStatus = aSubProfile->myStatus;
+ TInt aNbCells = aTimeStampIter->second;
+
+ PMEDGaussSubMesh aGaussSubMesh(new TMEDGaussSubMesh());
+ aGaussSubMesh->mySubProfile = aSubProfile;
+ aGaussSubMesh->myStatus = aSubProfile->myStatus;
- PMEDGauss aGauss(new TMEDGauss());
- aGaussSubMesh->myGauss = aGauss;
- aGauss->myGeom = aVGeom;
+ PMEDGauss aGauss(new TMEDGauss());
+ aGaussSubMesh->myGauss = aGauss;
+ aGauss->myGeom = aVGeom;
+
+ TInt aNbGauss = 1;
+ std::string aName;
+ MED::TGeom2Gauss::const_iterator aGaussIter = aGeom2Gauss.find(aMGeom);
+ if(aGaussIter != aGeom2Gauss.end()){
MED::PGaussInfo aGaussInfo = aGaussIter->second;
aGauss->myGaussInfo = aGaussInfo;
-
- std::string aName = aGaussInfo->GetName();
- aGauss->myName = aName;
-
- TInt aNbCells = aTimeStampIter->second;
- TInt aNbGauss = aGaussInfo->GetNbGauss();
- aGauss->myNbPoints = aNbGauss;
-
- aGaussSubMesh->myNbCells = aNbCells*aNbGauss;
- aGaussSubMesh->myCellsSize = aGaussSubMesh->myNbCells*2;
-
- INITMSGA(MYDEBUG,0,
- "- aVGeom = "<<aVGeom<<
- "; aName = '"<<aName<<"'"<<
- "; aNbGauss = "<<aNbGauss<<
- "; aStatus = "<<aGaussSubMesh->myStatus<<
- "; aNbCells = "<<aGaussSubMesh->myNbCells<<
- "; aCellsSize = "<<aGaussSubMesh->myCellsSize<<
- endl);
-
- aGaussKey.insert(aGaussSubMesh);
+ aName = aGauss->myName = aGaussInfo->GetName();
+ aNbGauss = aGauss->myNbPoints = aGaussInfo->GetNbGauss();
}
+
+ aGauss->myNbPoints = aNbGauss;
+ aGaussSubMesh->myNbCells = aNbCells*aNbGauss;
+ aGaussSubMesh->myCellsSize = aGaussSubMesh->myNbCells*2;
+
+ aGaussKey.insert(aGaussSubMesh);
+
+ INITMSGA(MYDEBUG,0,
+ "- aVGeom = "<<aVGeom<<
+ "; aName = '"<<aName<<"'"<<
+ "; aNbGauss = "<<aNbGauss<<
+ "; aStatus = "<<aGaussSubMesh->myStatus<<
+ "; aNbCells = "<<aGaussSubMesh->myNbCells<<
+ "; aCellsSize = "<<aGaussSubMesh->myCellsSize<<
+ endl);
}
}
VISU::TMEDValForTime& theValForTime)
{
INITMSG(MYDEBUG,"InitGaussMesh"<<endl);
-
+
+ if(theMeshOnEntity.myEntity == NODE_ENTITY)
+ return;
+
TGaussMeshMap& aGaussMeshMap = theMeshOnEntity.myGaussMeshMap;
TGaussKey aGaussKey = GetGaussKey(theTimeStampVal,
INITMSG(MYDEBUG,"LoadGaussMesh"<<endl);
PMEDGaussMesh aGaussMesh = theValForTime.myGaussMesh;
- if(aGaussMesh->myIsDone)
+ if(!aGaussMesh || aGaussMesh->myIsDone)
return;
const MED::PMeshInfo& aMeshInfo = theMesh->myMeshInfo;
const TGeom2GaussSubMesh& aGeom2GaussSubMesh = aGaussMesh->myGeom2GaussSubMesh;
const MED::TTimeStampInfo& aTimeStampInfo = theTimeStampVal.GetTimeStampInfo();
const MED::TGeom2Gauss& aGeom2Gauss = aTimeStampInfo.GetGeom2Gauss();
- MED::TGeom2Gauss::const_iterator anIter = aGeom2Gauss.begin();
- for(; anIter != aGeom2Gauss.end(); anIter++){
- MED::PGaussInfo aGaussInfo = anIter->second;
- MED::EGeometrieElement aMGeom = anIter->first;
- vtkIdType aVGeom = MEDGeomToVTK(aMGeom);
- TGeom2GaussSubMesh::const_iterator anIter2 = aGeom2GaussSubMesh.find(aVGeom);
- if(anIter2 != aGeom2GaussSubMesh.end()){
- PMEDGaussSubMesh aGaussSubMesh = anIter2->second;
+ TGeom2GaussSubMesh::const_iterator aSubMeshIter = aGeom2GaussSubMesh.begin();
+ for(; aSubMeshIter != aGeom2GaussSubMesh.end(); aSubMeshIter++){
+ PMEDGaussSubMesh aGaussSubMesh = aSubMeshIter->second;
+ vtkIdType aVGeom = aSubMeshIter->first;
+
+ if(aGaussSubMesh->myIsDone)
+ continue;
+
+ PMEDSubProfile aSubProfile = aGaussSubMesh->mySubProfile;
+ const TSubMeshID& aSubMeshID = aSubProfile->mySubMeshID;
+ MED::EGeometrieElement aMGeom = aSubProfile->myMGeom;
- if(aGaussSubMesh->myIsDone)
- continue;
+ MED::PCellInfo aCellInfo = theMed->GetPCellInfo(aMeshInfo,
+ aMEntity,
+ aMGeom);
+
+ std::string aName;
+ MED::TGaussCoord aGaussCoord;
+ bool anIsGaussCoord3D = false;
+ MED::TGeom2Gauss::const_iterator aGaussIter = aGeom2Gauss.find(aMGeom);
+ if(aGaussIter != aGeom2Gauss.end()){
PMEDGauss aGauss = aGaussSubMesh->myGauss;
MED::PGaussInfo aGaussInfo = aGauss->myGaussInfo;
-
if(aGaussInfo){
- MED::PCellInfo aCellInfo = theMed->GetPCellInfo(aMeshInfo,
- aMEntity,
- aMGeom);
-
- MED::TGaussCoord aGaussCoord;
-
- PMEDSubProfile aSubProfile = aGaussSubMesh->mySubProfile;
- const TSubMeshID& aSubMeshID = aSubProfile->mySubMeshID;
-
- bool anIsGaussCoord3D = false;
+ aName = aGaussInfo->GetName();
if(!aSubMeshID.empty()){
MED::PProfileInfo aProfileInfo = aSubProfile->myProfileInfo;
const MED::TElemNum& anElemNum = aProfileInfo->myElemNum;
aCellInfo,
aNodeInfo,
aGaussCoord);
-
- if(anIsGaussCoord3D){
- TPointCoords& aCoords = aGaussSubMesh->myPointCoords;
- TInt aNbGauss = aGaussCoord.GetNbGauss();
- TInt aNbElem = aGaussCoord.GetNbElem();
- TInt aDim = aGaussCoord.GetDim();
- vtkIdType aNbCells = aNbElem*aNbGauss;
- aCoords.Init(aNbCells,aDim);
- for(TInt anElemId = 0, aNodeId = 0; anElemId < aNbElem; anElemId++){
- MED::TCoordSliceArr aCoordSliceArr = aGaussCoord.GetCoordSliceArr(anElemId);
- for(TInt aGaussId = 0; aGaussId < aNbGauss; aGaussId++, aNodeId++){
- MED::TCoordSlice aCoordSlice = aCoordSliceArr[aGaussId];
- TCoordSlice aSlice = aCoords.GetCoordSlice(aNodeId);
- for(TInt aDimId = 0; aDimId < aDim; aDimId++)
- aSlice[aDimId] = aCoordSlice[aDimId];
- }
- }
-
- aGaussSubMesh->myIsDone = true;;
-
- INITMSG(MYDEBUG,
- "- aVGeom = "<<aVGeom<<
- "; aName = '"<<aGaussInfo->GetName()<<"'"<<
- "; aStatus = "<<aGaussSubMesh->myStatus<<
- "; aNbCells = "<<aNbCells<<
- endl);
+ }
+ }else{
+ if(!aSubMeshID.empty()){
+ MED::PProfileInfo aProfileInfo = aSubProfile->myProfileInfo;
+ const MED::TElemNum& anElemNum = aProfileInfo->myElemNum;
+ anIsGaussCoord3D = MED::GetBaryCenter(aCellInfo,
+ aNodeInfo,
+ aGaussCoord,
+ anElemNum);
+ }else
+ anIsGaussCoord3D = MED::GetBaryCenter(aCellInfo,
+ aNodeInfo,
+ aGaussCoord);
+ }
+
+ if(anIsGaussCoord3D){
+ TPointCoords& aCoords = aGaussSubMesh->myPointCoords;
+ TInt aNbGauss = aGaussCoord.GetNbGauss();
+ TInt aNbElem = aGaussCoord.GetNbElem();
+ TInt aDim = aGaussCoord.GetDim();
+ vtkIdType aNbCells = aNbElem*aNbGauss;
+ aCoords.Init(aNbCells,aDim);
+ for(TInt anElemId = 0, aNodeId = 0; anElemId < aNbElem; anElemId++){
+ MED::TCoordSliceArr aCoordSliceArr = aGaussCoord.GetCoordSliceArr(anElemId);
+ for(TInt aGaussId = 0; aGaussId < aNbGauss; aGaussId++, aNodeId++){
+ MED::TCoordSlice aCoordSlice = aCoordSliceArr[aGaussId];
+ TCoordSlice aSlice = aCoords.GetCoordSlice(aNodeId);
+ for(TInt aDimId = 0; aDimId < aDim; aDimId++)
+ aSlice[aDimId] = aCoordSlice[aDimId];
}
-
- }else{
-
- INITMSG(MYDEBUG,
- "- aVGeom = "<<aVGeom<<
- "; aStatus = "<<aGaussSubMesh->myStatus<<
- endl);
}
+
+ aGaussSubMesh->myIsDone = true;;
+
+ INITMSG(MYDEBUG,
+ "- aVGeom = "<<aVGeom<<
+ "; aName = '"<<aName<<"'"<<
+ "; aStatus = "<<aGaussSubMesh->myStatus<<
+ "; aNbCells = "<<aNbCells<<
+ endl);
}
}