22 #ifndef MED_TStructures_HeaderFile
23 #define MED_TStructures_HeaderFile
28 #pragma warning(disable:4250)
35 template<
class TValue,
class TRepresentation>
57 operator TRepresentation ()
const
70 template<
class TVal,
class TRepresentation>
94 template<EVersion eVersion>
99 myName.resize(GetNOMLength<eVersion>()+1);
127 template<EVersion eVersion>
137 myDim = theInfo->GetDim();
139 myType = theInfo->GetType();
141 myDesc.resize(GetDESCLength<eVersion>()+1);
146 const std::string& theValue,
148 const std::string& theDesc):
155 myDesc.resize(GetDESCLength<eVersion>()+1);
176 template<EVersion eVersion>
188 myId = theInfo->GetId();
205 myAttrVal[anId] = theInfo->GetAttrVal(anId);
206 myAttrId[anId] = theInfo->GetAttrId(anId);
215 const std::string& theValue):
223 myGroupNames.resize(theNbGroup*GetLNOMLength<eVersion>()+1);
228 myAttrDesc.resize(theNbAttr*GetDESCLength<eVersion>()+1);
232 const std::string& theValue,
247 TStringSet::const_iterator anIter = theGroupNames.begin();
248 for(
TInt anId = 0; anIter != theGroupNames.end(); anIter++, anId++){
249 const std::string& aVal = *anIter;
259 for(
TInt anId = 0, anEnd = (
TInt)theAttrDescs.size(); anId < anEnd; anId++){
298 template<EVersion eVersion>
310 if(theInfo->IsElemNum())
316 if(theInfo->IsElemNames())
321 if(theInfo->GetNbElem()){
323 SetFamNum(anId, theInfo->GetFamNum(anId));
325 if(theInfo->IsElemNum() ==
eVRAI){
330 if(theInfo->IsElemNames() ==
eVRAI){
388 if(theFamilyNums.size())
395 for(
TInt anId = 0; anId < theNbElem; anId++){
396 const std::string& aVal = theElemNames[anId];
420 template<EVersion eVersion>
437 TInt aSpaceDim = theMeshInfo->GetSpaceDim();
439 myCoordNames.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
440 for(
TInt anId = 0; anId < aSpaceDim; anId++)
443 myCoordUnits.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
444 for(
TInt anId = 0; anId < aSpaceDim; anId++)
464 myCoordUnits.resize(theMeshInfo->mySpaceDim*GetPNOMLength<eVersion>()+1);
466 myCoordNames.resize(theMeshInfo->mySpaceDim*GetPNOMLength<eVersion>()+1);
481 (
TInt)theNodeCoords.size()/theMeshInfo->GetDim(),
490 TInt aSpaceDim = theMeshInfo->GetSpaceDim();
492 myCoordNames.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
493 if(!theCoordNames.empty())
494 for(
TInt anId = 0; anId < aSpaceDim; anId++)
497 myCoordUnits.resize(aSpaceDim*GetPNOMLength<eVersion>() + 1);
498 if(!theCoordUnits.empty())
499 for(
TInt anId = 0; anId < aSpaceDim; anId++)
533 template<EVersion eVersion>
544 myGeom = theInfo->GetGeom();
584 (
TInt)theIndexes.size() - 1,
600 template<EVersion eVersion>
611 myGeom = theInfo->GetGeom();
655 (
TInt)theIndexes.size()-1,
672 template<EVersion eVersion>
683 myGeom = theInfo->GetGeom();
689 for(
TInt anElemId = 0; anElemId <
myNbElem; anElemId++){
691 TCConnSlice aConnSlice2 = theInfo->GetConnSlice(anElemId);
692 for(
TInt anConnId = 0; anConnId < aConnDim; anConnId++){
693 aConnSlice[anConnId] = aConnSlice2[anConnId];
716 TInt aNbConn = GetNbConn<eVersion>(theGeom,
myEntity, theMeshInfo->myDim);
743 for(
TInt anElemId = 0; anElemId <
myNbElem; anElemId++){
745 for(
TInt anConnId = 0; anConnId < aConnDim; anConnId++){
746 aConnSlice[anConnId] = theConnectivities[anElemId*aConnDim + anConnId];
761 template<EVersion eVersion>
800 (
TInt)std::max(theNodes.size(),theDiameters.size() ),
819 template<EVersion eVersion>
837 myUnitNames.resize(myNbComp*GetPNOMLength<eVersion>()+1);
842 myType = theInfo->GetType();
851 const std::string& theValue,
859 myCompNames.resize(theNbComp*GetPNOMLength<eVersion>()+1);
860 myUnitNames.resize(theNbComp*GetPNOMLength<eVersion>()+1);
899 template<EVersion eVersion>
913 myGeom = boost::get<0>(aKey);
916 TInt aNbGauss = boost::get<1>(theInfo);
924 template<EVersion eVersion>
936 myDt = theInfo->GetDt();
938 myUnitDt.resize(GetPNOMLength<eVersion>()+1);
952 const std::string& theUnitDt,
964 myUnitDt.resize(GetPNOMLength<eVersion>()+1);
988 template<EVersion eVersion>
999 TInt aSize = boost::get<1>(theInfo);
1007 template<EVersion eVersion,
class TMeshValueType>
1015 if(TCompatible* aCompatible = dynamic_cast<TCompatible*>(theInfo.get())){
1020 this->
myGeomSet = aCompatible->GetGeomSet();
1022 EXCEPTION(std::runtime_error,
"TTTimeStampValue::TTTimeStampValue - use incompatible arguments!");
1037 TInt aNbComp = theTimeStampInfo->myFieldInfo->myNbComp;
1039 const TGeom2Size& aGeom2Size = theTimeStampInfo->GetGeom2Size();
1040 TGeom2Size::const_iterator anIter = aGeom2Size.begin();
1041 for(; anIter != aGeom2Size.end(); anIter++){
1043 TInt aNbElem = anIter->second;
1046 MED::TGeom2Profile::const_iterator anIter = theGeom2Profile.find(aGeom);
1047 if(anIter != theGeom2Profile.end())
1048 aProfileInfo = anIter->second;
1050 if(aProfileInfo && aProfileInfo->IsPresent())
1051 aNbElem = aProfileInfo->GetSize();
1053 TInt aNbGauss = theTimeStampInfo->GetNbGauss(aGeom);
1055 this->
GetMeshValue(aGeom).Allocate(aNbElem,aNbGauss,aNbComp);
1088 this->
GetMeshValue(theGeom).Allocate(theNbElem,theNbGauss,theNbComp,theMode);
1100 template<EVersion eVersion>
1109 myCoord = theInfo->GetNodeCoord();
1134 TInt aSpaceDim = theMeshInfo->GetSpaceDim();
1136 myCoord.resize(aSpaceDim*nnoeuds);
1137 myCoordNames.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
1138 myCoordUnits.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
1140 myCoordNames.resize(aSpaceDim*GetPNOMLength<eVersion>()+aSpaceDim);
1141 myCoordUnits.resize(aSpaceDim*GetPNOMLength<eVersion>()+aSpaceDim);
1151 TInt aSpaceDim = theMeshInfo->GetSpaceDim();
1153 myCoordNames.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
1154 myCoordUnits.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
1156 myCoordNames.resize(aSpaceDim*GetPNOMLength<eVersion>()+aSpaceDim);
1157 myCoordUnits.resize(aSpaceDim*GetPNOMLength<eVersion>()+aSpaceDim);
1168 TInt aSpaceDim = theMeshInfo->GetSpaceDim();
1170 myCoordNames.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
1171 myCoordUnits.resize(aSpaceDim*GetPNOMLength<eVersion>()+1);
1173 myCoordNames.resize(aSpaceDim*GetPNOMLength<eVersion>()+aSpaceDim);
1174 myCoordUnits.resize(aSpaceDim*GetPNOMLength<eVersion>()+aSpaceDim);
1178 for(
unsigned int aAxe=0;aAxe<nbNodeVec.size();aAxe++){
1179 myIndixes[aAxe].resize(nbNodeVec[aAxe]);