23 #ifndef MED_Structures_HeaderFile
24 #define MED_Structures_HeaderFile
30 #pragma warning(disable:4251)
52 const std::string& theValue);
74 virtual std::string GetName()
const = 0;
75 virtual void SetName(
const std::string& theValue) = 0;
95 myModeSwitch(theModeSwitch)
117 virtual std::string GetDesc()
const = 0;
118 virtual void SetDesc(
const std::string& theValue) = 0;
149 virtual std::string GetGroupName(
TInt theId)
const = 0;
151 virtual void SetGroupName(
TInt theId,
const std::string& theValue) = 0;
162 void SetAttrId(
TInt theId,
TInt theVal);
169 void SetAttrVal(
TInt theId,
TInt theVal);
174 virtual std::string GetAttrDesc(
TInt theId)
const = 0;
176 virtual void SetAttrDesc(
TInt theId,
const std::string& theValue) = 0;
199 void SetFamNum(
TInt theId,
TInt theVal);
217 void SetElemNum(
TInt theId,
TInt theVal);
227 virtual std::string GetElemName(
TInt theId)
const = 0;
229 virtual void SetElemName(
TInt theId,
const std::string& theValue) = 0;
264 virtual std::string GetCoordName(
TInt theId)
const = 0;
266 virtual void SetCoordName(
TInt theId,
const std::string& theValue) = 0;
270 virtual std::string GetCoordUnit(
TInt theId)
const = 0;
272 virtual void SetCoordUnit(
TInt theId,
const std::string& theValue) = 0;
297 virtual TInt GetConnDim()
const = 0;
380 TInt GetNbFaces(
TInt theElemId)
const;
417 virtual std::string GetCompName(
TInt theId)
const = 0;
419 virtual void SetCompName(
TInt theId,
const std::string& theValue) = 0;
423 virtual std::string GetUnitName(
TInt theId)
const = 0;
425 virtual void SetUnitName(
TInt theId,
const std::string& theValue) = 0;
448 typedef boost::tuple<EGeometrieElement,std::string>
TKey;
449 typedef boost::tuple<TKey,TInt>
TInfo;
453 operator()(
const TKey& theLeft,
const TKey& theRight)
const;
535 virtual std::string GetUnitDt()
const = 0;
537 virtual void SetUnitDt(
const std::string& theValue) = 0;
547 typedef boost::tuple<TKey,TInt>
TInfo;
559 void SetElemNum(
TInt theId,
TInt theVal);
583 Allocate(
TInt theNbElem,
612 template<
class TValueType>
643 return (
unsigned char*)&
myValue[0];
670 aValueSliceArr[aGaussId] =
677 aValueSliceArr[aGaussId] =
681 return aValueSliceArr;
692 aValueSliceArr[aGaussId] =
699 aValueSliceArr[aGaussId] =
703 return aValueSliceArr;
714 aValueSliceArr[aCompId] =
721 aValueSliceArr[aCompId] =
725 return aValueSliceArr;
736 aValueSliceArr[aCompId] =
740 return aValueSliceArr;
745 aValueSliceArr[aGaussId] =
748 return aValueSliceArr;
770 typedef std::set<EGeometrieElement>
TGeom;
793 GetTypeChamp()
const = 0;
824 template<
class TMeshValueType>
830 typedef typename TMeshValueType::TElement
TElement;
856 typename TTGeom2Value::const_iterator anIter =
myGeom2Value.find(theGeom);
858 EXCEPTION(std::runtime_error,
"TTimeStampValue::GetMeshValuePtr - myGeom2Value.find(theGeom) fails");
859 return anIter->second;
905 template<
class TMeshValueTypeFrom,
class TMeshValueTypeTo>
912 typedef typename TMeshValueTypeTo::TElement TElementTo;
914 typename TimeStampValueTypeFrom::TTGeom2Value& aGeom2Value = theTimeStampValueFrom->
myGeom2Value;
915 typename TimeStampValueTypeFrom::TTGeom2Value::const_iterator anIter = aGeom2Value.begin();
916 for(; anIter != aGeom2Value.end(); anIter++){
918 const typename TimeStampValueTypeFrom::TTMeshValue& aMeshValue = *anIter->second;
919 typename TimeStampValueTypeTo::TTMeshValue& aMeshValue2 = theTimeStampValueTo->GetMeshValue(aGeom);
920 aMeshValue2.Allocate(aMeshValue.myNbElem,
921 aMeshValue.myNbGauss,
923 aMeshValue.myModeSwitch);
926 TInt aSize = aValue.size();
927 for(
TInt anId = 0; anId < aSize; anId++)
928 aValue2[anId] = TElementTo(aValue[anId]);
932 template<
class TMeshValueType>
938 typename TimeStampValueType::TTGeom2Value& aGeom2Value = theTimeStampValueFrom->
myGeom2Value;
939 typename TimeStampValueType::TTGeom2Value::const_iterator anIter = aGeom2Value.begin();
940 for(; anIter != aGeom2Value.end(); anIter++){
942 const typename TimeStampValueType::TTMeshValue& aMeshValue = *anIter->second;
943 typename TimeStampValueType::TTMeshValue& aMeshValue2 = theTimeStampValueTo->GetMeshValue(aGeom);
944 aMeshValue2 = aMeshValue;
954 if(theValueFrom->GetTypeChamp() == theValueTo->GetTypeChamp()){
955 if(theValueFrom->GetTypeChamp() ==
eFLOAT64)
956 CopyTimeStampValue<TFloatMeshValue>(theValueFrom, theValueTo);
957 else if(theValueFrom->GetTypeChamp() ==
eINT)
958 CopyTimeStampValue<TIntMeshValue>(theValueFrom, theValueTo);
960 if(theValueFrom->GetTypeChamp() ==
eFLOAT64 && theValueTo->GetTypeChamp() ==
eINT)
961 CopyTimeStampValue<TFloatMeshValue, TIntMeshValue>(theValueFrom, theValueTo);
962 else if(theValueFrom->GetTypeChamp() ==
eINT && theValueTo->GetTypeChamp() ==
eFLOAT64)
963 CopyTimeStampValue<TIntMeshValue, TFloatMeshValue>(theValueFrom, theValueTo);
1006 virtual std::string GetCoordName(
TInt theId)
const = 0 ;
1008 virtual void SetCoordName(
TInt theId,
const std::string& theValue) = 0;
1012 virtual std::string GetCoordUnit(
TInt theId)
const = 0;
1014 virtual void SetCoordUnit(
TInt theId,
const std::string& theValue) = 0;
1020 const TIndexes& GetMapOfIndexes()
const ;
1028 TInt GetNbIndexes(
TInt theAxisNumber);
1032 TInt GetNbSubCells();
1043 const TIntVector& GetGrilleStructure()
const;
1047 void SetGrilleStructure(
TInt theAxis,
TInt theNb);
1056 void SetFamNum(
TInt theId,
TInt theVal);
1063 TInt GetFamSubNum(
TInt theId)
const;
1065 void SetFamSubNum(
TInt theId,
TInt theVal);
1072 TInt GetFamNumNode(
TInt theId)
const;
1074 void SetFamNumNode(
TInt theId,
TInt theVal);