}
+ //---------------------------------------------------------------
+ void
+ TGaussImpl
+ ::LessThan(const PGaussImpl& theGauss,
+ bool& theResult) const
+ {
+ theResult = false;
+ }
+
+
//---------------------------------------------------------------
TGaussSubMeshImpl::TGaussSubMeshImpl():
myStatus(eNone)
PGaussSubMeshImpl aLeft(theLeft), aRight(theRight);
const PGaussImpl& aGaussLeft = aLeft->myGauss;
const PGaussImpl& aGaussRight = aRight->myGauss;
-
+
if(aGaussLeft->myGeom != aGaussRight->myGeom)
return aGaussLeft->myGeom < aGaussRight->myGeom;
- if(aGaussLeft->myName != aGaussRight->myName)
- return aGaussLeft->myName < aGaussRight->myName;
+ if(aLeft->mySubProfile != aRight->mySubProfile)
+ return aLeft->mySubProfile < aRight->mySubProfile;
+
+ bool aResult;
+ aGaussLeft->LessThan(aGaussRight,aResult);
- return theLeft->mySubProfile < theRight->mySubProfile;
+ return aResult;
}
//---------------------------------------------------------------
+ struct TGaussImpl;
+ typedef SharedPtr<TGaussImpl> PGaussImpl;
+
//! Specialize TGauss to provide more detail information of the MED GAUSS entity for VTK mapping
struct TGaussImpl: virtual TGauss
{
EGeometry myGeom; //!< Define, to which geometrical type the MED GAUSS entity belongs
std::string myName; //!< Keeps name of the MED GAUSS entity
vtkIdType myNbPoints; //<! Keeps number of points for the MED GAUSS entity
+
+ //! To define a way to implement more detail comparision of the TGaussSubMesh instances
+ virtual
+ void
+ LessThan(const PGaussImpl& theGauss,
+ bool& theResult) const;
};
- typedef SharedPtr<TGaussImpl> PGaussImpl;
//---------------------------------------------------------------
PMEDGauss aGauss(new TMEDGauss());
aGaussSubMesh->myGauss = aGauss;
aGauss->myGeom = aEGeom;
-
- TInt aNbGauss = 1;
- std::string aName;
+ aGauss->myNbPoints = 1;
MED::TGeom2Gauss::const_iterator aGaussIter = aGeom2Gauss.find(aMGeom);
if(aGaussIter != aGeom2Gauss.end()){
MED::PGaussInfo aGaussInfo = aGaussIter->second;
aGauss->myGaussInfo = aGaussInfo;
- aName = aGauss->myName = aGaussInfo->GetName();
- aNbGauss = aGauss->myNbPoints = aGaussInfo->GetNbGauss();
+ aGauss->myName = aGaussInfo->GetName();
+ aGauss->myNbPoints = aGaussInfo->GetNbGauss();
}
- aGauss->myNbPoints = aNbGauss;
- aGaussSubMesh->myNbCells = aNbCells*aNbGauss;
+ aGaussSubMesh->myNbCells = aNbCells*aGauss->myNbPoints;
aGaussSubMesh->myCellsSize = aGaussSubMesh->myNbCells*2;
aGaussKey.insert(aGaussSubMesh);
INITMSGA(MYDEBUG,0,
- "- aEGeom = "<<aEGeom<<
- "; aName = '"<<aName<<"'"<<
- "; aNbGauss = "<<aNbGauss<<
+ "- aEGeom = "<<aGauss->myGeom<<
+ "; aName = '"<<aGauss->myName<<"'"<<
+ "; aNbGauss = "<<aGauss->myNbPoints<<
"; aStatus = "<<aGaussSubMesh->myStatus<<
"; aNbCells = "<<aGaussSubMesh->myNbCells<<
"; aCellsSize = "<<aGaussSubMesh->myCellsSize<<
aGaussSubMeshArr[anID] = aGaussSubMesh;
}
}
+ INITMSG(MYDEBUG,"aGaussMeshMap[aGaussKey] = aGaussMesh"<<endl);
aGaussMeshMap[aGaussKey] = aGaussMesh;
theValForTime.myGaussMesh = aGaussMesh;
}
}
+ //---------------------------------------------------------------
+ void
+ TMEDGauss
+ ::LessThan(const PGaussImpl& theGauss,
+ bool& theResult) const
+ {
+ TGaussImpl::LessThan(theGauss,theResult);
+ if(myGaussInfo){
+ if(PMEDGauss aGauss = theGauss){
+ const MED::TGaussInfo& aLeft = myGaussInfo;
+ const MED::TGaussInfo& aReight = aGauss->myGaussInfo;
+ theResult = MED::TGaussInfo::TLess()(aLeft,aReight);
+ }
+ }
+ }
+
+
//---------------------------------------------------------------
TGaussPointID
TMEDGaussSubMesh