-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File :
// Author :
// Module :
-// $Header$
//
#ifndef MED_TStructures_HeaderFile
#define MED_TStructures_HeaderFile
#include "MED_Structures.hxx"
+#ifdef WNT
+#pragma warning(disable:4250)
+#endif
+
namespace MED
{
//---------------------------------------------------------------
myValue(theValue)
{
if(theValue.empty())
- myRepresentation = (TRepresentation*)NULL;
+ myRepresentation = (TRepresentation*)NULL;
else
- myRepresentation = (TRepresentation*)&theValue[0];
+ myRepresentation = (TRepresentation*)&theValue[0];
}
TRepresentation*
TNameInfoBase(theInfo->GetName())
{
myDim = theInfo->GetDim();
+ mySpaceDim = theInfo->GetSpaceDim();
myType = theInfo->GetType();
myDesc.resize(GetDESCLength<eVersion>()+1);
SetDesc(theInfo->GetDesc());
}
- TTMeshInfo(TInt theDim,
- const std::string& theValue,
- EMaillage theType,
- const std::string& theDesc):
+ TTMeshInfo(TInt theDim, TInt theSpaceDim,
+ const std::string& theValue,
+ EMaillage theType,
+ const std::string& theDesc):
TNameInfoBase(theValue)
{
myDim = theDim;
+ mySpaceDim = theSpaceDim;
myType = theType;
myDesc.resize(GetDESCLength<eVersion>()+1);
myNbGroup = theInfo->GetNbGroup();
myGroupNames.resize(myNbGroup*GetLNOMLength<eVersion>()+1);
if(myNbGroup){
- for(TInt anId = 0; anId < myNbGroup; anId++){
- SetGroupName(anId,theInfo->GetGroupName(anId));
- }
+ for(TInt anId = 0; anId < myNbGroup; anId++){
+ SetGroupName(anId,theInfo->GetGroupName(anId));
+ }
}
myNbAttr = theInfo->GetNbAttr();
myAttrVal.resize(myNbAttr);
myAttrDesc.resize(myNbAttr*GetDESCLength<eVersion>()+1);
if(myNbAttr){
- for(TInt anId = 0; anId < myNbAttr; anId++){
- SetAttrDesc(anId,theInfo->GetAttrDesc(anId));
- myAttrVal[anId] = theInfo->GetAttrVal(anId);
- myAttrId[anId] = theInfo->GetAttrId(anId);
- }
+ for(TInt anId = 0; anId < myNbAttr; anId++){
+ SetAttrDesc(anId,theInfo->GetAttrDesc(anId));
+ myAttrVal[anId] = theInfo->GetAttrVal(anId);
+ myAttrId[anId] = theInfo->GetAttrId(anId);
+ }
}
}
TTFamilyInfo(const PMeshInfo& theMeshInfo,
- TInt theNbGroup,
- TInt theNbAttr,
- TInt theId,
- const std::string& theValue):
+ TInt theNbGroup,
+ TInt theNbAttr,
+ TInt theId,
+ const std::string& theValue):
TNameInfoBase(theValue)
{
myMeshInfo = theMeshInfo;
}
TTFamilyInfo(const PMeshInfo& theMeshInfo,
- const std::string& theValue,
- TInt theId,
- const TStringSet& theGroupNames,
- const TStringVector& theAttrDescs,
- const TIntVector& theAttrIds,
- const TIntVector& theAttrVals):
+ const std::string& theValue,
+ TInt theId,
+ const TStringSet& theGroupNames,
+ const TStringVector& theAttrDescs,
+ const TIntVector& theAttrIds,
+ const TIntVector& theAttrVals):
TNameInfoBase(theValue)
{
myMeshInfo = theMeshInfo;
myNbGroup = (TInt)theGroupNames.size();
myGroupNames.resize(myNbGroup*GetLNOMLength<eVersion>()+1);
if(myNbGroup){
- TStringSet::const_iterator anIter = theGroupNames.begin();
- for(TInt anId = 0; anIter != theGroupNames.end(); anIter++, anId++){
- const std::string& aVal = *anIter;
- SetGroupName(anId,aVal);
- }
+ TStringSet::const_iterator anIter = theGroupNames.begin();
+ for(TInt anId = 0; anIter != theGroupNames.end(); anIter++, anId++){
+ const std::string& aVal = *anIter;
+ SetGroupName(anId,aVal);
+ }
}
myNbAttr = (TInt)theAttrDescs.size();
myAttrVal.resize(myNbAttr);
myAttrDesc.resize(myNbAttr*GetDESCLength<eVersion>()+1);
if(myNbAttr){
- for(TInt anId = 0, anEnd = (TInt)theAttrDescs.size(); anId < anEnd; anId++){
- SetAttrDesc(anId,theAttrDescs[anId]);
- myAttrVal[anId] = theAttrVals[anId];
- myAttrId[anId] = theAttrIds[anId];
- }
+ for(TInt anId = 0, anEnd = (TInt)theAttrDescs.size(); anId < anEnd; anId++){
+ SetAttrDesc(anId,theAttrDescs[anId]);
+ myAttrVal[anId] = theAttrVals[anId];
+ myAttrId[anId] = theAttrIds[anId];
+ }
}
}
myNbElem = theInfo->GetNbElem();
myFamNum.reset(new TElemNum(myNbElem));
+ myIsFamNum = eFAUX; // is set to eVRAI in SetFamNum()
myIsElemNum = theInfo->IsElemNum();
if(theInfo->IsElemNum())
- myElemNum.reset(new TElemNum(myNbElem));
+ myElemNum.reset(new TElemNum(myNbElem));
else
- myElemNum.reset(new TElemNum());
+ myElemNum.reset(new TElemNum());
myIsElemNames = theInfo->IsElemNames();
if(theInfo->IsElemNames())
- myElemNames.reset(new TString(myNbElem*GetPNOMLength<eVersion>() + 1));
+ myElemNames.reset(new TString(myNbElem*GetPNOMLength<eVersion>() + 1));
else
- myElemNames.reset(new TString());
+ myElemNames.reset(new TString());
if(theInfo->GetNbElem()){
- for(TInt anId = 0; anId < myNbElem; anId++){
- SetFamNum(anId, theInfo->GetFamNum(anId));
- }
- if(theInfo->IsElemNum() == eVRAI){
- for(TInt anId = 0; anId < myNbElem; anId++){
- SetElemNum(anId, theInfo->GetElemNum(anId));
- }
- }
- if(theInfo->IsElemNames() == eVRAI){
- for(TInt anId = 0; anId < myNbElem; anId++){
- SetElemName(anId,theInfo->GetElemName(anId));
- }
- }
+ for(TInt anId = 0; anId < myNbElem; anId++){
+ SetFamNum(anId, theInfo->GetFamNum(anId));
+ }
+ if(theInfo->IsElemNum() == eVRAI){
+ for(TInt anId = 0; anId < myNbElem; anId++){
+ SetElemNum(anId, theInfo->GetElemNum(anId));
+ }
+ }
+ if(theInfo->IsElemNames() == eVRAI){
+ for(TInt anId = 0; anId < myNbElem; anId++){
+ SetElemName(anId,theInfo->GetElemName(anId));
+ }
+ }
}
}
TTElemInfo(const PMeshInfo& theMeshInfo,
- TInt theNbElem,
- EBooleen theIsElemNum,
- EBooleen theIsElemNames)
+ TInt theNbElem,
+ EBooleen theIsElemNum,
+ EBooleen theIsElemNames)
{
myMeshInfo = theMeshInfo;
myNbElem = theNbElem;
myFamNum.reset(new TElemNum(theNbElem));
+ myIsFamNum = eFAUX; // is set to eVRAI in SetFamNum()
myIsElemNum = theIsElemNum;
if(theIsElemNum)
- myElemNum.reset(new TElemNum(theNbElem));
+ myElemNum.reset(new TElemNum(theNbElem));
else
- myElemNum.reset(new TElemNum());
+ myElemNum.reset(new TElemNum());
myIsElemNames = theIsElemNames;
if(theIsElemNames)
- myElemNames.reset(new TString(theNbElem*GetPNOMLength<eVersion>() + 1));
+ myElemNames.reset(new TString(theNbElem*GetPNOMLength<eVersion>() + 1));
else
- myElemNames.reset(new TString());
+ myElemNames.reset(new TString());
}
TTElemInfo(const PMeshInfo& theMeshInfo,
- TInt theNbElem,
- const TIntVector& theFamilyNums,
- const TIntVector& theElemNums,
- const TStringVector& theElemNames)
+ 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));
+ myElemNum.reset(new TElemNum(theNbElem));
else
- myElemNum.reset(new TElemNum());
+ myElemNum.reset(new TElemNum());
myIsElemNames = theElemNames.size()? eVRAI: eFAUX;
if(myIsElemNames)
- myElemNames.reset(new TString(theNbElem*GetPNOMLength<eVersion>() + 1));
+ myElemNames.reset(new TString(theNbElem*GetPNOMLength<eVersion>() + 1));
else
- myElemNames.reset(new TString());
+ myElemNames.reset(new TString());
if(theNbElem){
- if(theFamilyNums.size())
- *myFamNum = theFamilyNums;
+ if(theFamilyNums.size())
+ *myFamNum = theFamilyNums;
- if(myIsElemNum)
- *myElemNum = theElemNums;
+ if(myIsElemNum)
+ *myElemNum = theElemNums;
- if(myIsElemNames){
- for(TInt anId = 0; anId < theNbElem; anId++){
- const std::string& aVal = theElemNames[anId];
- SetElemName(anId,aVal);
- }
- }
+ if(myIsElemNames){
+ for(TInt anId = 0; anId < theNbElem; anId++){
+ const std::string& aVal = theElemNames[anId];
+ SetElemName(anId,aVal);
+ }
+ }
}
}
typedef TTElemInfo<eVersion> TElemInfoBase;
TTNodeInfo(const PMeshInfo& theMeshInfo, const PNodeInfo& theInfo):
- TElemInfoBase(theMeshInfo, theInfo),
- TNodeInfo(theInfo)
+ TNodeInfo(theInfo),
+ TElemInfoBase(theMeshInfo, theInfo)
{
myModeSwitch = theInfo->GetModeSwitch();
myCoord.reset(new TNodeCoord(*theInfo->myCoord));
- TInt aDim = theMeshInfo->GetDim();
+ TInt aSpaceDim = theMeshInfo->GetSpaceDim();
- myCoordNames.resize(aDim*GetPNOMLength<eVersion>()+1);
- for(TInt anId = 0; anId < aDim; anId++)
- SetCoordName(anId,theInfo->GetCoordName(anId));
+ myCoordNames.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
+ for(TInt anId = 0; anId < aSpaceDim; anId++)
+ SetCoordName(anId,theInfo->GetCoordName(anId));
- myCoordUnits.resize(aDim*GetPNOMLength<eVersion>()+1);
- for(TInt anId = 0; anId < aDim; anId++)
- SetCoordUnit(anId,theInfo->GetCoordUnit(anId));
+ myCoordUnits.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
+ for(TInt anId = 0; anId < aSpaceDim; anId++)
+ SetCoordUnit(anId,theInfo->GetCoordUnit(anId));
}
TTNodeInfo(const PMeshInfo& theMeshInfo,
- TInt theNbElem,
- EModeSwitch theMode,
- ERepere theSystem,
- EBooleen theIsElemNum,
- EBooleen theIsElemNames):
+ TInt theNbElem,
+ EModeSwitch theMode,
+ ERepere theSystem,
+ EBooleen theIsElemNum,
+ EBooleen theIsElemNames):
+ TModeSwitchInfo(theMode),
TElemInfoBase(theMeshInfo,
- theNbElem,
- theIsElemNum,
- theIsElemNames),
- TModeSwitchInfo(theMode)
+ theNbElem,
+ theIsElemNum,
+ theIsElemNames)
{
mySystem = theSystem;
- myCoord.reset(new TNodeCoord(theNbElem * theMeshInfo->myDim));
+ myCoord.reset(new TNodeCoord(theNbElem * theMeshInfo->mySpaceDim));
- myCoordUnits.resize(theMeshInfo->myDim*GetPNOMLength<eVersion>()+1);
+ myCoordUnits.resize(theMeshInfo->mySpaceDim*GetPNOMLength<eVersion>()+1);
- myCoordNames.resize(theMeshInfo->myDim*GetPNOMLength<eVersion>()+1);
+ myCoordNames.resize(theMeshInfo->mySpaceDim*GetPNOMLength<eVersion>()+1);
}
TTNodeInfo(const PMeshInfo& theMeshInfo,
- const TFloatVector& theNodeCoords,
- EModeSwitch theMode,
- ERepere theSystem,
- const TStringVector& theCoordNames,
- const TStringVector& theCoordUnits,
- const TIntVector& theFamilyNums,
- const TIntVector& theElemNums,
- const TStringVector& theElemNames):
+ const TFloatVector& theNodeCoords,
+ EModeSwitch theMode,
+ ERepere theSystem,
+ const TStringVector& theCoordNames,
+ const TStringVector& theCoordUnits,
+ const TIntVector& theFamilyNums,
+ const TIntVector& theElemNums,
+ const TStringVector& theElemNames):
+ TModeSwitchInfo(theMode),
TElemInfoBase(theMeshInfo,
- (TInt)theNodeCoords.size()/theMeshInfo->GetDim(),
- theFamilyNums,
- theElemNums,
- theElemNames),
- TModeSwitchInfo(theMode)
+ (TInt)theNodeCoords.size()/theMeshInfo->GetDim(),
+ theFamilyNums,
+ theElemNums,
+ theElemNames)
{
mySystem = theSystem;
myCoord.reset(new TNodeCoord(theNodeCoords));
- TInt aDim = theMeshInfo->GetDim();
+ TInt aSpaceDim = theMeshInfo->GetSpaceDim();
- myCoordNames.resize(aDim*GetPNOMLength<eVersion>()+1);
+ myCoordNames.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
if(!theCoordNames.empty())
- for(TInt anId = 0; anId < aDim; anId++)
- SetCoordName(anId,theCoordNames[anId]);
+ for(TInt anId = 0; anId < aSpaceDim; anId++)
+ SetCoordName(anId,theCoordNames[anId]);
- myCoordUnits.resize(aDim*GetPNOMLength<eVersion>() + 1);
+ myCoordUnits.resize(aSpaceDim*GetPNOMLength<eVersion>() + 1);
if(!theCoordUnits.empty())
- for(TInt anId = 0; anId < aDim; anId++)
- SetCoordUnit(anId, theCoordUnits[anId]);
+ for(TInt anId = 0; anId < aSpaceDim; anId++)
+ SetCoordUnit(anId, theCoordUnits[anId]);
}
virtual
}
TTPolygoneInfo(const PMeshInfo& theMeshInfo,
- EEntiteMaillage theEntity,
- EGeometrieElement theGeom,
- TInt theNbElem,
- TInt theConnSize,
- EConnectivite theConnMode,
- EBooleen theIsElemNum,
- EBooleen theIsElemNames):
+ EEntiteMaillage theEntity,
+ EGeometrieElement theGeom,
+ TInt theNbElem,
+ TInt theConnSize,
+ EConnectivite theConnMode,
+ EBooleen theIsElemNum,
+ EBooleen theIsElemNames):
TElemInfoBase(theMeshInfo,
- theNbElem,
- theIsElemNum,
- theIsElemNames)
+ theNbElem,
+ theIsElemNum,
+ theIsElemNames)
{
myEntity = theEntity;
myGeom = theGeom;
}
TTPolygoneInfo(const PMeshInfo& theMeshInfo,
- EEntiteMaillage theEntity,
- EGeometrieElement theGeom,
- const TIntVector& theIndexes,
- const TIntVector& theConnectivities,
- EConnectivite theConnMode,
- const TIntVector& theFamilyNums,
- const TIntVector& theElemNums,
- const TStringVector& theElemNames):
+ EEntiteMaillage theEntity,
+ EGeometrieElement theGeom,
+ const TIntVector& theIndexes,
+ const TIntVector& theConnectivities,
+ EConnectivite theConnMode,
+ const TIntVector& theFamilyNums,
+ const TIntVector& theElemNums,
+ const TStringVector& theElemNames):
TElemInfoBase(theMeshInfo,
- (TInt)theIndexes.size() - 1,
- theFamilyNums,
- theElemNums,
- theElemNames)
+ (TInt)theIndexes.size() - 1,
+ theFamilyNums,
+ theElemNums,
+ theElemNames)
{
myEntity = theEntity;
myGeom = theGeom;
}
TTPolyedreInfo(const PMeshInfo& theMeshInfo,
- EEntiteMaillage theEntity,
- EGeometrieElement theGeom,
- TInt theNbElem,
- TInt theNbFaces,
- TInt theConnSize,
- EConnectivite theConnMode,
- EBooleen theIsElemNum,
- EBooleen theIsElemNames):
+ EEntiteMaillage theEntity,
+ EGeometrieElement theGeom,
+ TInt theNbElem,
+ TInt theNbFaces,
+ TInt theConnSize,
+ EConnectivite theConnMode,
+ EBooleen theIsElemNum,
+ EBooleen theIsElemNames):
TElemInfoBase(theMeshInfo,
- theNbElem,
- theIsElemNum,
- theIsElemNames)
+ theNbElem,
+ theIsElemNum,
+ theIsElemNames)
{
myEntity = theEntity;
myGeom = theGeom;
}
TTPolyedreInfo(const PMeshInfo& theMeshInfo,
- EEntiteMaillage theEntity,
- EGeometrieElement theGeom,
- const TIntVector& theIndexes,
- const TIntVector& theFaces,
- const TIntVector& theConnectivities,
- EConnectivite theConnMode,
- const TIntVector& theFamilyNums,
- const TIntVector& theElemNums,
- const TStringVector& theElemNames):
+ EEntiteMaillage theEntity,
+ EGeometrieElement theGeom,
+ const TIntVector& theIndexes,
+ const TIntVector& theFaces,
+ const TIntVector& theConnectivities,
+ EConnectivite theConnMode,
+ const TIntVector& theFamilyNums,
+ const TIntVector& theElemNums,
+ const TStringVector& theElemNames):
TElemInfoBase(theMeshInfo,
- (TInt)theIndexes.size()-1,
- theFamilyNums,
- theElemNums,
- theElemNames)
+ (TInt)theIndexes.size()-1,
+ theFamilyNums,
+ theElemNums,
+ theElemNames)
{
myEntity = theEntity;
myGeom = theGeom;
TInt aNbConn = GetNbConn<eVersion>(myGeom, myEntity, myMeshInfo->myDim);
myConn.reset(new TElemNum(myNbElem * aNbConn));
for(TInt anElemId = 0; anElemId < myNbElem; anElemId++){
- TConnSlice aConnSlice = GetConnSlice(anElemId);
- TCConnSlice aConnSlice2 = theInfo->GetConnSlice(anElemId);
- for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){
- aConnSlice[anConnId] = aConnSlice2[anConnId];
- }
+ TConnSlice aConnSlice = GetConnSlice(anElemId);
+ TCConnSlice aConnSlice2 = theInfo->GetConnSlice(anElemId);
+ for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){
+ aConnSlice[anConnId] = aConnSlice2[anConnId];
+ }
}
}
TTCellInfo(const PMeshInfo& theMeshInfo,
- EEntiteMaillage theEntity,
- EGeometrieElement theGeom,
- TInt theNbElem,
- EConnectivite theConnMode,
- EBooleen theIsElemNum,
- EBooleen theIsElemNames,
- EModeSwitch theMode):
+ EEntiteMaillage theEntity,
+ EGeometrieElement theGeom,
+ TInt theNbElem,
+ EConnectivite theConnMode,
+ EBooleen theIsElemNum,
+ EBooleen theIsElemNames,
+ EModeSwitch theMode):
+ TModeSwitchInfo(theMode),
TElemInfoBase(theMeshInfo,
- theNbElem,
- theIsElemNum,
- theIsElemNames),
- TModeSwitchInfo(theMode)
+ theNbElem,
+ theIsElemNum,
+ theIsElemNames)
{
myEntity = theEntity;
myGeom = theGeom;
}
TTCellInfo(const PMeshInfo& theMeshInfo,
- EEntiteMaillage theEntity,
- EGeometrieElement theGeom,
- const TIntVector& theConnectivities,
- EConnectivite theConnMode,
- const TIntVector& theFamilyNums,
- const TIntVector& theElemNums,
- const TStringVector& theElemNames,
- EModeSwitch theMode):
+ EEntiteMaillage theEntity,
+ EGeometrieElement theGeom,
+ const TIntVector& theConnectivities,
+ EConnectivite theConnMode,
+ const TIntVector& theFamilyNums,
+ const TIntVector& theElemNums,
+ const TStringVector& theElemNames,
+ EModeSwitch theMode):
+ TModeSwitchInfo(theMode),
TElemInfoBase(theMeshInfo,
- (TInt)theConnectivities.size() / GetNbNodes(theGeom),
- theFamilyNums,
- theElemNums,
- theElemNames),
- TModeSwitchInfo(theMode)
+ (TInt)theConnectivities.size() / GetNbNodes(theGeom),
+ theFamilyNums,
+ theElemNums,
+ theElemNames)
{
myEntity = theEntity;
myGeom = theGeom;
TInt aNbConn = GetNbConn<eVersion>(myGeom, myEntity, myMeshInfo->myDim);
myConn.reset(new TElemNum(myNbElem * aNbConn));
for(TInt anElemId = 0; anElemId < myNbElem; anElemId++){
- TConnSlice aConnSlice = GetConnSlice(anElemId);
- for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){
- aConnSlice[anConnId] = theConnectivities[anElemId*aConnDim + anConnId];
- }
+ TConnSlice aConnSlice = GetConnSlice(anElemId);
+ for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){
+ aConnSlice[anConnId] = theConnectivities[anElemId*aConnDim + anConnId];
+ }
}
}
};
+ //---------------------------------------------------------------
+ template<EVersion eVersion>
+ struct TTBallInfo:
+ virtual TBallInfo,
+ virtual TTCellInfo<eVersion>
+ {
+ typedef TTCellInfo<eVersion> TCellInfoBase;
+
+ TTBallInfo(const PMeshInfo& theMeshInfo, const PBallInfo& theInfo):
+ TCellInfoBase::TElemInfoBase(theMeshInfo, theInfo),
+ TCellInfoBase(theMeshInfo,theInfo)
+ {
+ myDiameters = theInfo->myDiameters;
+ }
+
+ TTBallInfo(const PMeshInfo& theMeshInfo,
+ TInt theNbElem,
+ EBooleen theIsElemNum ):
+ TCellInfoBase::TElemInfoBase(theMeshInfo,
+ theNbElem,
+ theIsElemNum,
+ /*theIsElemNames=*/eFAUX),
+ TCellInfoBase(theMeshInfo,
+ eSTRUCT_ELEMENT,
+ eBALL,
+ theNbElem,
+ /*EConnectivite=*/eNOD,
+ theIsElemNum,
+ /*theIsElemNames=*/eFAUX,
+ eFULL_INTERLACE)
+ {
+ myDiameters.resize( theNbElem );
+ }
+
+ TTBallInfo(const PMeshInfo& theMeshInfo,
+ const TIntVector& theNodes,
+ TFloatVector& theDiameters,
+ const TIntVector& theFamilyNums,
+ const TIntVector& theElemNums):
+ TCellInfoBase::TElemInfoBase(theMeshInfo,
+ (TInt)std::max(theNodes.size(),theDiameters.size() ),
+ theFamilyNums,
+ theElemNums,
+ TStringVector()),
+ TCellInfoBase(theMeshInfo,
+ eSTRUCT_ELEMENT,
+ eBALL,
+ theNodes,
+ /*EConnectivite=*/eNOD,
+ theFamilyNums,
+ theElemNums,
+ TStringVector(),
+ eFULL_INTERLACE)
+ {
+ myDiameters.swap( theDiameters );
+ }
+ };
//---------------------------------------------------------------
template<EVersion eVersion>
myNbComp = theInfo->GetNbComp();
myCompNames.resize(myNbComp*GetPNOMLength<eVersion>()+1);
for(TInt anId = 0; anId < myNbComp; anId++){
- SetCompName(anId,theInfo->GetCompName(anId));
+ SetCompName(anId,theInfo->GetCompName(anId));
}
myUnitNames.resize(myNbComp*GetPNOMLength<eVersion>()+1);
for(TInt anId = 0; anId < myNbComp; anId++){
- SetUnitName(anId,theInfo->GetUnitName(anId));
+ SetUnitName(anId,theInfo->GetUnitName(anId));
}
myType = theInfo->GetType();
}
TTFieldInfo(const PMeshInfo& theMeshInfo,
- TInt theNbComp,
- ETypeChamp theType,
- const std::string& theValue,
- EBooleen theIsLocal,
- TInt theNbRef):
+ TInt theNbComp,
+ ETypeChamp theType,
+ const std::string& theValue,
+ EBooleen theIsLocal,
+ TInt theNbRef):
TNameInfoBase(theValue)
{
myMeshInfo = theMeshInfo;
typedef TTNameInfo<eVersion> TNameInfoBase;
TTGaussInfo(const TGaussInfo::TInfo& theInfo,
- EModeSwitch theMode):
- TNameInfoBase(boost::get<1>(boost::get<0>(theInfo))),
- TModeSwitchInfo(theMode)
+ EModeSwitch theMode):
+ TModeSwitchInfo(theMode),
+ TNameInfoBase(boost::get<1>(boost::get<0>(theInfo)))
{
const TGaussInfo::TKey& aKey = boost::get<0>(theInfo);
}
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)
+ EEntiteMaillage theEntity,
+ const TGeom2Size& theGeom2Size,
+ const TGeom2NbGauss& theGeom2NbGauss,
+ TInt theNumDt,
+ TInt theNumOrd,
+ TFloat theDt,
+ const std::string& theUnitDt,
+ const TGeom2Gauss& theGeom2Gauss)
{
myFieldInfo = theFieldInfo;
typedef TTNameInfo<eVersion> TNameInfoBase;
TTProfileInfo(const TProfileInfo::TInfo& theInfo,
- EModeProfil theMode):
+ EModeProfil theMode):
TNameInfoBase(boost::get<0>(theInfo))
{
TInt aSize = boost::get<1>(theInfo);
struct TTTimeStampValue: virtual TTimeStampValue<TMeshValueType>
{
TTTimeStampValue(const PTimeStampInfo& theTimeStampInfo,
- const PTimeStampValueBase& theInfo,
- ETypeChamp theTypeChamp)
+ const PTimeStampValueBase& theInfo,
+ ETypeChamp theTypeChamp)
{
typedef TTimeStampValue<TMeshValueType> TCompatible;
if(TCompatible* aCompatible = dynamic_cast<TCompatible*>(theInfo.get())){
- this->myTimeStampInfo = theTimeStampInfo;
- this->myTypeChamp = theTypeChamp;
- this->myGeom2Profile = aCompatible->GetGeom2Profile();
- this->myGeom2Value = aCompatible->myGeom2Value;
- this->myGeomSet = aCompatible->GetGeomSet();
+ this->myTimeStampInfo = theTimeStampInfo;
+ this->myTypeChamp = theTypeChamp;
+ this->myGeom2Profile = aCompatible->GetGeom2Profile();
+ this->myGeom2Value = aCompatible->myGeom2Value;
+ this->myGeomSet = aCompatible->GetGeomSet();
}else
- EXCEPTION(std::runtime_error,"TTTimeStampValue::TTTimeStampValue - use incompatible arguments!");
+ EXCEPTION(std::runtime_error,"TTTimeStampValue::TTTimeStampValue - use incompatible arguments!");
}
TTTimeStampValue(const PTimeStampInfo& theTimeStampInfo,
- ETypeChamp theTypeChamp,
- const TGeom2Profile& theGeom2Profile,
- EModeSwitch theMode):
+ ETypeChamp theTypeChamp,
+ const TGeom2Profile& theGeom2Profile,
+ EModeSwitch theMode):
TModeSwitchInfo(theMode)
{
this->myTimeStampInfo = theTimeStampInfo;
const TGeom2Size& aGeom2Size = theTimeStampInfo->GetGeom2Size();
TGeom2Size::const_iterator anIter = aGeom2Size.begin();
for(; anIter != aGeom2Size.end(); anIter++){
- const EGeometrieElement& aGeom = anIter->first;
- TInt aNbElem = anIter->second;
+ const EGeometrieElement& aGeom = anIter->first;
+ TInt aNbElem = anIter->second;
- MED::PProfileInfo aProfileInfo;
- MED::TGeom2Profile::const_iterator anIter = theGeom2Profile.find(aGeom);
- if(anIter != theGeom2Profile.end())
- aProfileInfo = anIter->second;
+ MED::PProfileInfo aProfileInfo;
+ MED::TGeom2Profile::const_iterator anIter = theGeom2Profile.find(aGeom);
+ if(anIter != theGeom2Profile.end())
+ aProfileInfo = anIter->second;
- if(aProfileInfo && aProfileInfo->IsPresent())
- aNbElem = aProfileInfo->GetSize();
+ if(aProfileInfo && aProfileInfo->IsPresent())
+ aNbElem = aProfileInfo->GetSize();
- TInt aNbGauss = theTimeStampInfo->GetNbGauss(aGeom);
-
- this->GetMeshValue(aGeom).Allocate(aNbElem,aNbGauss,aNbComp);
+ TInt aNbGauss = theTimeStampInfo->GetNbGauss(aGeom);
+
+ this->GetMeshValue(aGeom).Allocate(aNbElem,aNbGauss,aNbComp);
}
}
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 TGrilleInfo
{
TTGrilleInfo(const PMeshInfo& theMeshInfo,
- const PGrilleInfo& theInfo)
+ const PGrilleInfo& theInfo)
{
myMeshInfo = theMeshInfo;
}
TTGrilleInfo(const PMeshInfo& theMeshInfo,
- const EGrilleType& type,
- const TInt nnoeuds)
+ const EGrilleType& type,
+ const TInt nnoeuds)
{
myMeshInfo = theMeshInfo;
- TInt aDim = theMeshInfo->GetDim();
+ TInt aSpaceDim = theMeshInfo->GetSpaceDim();
if(type == eGRILLE_STANDARD){
- myCoord.resize(aDim*nnoeuds);
- myCoordNames.resize(aDim*GetPNOMLength<eVersion>()+1);
- myCoordUnits.resize(aDim*GetPNOMLength<eVersion>()+1);
+ myCoord.resize(aSpaceDim*nnoeuds);
+ myCoordNames.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
+ myCoordUnits.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
} else { //if(type == eGRILLE_CARTESIENNE){
- myCoordNames.resize(aDim*GetPNOMLength<eVersion>()+aDim);
- myCoordUnits.resize(aDim*GetPNOMLength<eVersion>()+aDim);
+ myCoordNames.resize(aSpaceDim*GetPNOMLength<eVersion>()+aSpaceDim);
+ myCoordUnits.resize(aSpaceDim*GetPNOMLength<eVersion>()+aSpaceDim);
}
-
- myGrilleStructure.resize(theMeshInfo->myDim);
+ myGrilleStructure.resize(aSpaceDim);
myFamNumNode.resize(nnoeuds);
}
TTGrilleInfo(const PMeshInfo& theMeshInfo,
- const EGrilleType& type)
+ const EGrilleType& type)
{
myMeshInfo = theMeshInfo;
- TInt aDim = theMeshInfo->GetDim();
+ TInt aSpaceDim = theMeshInfo->GetSpaceDim();
if(type == eGRILLE_STANDARD){
- myCoordNames.resize(aDim*GetPNOMLength<eVersion>()+1);
- myCoordUnits.resize(aDim*GetPNOMLength<eVersion>()+1);
+ myCoordNames.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
+ myCoordUnits.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
} else {// if(type == eGRILLE_CARTESIENNE){
- myCoordNames.resize(aDim*GetPNOMLength<eVersion>()+aDim);
- myCoordUnits.resize(aDim*GetPNOMLength<eVersion>()+aDim);
+ myCoordNames.resize(aSpaceDim*GetPNOMLength<eVersion>()+aSpaceDim);
+ myCoordUnits.resize(aSpaceDim*GetPNOMLength<eVersion>()+aSpaceDim);
}
- TTGrilleInfo(theMeshInfo,type,0);
+ myGrilleStructure.resize(aSpaceDim);
}
TTGrilleInfo(const PMeshInfo& theMeshInfo,
- const EGrilleType& type,
- const MED::TIntVector& nbNodeVec)
+ const EGrilleType& type,
+ const MED::TIntVector& nbNodeVec)
{
myMeshInfo = theMeshInfo;
- TInt aDim = theMeshInfo->GetDim();
+ TInt aSpaceDim = theMeshInfo->GetSpaceDim();
if(type == eGRILLE_STANDARD){
- myCoordNames.resize(aDim*GetPNOMLength<eVersion>()+1);
- myCoordUnits.resize(aDim*GetPNOMLength<eVersion>()+1);
+ myCoordNames.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
+ myCoordUnits.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
} else {// if(type == eGRILLE_CARTESIENNE){
- myCoordNames.resize(aDim*GetPNOMLength<eVersion>()+aDim);
- myCoordUnits.resize(aDim*GetPNOMLength<eVersion>()+aDim);
+ myCoordNames.resize(aSpaceDim*GetPNOMLength<eVersion>()+aSpaceDim);
+ myCoordUnits.resize(aSpaceDim*GetPNOMLength<eVersion>()+aSpaceDim);
}
if(type != eGRILLE_STANDARD)
- for(int aAxe=0;aAxe<nbNodeVec.size();aAxe++){
- myIndixes[aAxe].resize(nbNodeVec[aAxe]);
- }
-
- TTGrilleInfo(theMeshInfo,type,0);
+ for(unsigned int aAxe=0;aAxe<nbNodeVec.size();aAxe++){
+ myIndixes[aAxe].resize(nbNodeVec[aAxe]);
+ }
+ myGrilleStructure.resize(aSpaceDim);
}
virtual