-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#ifdef WIN32
#pragma warning(disable:4250)
#endif
-
+#include <utilities.h>
namespace MED
{
//---------------------------------------------------------------
}
}
- TTFamilyInfo(const PMeshInfo& theMeshInfo,
- TInt theNbGroup,
- TInt theNbAttr,
- TInt theId,
+ TTFamilyInfo(const PMeshInfo& theMeshInfo,
+ TInt theNbGroup,
+ TInt theNbAttr,
+ TInt theId,
const std::string& theValue):
TNameInfoBase(theValue)
{
myAttrDesc.resize(theNbAttr*GetDESCLength()+1);
}
- TTFamilyInfo(const PMeshInfo& theMeshInfo,
- const std::string& theValue,
- TInt theId,
- const TStringSet& theGroupNames,
- const TStringVector& theAttrDescs,
- const TIntVector& theAttrIds,
- const TIntVector& theAttrVals):
+ TTFamilyInfo(const PMeshInfo& theMeshInfo,
+ const std::string& theValue,
+ TInt theId,
+ const TStringSet& theGroupNames,
+ const TStringVector& theAttrDescs,
+ const TIntVector& theAttrIds,
+ const TIntVector& theAttrVals):
TNameInfoBase(theValue)
{
myMeshInfo = theMeshInfo;
virtual
std::string
- GetGroupName(TInt theId) const
- {
+ GetGroupName(TInt theId) const
+ {
return GetString(theId, GetLNOMLength(), myGroupNames);
}
}
}
- TTElemInfo(const PMeshInfo& theMeshInfo,
- TInt theNbElem,
- EBooleen theIsElemNum,
- EBooleen theIsElemNames)
+ TTElemInfo(const PMeshInfo& theMeshInfo,
+ TInt theNbElem,
+ EBooleen theIsElemNum,
+ EBooleen theIsElemNames)
{
myMeshInfo = theMeshInfo;
myElemNames.reset(new TString(theNbElem*GetPNOMLength() + 1));
else
myElemNames.reset(new TString());
- }
-
- TTElemInfo(const PMeshInfo& theMeshInfo,
- TInt theNbElem,
- const TIntVector& theFamilyNums,
- const TIntVector& theElemNums,
+ }
+
+ TTElemInfo(const PMeshInfo& theMeshInfo,
+ TInt theNbElem,
+ const TIntVector& theFamilyNums,
+ const TIntVector& theElemNums,
const TStringVector& theElemNames)
{
myMeshInfo = theMeshInfo;
-
+
myNbElem = theNbElem;
myFamNum.reset(new TElemNum(theNbElem));
myIsFamNum = eFAUX; // is set to eVRAI in SetFamNum()
-
+
myIsElemNum = theElemNums.size()? eVRAI: eFAUX;
if(myIsElemNum)
myElemNum.reset(new TElemNum(theNbElem));
else
myElemNum.reset(new TElemNum());
-
+
myIsElemNames = theElemNames.size()? eVRAI: eFAUX;
if(myIsElemNames)
myElemNames.reset(new TString(theNbElem*GetPNOMLength() + 1));
myEntity = theInfo->GetEntity();
myGeom = theInfo->GetGeom();
myConnMode = theInfo->GetConnMode();
-
+
TInt aConnDim = GetNbNodes(myGeom);
TInt aNbConn = GetNbConn(myGeom, myEntity, myMeshInfo->myDim);
myConn.reset(new TElemNum(myNbElem * aNbConn));
}
}
- TTCellInfo(const PMeshInfo& theMeshInfo,
- EEntiteMaillage theEntity,
+ TTCellInfo(const PMeshInfo& theMeshInfo,
+ EEntiteMaillage theEntity,
EGeometrieElement theGeom,
- TInt theNbElem,
- EConnectivite theConnMode,
- EBooleen theIsElemNum,
- EBooleen theIsElemNames,
- EModeSwitch theMode):
+ TInt theNbElem,
+ EConnectivite theConnMode,
+ EBooleen theIsElemNum,
+ EBooleen theIsElemNames,
+ EModeSwitch theMode):
TModeSwitchInfo(theMode),
TElemInfoBase(theMeshInfo,
theNbElem,
TInt aNbConn = GetNbConn(theGeom, myEntity, theMeshInfo->myDim);
myConn.reset(new TElemNum(theNbElem * aNbConn));
}
-
- TTCellInfo(const PMeshInfo& theMeshInfo,
- EEntiteMaillage theEntity,
- EGeometrieElement theGeom,
- const TIntVector& theConnectivities,
- EConnectivite theConnMode,
- const TIntVector& theFamilyNums,
- const TIntVector& theElemNums,
+
+ TTCellInfo(const PMeshInfo& theMeshInfo,
+ EEntiteMaillage theEntity,
+ EGeometrieElement theGeom,
+ const TIntVector& theConnectivities,
+ EConnectivite theConnMode,
+ const TIntVector& theFamilyNums,
+ const TIntVector& theElemNums,
const TStringVector& theElemNames,
- EModeSwitch theMode):
+ EModeSwitch theMode):
TModeSwitchInfo(theMode),
TElemInfoBase(theMeshInfo,
(TInt)theConnectivities.size() / GetNbNodes(theGeom),
}
}
- virtual
+ virtual
TInt
- GetConnDim() const
- {
+ GetConnDim() const
+ {
return GetNbConn(myGeom, myEntity, myMeshInfo->myDim);
}
myDiameters.resize( theNbElem );
}
- TTBallInfo(const PMeshInfo& theMeshInfo,
+ TTBallInfo(const PMeshInfo& theMeshInfo,
const TIntVector& theNodes,
TFloatVector& theDiameters,
const TIntVector& theFamilyNums,
};
//---------------------------------------------------------------
- struct TTFieldInfo:
- virtual TFieldInfo,
+ struct TTFieldInfo:
+ virtual TFieldInfo,
virtual TTNameInfo
{
typedef TTNameInfo TNameInfoBase;
myNbRef = theInfo->GetNbRef();
}
- TTFieldInfo(const PMeshInfo& theMeshInfo,
- TInt theNbComp,
- ETypeChamp theType,
+ TTFieldInfo(const PMeshInfo& theMeshInfo,
+ TInt theNbComp,
+ ETypeChamp theType,
const std::string& theValue,
- EBooleen theIsLocal,
- TInt theNbRef):
+ EBooleen theIsLocal,
+ TInt theNbRef):
TNameInfoBase(theValue)
{
myMeshInfo = theMeshInfo;
myGeom2Gauss = theInfo->GetGeom2Gauss();
}
- TTTimeStampInfo(const PFieldInfo& theFieldInfo,
- EEntiteMaillage theEntity,
- const TGeom2Size& theGeom2Size,
+ TTTimeStampInfo(const PFieldInfo& theFieldInfo,
+ EEntiteMaillage theEntity,
+ const TGeom2Size& theGeom2Size,
const TGeom2NbGauss& theGeom2NbGauss,
- TInt theNumDt,
- TInt theNumOrd,
- TFloat theDt,
- const std::string& theUnitDt,
- const TGeom2Gauss& theGeom2Gauss)
+ TInt theNumDt,
+ TInt /*theNumOrd*/,
+ TFloat theDt,
+ const std::string& theUnitDt,
+ const TGeom2Gauss& theGeom2Gauss)
{
myFieldInfo = theFieldInfo;
myGeom2Gauss = theGeom2Gauss;
}
- virtual
+ virtual
std::string
GetUnitDt() const
- {
+ {
return GetString(0,GetPNOMLength(),myUnitDt);
}
typedef TTNameInfo TNameInfoBase;
TTProfileInfo(const TProfileInfo::TInfo& theInfo,
- EModeProfil theMode):
+ EModeProfil theMode):
TNameInfoBase(boost::get<0>(theInfo))
{
TInt aSize = boost::get<1>(theInfo);
template<class TMeshValueType>
struct TTTimeStampValue: virtual TTimeStampValue<TMeshValueType>
{
- TTTimeStampValue(const PTimeStampInfo& theTimeStampInfo,
+ TTTimeStampValue(const PTimeStampInfo& theTimeStampInfo,
const PTimeStampValueBase& theInfo,
- ETypeChamp theTypeChamp)
+ ETypeChamp theTypeChamp)
{
typedef TTimeStampValue<TMeshValueType> TCompatible;
if(TCompatible* aCompatible = dynamic_cast<TCompatible*>(theInfo.get())){
}
TTTimeStampValue(const PTimeStampInfo& theTimeStampInfo,
- ETypeChamp theTypeChamp,
- const TGeom2Profile& theGeom2Profile,
- EModeSwitch theMode):
+ ETypeChamp theTypeChamp,
+ const TGeom2Profile& theGeom2Profile,
+ EModeSwitch theMode):
TModeSwitchInfo(theMode)
{
this->myTimeStampInfo = theTimeStampInfo;
aNbElem = aProfileInfo->GetSize();
TInt aNbGauss = theTimeStampInfo->GetNbGauss(aGeom);
-
+
this->GetMeshValue(aGeom).Allocate(aNbElem,aNbGauss,aNbComp);
}
}
- virtual
+ virtual
size_t
GetValueSize(EGeometrieElement theGeom) const
{
return this->GetMeshValue(theGeom).GetSize();
}
- virtual
+ virtual
size_t
GetNbVal(EGeometrieElement theGeom) const
{
return this->GetMeshValue(theGeom).GetNbVal();
}
- virtual
+ virtual
size_t
GetNbGauss(EGeometrieElement theGeom) const
{
return this->GetMeshValue(theGeom).GetNbGauss();
}
- virtual
+ virtual
void
AllocateValue(EGeometrieElement theGeom,
- TInt theNbElem,
- TInt theNbGauss,
- TInt theNbComp,
- EModeSwitch theMode = eFULL_INTERLACE)
+ TInt theNbElem,
+ TInt theNbGauss,
+ TInt theNbComp,
+ EModeSwitch theMode = eFULL_INTERLACE)
{
this->GetMeshValue(theGeom).Allocate(theNbElem,theNbGauss,theNbComp,theMode);
}
-
- virtual
+
+ virtual
unsigned char*
GetValuePtr(EGeometrieElement theGeom)
{
struct TTGrilleInfo:
virtual TGrilleInfo
{
- TTGrilleInfo(const PMeshInfo& theMeshInfo,
+ TTGrilleInfo(const PMeshInfo& theMeshInfo,
const PGrilleInfo& theInfo)
{
myMeshInfo = theMeshInfo;
myCoord = theInfo->GetNodeCoord();
-
+
myGrilleType = theInfo->GetGrilleType();
myCoordNames = theInfo->myCoordNames;
myFamNum = theInfo->myFamNum;
}
- TTGrilleInfo(const PMeshInfo& theMeshInfo,
+ TTGrilleInfo(const PMeshInfo& theMeshInfo,
const EGrilleType& type,
- const TInt nnoeuds)
+ const TInt nnoeuds)
{
myMeshInfo = theMeshInfo;
TInt aSpaceDim = theMeshInfo->GetSpaceDim();
myFamNumNode.resize(nnoeuds);
}
- TTGrilleInfo(const PMeshInfo& theMeshInfo,
+ TTGrilleInfo(const PMeshInfo& theMeshInfo,
const EGrilleType& type)
{
myMeshInfo = theMeshInfo;
myGrilleStructure.resize(aSpaceDim);
}
- TTGrilleInfo(const PMeshInfo& theMeshInfo,
- const EGrilleType& type,
+ TTGrilleInfo(const PMeshInfo& theMeshInfo,
+ const EGrilleType& type,
const MED::TIntVector& nbNodeVec)
{
myMeshInfo = theMeshInfo;
}
virtual
- std::string
- GetCoordUnit(TInt theId) const
- {
+ std::string
+ GetCoordUnit(TInt theId) const
+ {
return GetString(theId,GetPNOMLength(),myCoordUnits);
}