const TEntity2GeomSet& GetEntity2GeomSet();
- template<int EVersion>
+ template<int>
+
TInt GetNbConn(EGeometrieElement typmai,
+ EEntiteMaillage typent,
TInt mdim);
template<>
TInt GetNbConn<eV2_1>(EGeometrieElement typmai,
+ EEntiteMaillage typent,
TInt mdim);
template<>
TInt GetNbConn<eV2_2>(EGeometrieElement typmai,
+ EEntiteMaillage typent,
TInt mdim);
- TInt GetNbConnectivities(EGeometrieElement typmai);
+ TInt GetNbNodes(EGeometrieElement typmai);
struct TNameInfo;
typedef SharedPtr<TNameInfo> PNameInfo;
namespace MED{
- TInt GetNbConnectivities(EGeometrieElement typmai)
+ TInt GetNbNodes(EGeometrieElement typmai)
{
- TInt taille = typmai%100;
- return taille;
+ return typmai%100;
}
template<>
TInt GetNbConn<eV2_1>(EGeometrieElement typmai,
+ EEntiteMaillage typent,
TInt mdim)
{
- TInt edim = typmai / 100;
TInt nsup = 0;
- if (mdim == 2 || mdim == 3)
- if (edim == 1)
- nsup = 1;
-
- if (mdim == 3)
- if (edim == 2)
- nsup = 1;
-
- TInt taille = nsup+typmai%100;
- return taille;
+ if(typent == eMAILLE){
+ TInt edim = typmai / 100;
+ if(mdim == 2 || mdim == 3)
+ if(edim == 1)
+ nsup = 1;
+
+ if(mdim == 3)
+ if (edim == 2)
+ nsup = 1;
+ }
+
+ return nsup + typmai%100;
}
template<>
TInt GetNbConn<eV2_2>(EGeometrieElement typmai,
+ EEntiteMaillage typent,
TInt mdim)
{
- TInt taille = typmai%100;
- return taille;
+ return typmai%100;
}
std::string GetString(TInt theId, TInt theStep,
TConstConnSlice
TCellInfo::GetConnSlice(TInt theElemId) const
{
- return TConstConnSlice(myConn,std::slice(GetConnDim()*theElemId,GetNbConnectivities(myTGeom),1));
+ return TConstConnSlice(myConn,std::slice(GetConnDim()*theElemId,GetNbNodes(myTGeom),1));
}
TConnSlice
TCellInfo::GetConnSlice(TInt theElemId)
{
- return TConnSlice(myConn,std::slice(GetConnDim()*theElemId,GetNbConnectivities(myTGeom),1));
+ return TConnSlice(myConn,std::slice(GetConnDim()*theElemId,GetNbNodes(myTGeom),1));
}
//---------------------------------------------------------------
myTGeom = theInfo->GetGeom();
myTConn = theInfo->GetConn();
- TInt aConnDim = GetNbConnectivities(myTGeom);
- myConn.resize(myNbElem*GetNbConn<nV>(myTGeom,myMeshInfo->myDim));
+ TInt aConnDim = GetNbNodes(myTGeom);
+ myConn.resize(myNbElem*GetNbConn<nV>(myTGeom,myTEntity,myMeshInfo->myDim));
for(TInt anElemId = 0; anElemId < myNbElem; anElemId++){
for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){
SetConn(anElemId,anConnId,theInfo->GetConn(anElemId,anConnId));
myTEntity = theTEntity;
myTGeom = theTGeom;
myTConn = theTConn;
- myConn.resize(theNbElem*GetNbConn<nV>(theTGeom,theMeshInfo->myDim));
+ myConn.resize(theNbElem*GetNbConn<nV>(theTGeom,myTEntity,theMeshInfo->myDim));
}
TTCellInfo(const PMeshInfo& theMeshInfo,
myTGeom = theTGeom;
myTConn = theTConn;
- TInt aConnDim = GetNbConnectivities(myTGeom);
+ TInt aConnDim = GetNbNodes(myTGeom);
myNbElem = theConnectivities.size() / aConnDim;
- myConn.resize(myNbElem*GetNbConn<nV>(myTGeom,myMeshInfo->myDim));
+ myConn.resize(myNbElem*GetNbConn<nV>(myTGeom,myTEntity,myMeshInfo->myDim));
for(TInt anElemId = 0; anElemId < myNbElem; anElemId++){
for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){
SetConn(anElemId,anConnId,theConnectivities[anElemId*aConnDim+anConnId]);
}
virtual TInt GetConnDim() const {
- return GetNbConn<nV>(myTGeom,myMeshInfo->myDim);
+ return GetNbConn<nV>(myTGeom,myTEntity,myMeshInfo->myDim);
}
};
anEntity,
aGeom,
aConn);
+
if(theErr)
*theErr = aRet;
else if(aRet < 0)