Version: 9.16.0
MED_TStructures.hxx
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
6// This library is free software; you can redistribute it and/or
7// modify it under the terms of the GNU Lesser General Public
8// License as published by the Free Software Foundation; either
9// version 2.1 of the License, or (at your option) any later version.
10//
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14// Lesser General Public License for more details.
15//
16// You should have received a copy of the GNU Lesser General Public
17// License along with this library; if not, write to the Free Software
18// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22
23#ifndef MED_TStructures_HeaderFile
24#define MED_TStructures_HeaderFile
25
26#include "MED_Structures.hxx"
27
28#ifdef WIN32
29#pragma warning(disable:4250)
30#endif
31#include <utilities.h>
32namespace MED
33{
34 //---------------------------------------------------------------
36 template<class TValue, class TRepresentation>
38 {
40 TRepresentation myRepresentation;
41
42 TValueHolder(TValue& theValue):
43 myValue(theValue),
44 myRepresentation(TRepresentation(theValue))
45 {}
46
48 {
50 }
51
52 TRepresentation*
54 {
55 return &myRepresentation;
56 }
57
58 operator TRepresentation () const
59 {
60 return myRepresentation;
61 }
62
63 const TValue&
65 {
66 return myValue;
67 }
68 };
69
71 template<class TVal, class TRepresentation>
72 struct TValueHolder<TVector<TVal>, TRepresentation>
73 {
76 TRepresentation* myRepresentation;
77
78 TValueHolder(TValue& theValue):
79 myValue(theValue)
80 {
81 if(theValue.empty())
82 myRepresentation = (TRepresentation*)NULL;
83 else
84 myRepresentation = (TRepresentation*)&theValue[0];
85 }
86
87 TRepresentation*
89 {
90 return myRepresentation;
91 }
92 };
93
94 //---------------------------------------------------------------
95 struct TTNameInfo: virtual TNameInfo
96 {
97 TTNameInfo(const std::string& theValue)
98 {
99 myName.resize(GetNOMLength()+1);
100 SetName(theValue);
101 }
102
103 virtual
104 std::string
105 GetName() const
106 {
107 return GetString(0, GetNOMLength(), myName);
108 }
109
110 virtual
111 void
112 SetName(const std::string& theValue)
113 {
114 SetString(0, GetNOMLength(), myName, theValue);
115 }
116
117 virtual
118 void
119 SetName(const TString& theValue)
120 {
121 SetString(0, GetNOMLength(), myName, theValue);
122 }
123 };
124
125 //---------------------------------------------------------------
126 struct TTMeshInfo:
127 virtual TMeshInfo,
128 virtual TTNameInfo
129 {
131
132 TTMeshInfo(const PMeshInfo& theInfo):
133 TNameInfoBase(theInfo->GetName())
134 {
135 myDim = theInfo->GetDim();
136 mySpaceDim = theInfo->GetSpaceDim();
137 myType = theInfo->GetType();
138
139 myDesc.resize(GetDESCLength()+1);
140 SetDesc(theInfo->GetDesc());
141 }
142
143 TTMeshInfo(TInt theDim, TInt theSpaceDim,
144 const std::string& theValue,
145 EMaillage theType,
146 const std::string& theDesc):
147 TNameInfoBase(theValue)
148 {
149 myDim = theDim;
150 mySpaceDim = theSpaceDim;
151 myType = theType;
152
153 myDesc.resize(GetDESCLength()+1);
154 SetDesc(theDesc);
155 }
156
157 virtual
158 std::string
159 GetDesc() const
160 {
161 return GetString(0, GetDESCLength(), myDesc);
162 }
163
164 virtual
165 void
166 SetDesc(const std::string& theValue)
167 {
168 SetString(0, GetDESCLength(), myDesc, theValue);
169 }
170 };
171
172 //---------------------------------------------------------------
174 virtual TFamilyInfo,
175 virtual TTNameInfo
176 {
178
179 TTFamilyInfo(const PMeshInfo& theMeshInfo, const PFamilyInfo& theInfo):
180 TNameInfoBase(theInfo->GetName())
181 {
182 myMeshInfo = theMeshInfo;
183
184 myId = theInfo->GetId();
185
186 myNbGroup = theInfo->GetNbGroup();
188 if(myNbGroup){
189 for(TInt anId = 0; anId < myNbGroup; anId++){
190 SetGroupName(anId,theInfo->GetGroupName(anId));
191 }
192 }
193
194 myNbAttr = theInfo->GetNbAttr();
195 myAttrId.resize(myNbAttr);
196 myAttrVal.resize(myNbAttr);
198 if(myNbAttr){
199 for(TInt anId = 0; anId < myNbAttr; anId++){
200 SetAttrDesc(anId,theInfo->GetAttrDesc(anId));
201 myAttrVal[anId] = theInfo->GetAttrVal(anId);
202 myAttrId[anId] = theInfo->GetAttrId(anId);
203 }
204 }
205 }
206
207 TTFamilyInfo(const PMeshInfo& theMeshInfo,
208 TInt theNbGroup,
209 TInt theNbAttr,
210 TInt theId,
211 const std::string& theValue):
212 TNameInfoBase(theValue)
213 {
214 myMeshInfo = theMeshInfo;
215
216 myId = theId;
217
218 myNbGroup = theNbGroup;
219 myGroupNames.resize(theNbGroup*GetLNOMLength()+1);
220
221 myNbAttr = theNbAttr;
222 myAttrId.resize(theNbAttr);
223 myAttrVal.resize(theNbAttr);
224 myAttrDesc.resize(theNbAttr*GetDESCLength()+1);
225 }
226
227 TTFamilyInfo(const PMeshInfo& theMeshInfo,
228 const std::string& theValue,
229 TInt theId,
230 const TStringSet& theGroupNames,
231 const TStringVector& theAttrDescs,
232 const TIntVector& theAttrIds,
233 const TIntVector& theAttrVals):
234 TNameInfoBase(theValue)
235 {
236 myMeshInfo = theMeshInfo;
237
238 myId = theId;
239
240 myNbGroup = (TInt)theGroupNames.size();
242 if(myNbGroup){
243 TStringSet::const_iterator anIter = theGroupNames.begin();
244 for(TInt anId = 0; anIter != theGroupNames.end(); anIter++, anId++){
245 const std::string& aVal = *anIter;
246 SetGroupName(anId,aVal);
247 }
248 }
249
250 myNbAttr = (TInt)theAttrDescs.size();
251 myAttrId.resize(myNbAttr);
252 myAttrVal.resize(myNbAttr);
254 if(myNbAttr){
255 for(TInt anId = 0, anEnd = (TInt)theAttrDescs.size(); anId < anEnd; anId++){
256 SetAttrDesc(anId,theAttrDescs[anId]);
257 myAttrVal[anId] = theAttrVals[anId];
258 myAttrId[anId] = theAttrIds[anId];
259 }
260 }
261 }
262
263 virtual
264 std::string
265 GetGroupName(TInt theId) const
266 {
267 return GetString(theId, GetLNOMLength(), myGroupNames);
268 }
269
270 virtual
271 void
272 SetGroupName(TInt theId, const std::string& theValue)
273 {
274 SetString(theId, GetLNOMLength(), myGroupNames, theValue);
275 }
276
277 virtual
278 std::string
279 GetAttrDesc(TInt theId) const
280 {
281 return GetString(theId, GetDESCLength(), myAttrDesc);
282 }
283
284 virtual
285 void
286 SetAttrDesc(TInt theId, const std::string& theValue)
287 {
288 SetString(theId, GetDESCLength(), myAttrDesc, theValue);
289 }
290 };
291
292 //---------------------------------------------------------------
293 struct TTElemInfo: virtual TElemInfo
294 {
295 TTElemInfo(const PMeshInfo& theMeshInfo, const PElemInfo& theInfo)
296 {
297 myMeshInfo = theMeshInfo;
298
299 myNbElem = theInfo->GetNbElem();
300 myFamNum.reset(new TElemNum(myNbElem));
301 myIsFamNum = eFAUX; // is set to eVRAI in SetFamNum()
302
303 myIsElemNum = theInfo->IsElemNum();
304 if(theInfo->IsElemNum())
305 myElemNum.reset(new TElemNum(myNbElem));
306 else
307 myElemNum.reset(new TElemNum());
308
309 myIsElemNames = theInfo->IsElemNames();
310 if(theInfo->IsElemNames())
311 myElemNames.reset(new TString(myNbElem*GetPNOMLength() + 1));
312 else
313 myElemNames.reset(new TString());
314
315 if(theInfo->GetNbElem()){
316 for(TInt anId = 0; anId < myNbElem; anId++){
317 SetFamNum(anId, theInfo->GetFamNum(anId));
318 }
319 if(theInfo->IsElemNum() == eVRAI){
320 for(TInt anId = 0; anId < myNbElem; anId++){
321 SetElemNum(anId, theInfo->GetElemNum(anId));
322 }
323 }
324 if(theInfo->IsElemNames() == eVRAI){
325 for(TInt anId = 0; anId < myNbElem; anId++){
326 SetElemName(anId,theInfo->GetElemName(anId));
327 }
328 }
329 }
330 }
331
332 TTElemInfo(const PMeshInfo& theMeshInfo,
333 TInt theNbElem,
334 EBooleen theIsElemNum,
335 EBooleen theIsElemNames)
336 {
337 myMeshInfo = theMeshInfo;
338
339 myNbElem = theNbElem;
340 myFamNum.reset(new TElemNum(theNbElem));
341 myIsFamNum = eFAUX; // is set to eVRAI in SetFamNum()
342
343 myIsElemNum = theIsElemNum;
344 if(theIsElemNum)
345 myElemNum.reset(new TElemNum(theNbElem));
346 else
347 myElemNum.reset(new TElemNum());
348
349 myIsElemNames = theIsElemNames;
350 if(theIsElemNames)
351 myElemNames.reset(new TString(theNbElem*GetPNOMLength() + 1));
352 else
353 myElemNames.reset(new TString());
354 }
355
356 TTElemInfo(const PMeshInfo& theMeshInfo,
357 TInt theNbElem,
358 const TIntVector& theFamilyNums,
359 const TIntVector& theElemNums,
360 const TStringVector& theElemNames)
361 {
362 myMeshInfo = theMeshInfo;
363
364 myNbElem = theNbElem;
365 myFamNum.reset(new TElemNum(theNbElem));
366 myIsFamNum = eFAUX; // is set to eVRAI in SetFamNum()
367
368 myIsElemNum = theElemNums.size()? eVRAI: eFAUX;
369 if(myIsElemNum)
370 myElemNum.reset(new TElemNum(theNbElem));
371 else
372 myElemNum.reset(new TElemNum());
373
374 myIsElemNames = theElemNames.size()? eVRAI: eFAUX;
375 if(myIsElemNames)
376 myElemNames.reset(new TString(theNbElem*GetPNOMLength() + 1));
377 else
378 myElemNames.reset(new TString());
379
380 if(theNbElem){
381
382 if(theFamilyNums.size())
383 *myFamNum = theFamilyNums;
384
385 if(myIsElemNum)
386 *myElemNum = theElemNums;
387
388 if(myIsElemNames){
389 for(TInt anId = 0; anId < theNbElem; anId++){
390 const std::string& aVal = theElemNames[anId];
391 SetElemName(anId,aVal);
392 }
393 }
394 }
395 }
396
397 virtual
398 std::string
399 GetElemName(TInt theId) const
400 {
401 return GetString(theId,GetPNOMLength(), *myElemNames);
402 }
403
404 virtual
405 void
406 SetElemName(TInt theId, const std::string& theValue)
407 {
408 SetString(theId,GetPNOMLength(), *myElemNames, theValue);
409 }
410 };
411
412 //---------------------------------------------------------------
413 struct TTNodeInfo:
414 virtual TNodeInfo,
415 virtual TTElemInfo
416 {
418
419 TTNodeInfo(const PMeshInfo& theMeshInfo, const PNodeInfo& theInfo):
420 TNodeInfo(theInfo),
421 TElemInfoBase(theMeshInfo, theInfo)
422 {
423 myModeSwitch = theInfo->GetModeSwitch();
424
425 mySystem = theInfo->GetSystem();
426
427 myCoord.reset(new TNodeCoord(*theInfo->myCoord));
428
429 TInt aSpaceDim = theMeshInfo->GetSpaceDim();
430
431 myCoordNames.resize(aSpaceDim*GetPNOMLength()+1);
432 for(TInt anId = 0; anId < aSpaceDim; anId++)
433 SetCoordName(anId,theInfo->GetCoordName(anId));
434
435 myCoordUnits.resize(aSpaceDim*GetPNOMLength()+1);
436 for(TInt anId = 0; anId < aSpaceDim; anId++)
437 SetCoordUnit(anId,theInfo->GetCoordUnit(anId));
438 }
439
440 TTNodeInfo(const PMeshInfo& theMeshInfo,
441 TInt theNbElem,
442 EModeSwitch theMode,
443 ERepere theSystem,
444 EBooleen theIsElemNum,
445 EBooleen theIsElemNames):
446 TModeSwitchInfo(theMode),
447 TElemInfoBase(theMeshInfo,
448 theNbElem,
449 theIsElemNum,
450 theIsElemNames)
451 {
452 mySystem = theSystem;
453
454 myCoord.reset(new TNodeCoord(theNbElem * theMeshInfo->mySpaceDim));
455
456 myCoordUnits.resize(theMeshInfo->mySpaceDim*GetPNOMLength()+1);
457
458 myCoordNames.resize(theMeshInfo->mySpaceDim*GetPNOMLength()+1);
459 }
460
461
462 TTNodeInfo(const PMeshInfo& theMeshInfo,
463 const TFloatVector& theNodeCoords,
464 EModeSwitch theMode,
465 ERepere theSystem,
466 const TStringVector& theCoordNames,
467 const TStringVector& theCoordUnits,
468 const TIntVector& theFamilyNums,
469 const TIntVector& theElemNums,
470 const TStringVector& theElemNames):
471 TModeSwitchInfo(theMode),
472 TElemInfoBase(theMeshInfo,
473 (TInt)theNodeCoords.size()/theMeshInfo->GetDim(),
474 theFamilyNums,
475 theElemNums,
476 theElemNames)
477 {
478 mySystem = theSystem;
479
480 myCoord.reset(new TNodeCoord(theNodeCoords));
481
482 TInt aSpaceDim = theMeshInfo->GetSpaceDim();
483
484 myCoordNames.resize(aSpaceDim*GetPNOMLength()+1);
485 if(!theCoordNames.empty())
486 for(TInt anId = 0; anId < aSpaceDim; anId++)
487 SetCoordName(anId,theCoordNames[anId]);
488
489 myCoordUnits.resize(aSpaceDim*GetPNOMLength() + 1);
490 if(!theCoordUnits.empty())
491 for(TInt anId = 0; anId < aSpaceDim; anId++)
492 SetCoordUnit(anId, theCoordUnits[anId]);
493 }
494
495 virtual
496 std::string
497 GetCoordName(TInt theId) const
498 {
499 return GetString(theId,GetPNOMLength(),myCoordNames);
500 }
501
502 virtual
503 void
504 SetCoordName(TInt theId, const std::string& theValue)
505 {
506 SetString(theId,GetPNOMLength(),myCoordNames,theValue);
507 }
508
509 virtual
510 std::string
511 GetCoordUnit(TInt theId) const
512 {
513 return GetString(theId,GetPNOMLength(),myCoordUnits);
514 }
515
516 virtual
517 void
518 SetCoordUnit(TInt theId, const std::string& theValue)
519 {
520 SetString(theId,GetPNOMLength(),myCoordUnits,theValue);
521 }
522 };
523
524 //---------------------------------------------------------------
526 virtual TPolygoneInfo,
527 virtual TTElemInfo
528 {
530
531 TTPolygoneInfo(const PMeshInfo& theMeshInfo, const PPolygoneInfo& theInfo):
532 TElemInfoBase(theMeshInfo,theInfo)
533 {
534 myEntity = theInfo->GetEntity();
535 myGeom = theInfo->GetGeom();
536
537 myIndex.reset(new TElemNum(*theInfo->myIndex));
538 myConn.reset(new TElemNum(*theInfo->myConn));
539
540 myConnMode = theInfo->GetConnMode();
541 }
542
543 TTPolygoneInfo(const PMeshInfo& theMeshInfo,
544 EEntiteMaillage theEntity,
545 EGeometrieElement theGeom,
546 TInt theNbElem,
547 TInt theConnSize,
548 EConnectivite theConnMode,
549 EBooleen theIsElemNum,
550 EBooleen theIsElemNames):
551 TElemInfoBase(theMeshInfo,
552 theNbElem,
553 theIsElemNum,
554 theIsElemNames)
555 {
556 myEntity = theEntity;
557 myGeom = theGeom;
558
559 myIndex.reset(new TElemNum(theNbElem + 1));
560 myConn.reset(new TElemNum(theConnSize));
561
562 myConnMode = theConnMode;
563 }
564
565 TTPolygoneInfo(const PMeshInfo& theMeshInfo,
566 EEntiteMaillage theEntity,
567 EGeometrieElement theGeom,
568 const TIntVector& theIndexes,
569 const TIntVector& theConnectivities,
570 EConnectivite theConnMode,
571 const TIntVector& theFamilyNums,
572 const TIntVector& theElemNums,
573 const TStringVector& theElemNames):
574 TElemInfoBase(theMeshInfo,
575 (TInt)theIndexes.size() - 1,
576 theFamilyNums,
577 theElemNums,
578 theElemNames)
579 {
580 myEntity = theEntity;
581 myGeom = theGeom;
582
583 myIndex.reset(new TElemNum(theIndexes));
584 myConn.reset(new TElemNum(theConnectivities));
585
586 myConnMode = theConnMode;
587 }
588 };
589
590 //---------------------------------------------------------------
592 virtual TPolyedreInfo,
593 virtual TTElemInfo
594 {
596
597 TTPolyedreInfo(const PMeshInfo& theMeshInfo, const PPolyedreInfo& theInfo):
598 TElemInfoBase(theMeshInfo,theInfo)
599 {
600 myEntity = theInfo->GetEntity();
601 myGeom = theInfo->GetGeom();
602
603 myIndex.reset(new TElemNum(*theInfo->myIndex));
604 myFaces.reset(new TElemNum(*theInfo->myFaces));
605 myConn.reset(new TElemNum(*theInfo->myConn));
606
607 myConnMode = theInfo->GetConnMode();
608 }
609
610 TTPolyedreInfo(const PMeshInfo& theMeshInfo,
611 EEntiteMaillage theEntity,
612 EGeometrieElement theGeom,
613 TInt theNbElem,
614 TInt theNbFaces,
615 TInt theConnSize,
616 EConnectivite theConnMode,
617 EBooleen theIsElemNum,
618 EBooleen theIsElemNames):
619 TElemInfoBase(theMeshInfo,
620 theNbElem,
621 theIsElemNum,
622 theIsElemNames)
623 {
624 myEntity = theEntity;
625 myGeom = theGeom;
626
627 myIndex.reset(new TElemNum(theNbElem + 1));
628 myFaces.reset(new TElemNum(theNbFaces));
629 myConn.reset(new TElemNum(theConnSize));
630
631 myConnMode = theConnMode;
632 }
633
634 TTPolyedreInfo(const PMeshInfo& theMeshInfo,
635 EEntiteMaillage theEntity,
636 EGeometrieElement theGeom,
637 const TIntVector& theIndexes,
638 const TIntVector& theFaces,
639 const TIntVector& theConnectivities,
640 EConnectivite theConnMode,
641 const TIntVector& theFamilyNums,
642 const TIntVector& theElemNums,
643 const TStringVector& theElemNames):
644 TElemInfoBase(theMeshInfo,
645 (TInt)theIndexes.size()-1,
646 theFamilyNums,
647 theElemNums,
648 theElemNames)
649 {
650 myEntity = theEntity;
651 myGeom = theGeom;
652
653 myIndex.reset(new TElemNum(theIndexes));
654 myFaces.reset(new TElemNum(theFaces));
655 myConn.reset(new TElemNum(theConnectivities));
656
657 myConnMode = theConnMode;
658 }
659 };
660
661 //---------------------------------------------------------------
662 struct TTCellInfo:
663 virtual TCellInfo,
664 virtual TTElemInfo
665 {
667
668 TTCellInfo(const PMeshInfo& theMeshInfo, const PCellInfo& theInfo):
669 TElemInfoBase(theMeshInfo,theInfo)
670 {
671 myEntity = theInfo->GetEntity();
672 myGeom = theInfo->GetGeom();
673 myConnMode = theInfo->GetConnMode();
674
675 TInt aConnDim = GetNbNodes(myGeom);
676 TInt aNbConn = GetNbConn(myGeom, myEntity, myMeshInfo->myDim);
677 myConn.reset(new TElemNum(myNbElem * aNbConn));
678 for(TInt anElemId = 0; anElemId < myNbElem; anElemId++){
679 TConnSlice aConnSlice = GetConnSlice(anElemId);
680 TCConnSlice aConnSlice2 = theInfo->GetConnSlice(anElemId);
681 for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){
682 aConnSlice[anConnId] = aConnSlice2[anConnId];
683 }
684 }
685 }
686
687 TTCellInfo(const PMeshInfo& theMeshInfo,
688 EEntiteMaillage theEntity,
689 EGeometrieElement theGeom,
690 TInt theNbElem,
691 EConnectivite theConnMode,
692 EBooleen theIsElemNum,
693 EBooleen theIsElemNames,
694 EModeSwitch theMode):
695 TModeSwitchInfo(theMode),
696 TElemInfoBase(theMeshInfo,
697 theNbElem,
698 theIsElemNum,
699 theIsElemNames)
700 {
701 myEntity = theEntity;
702 myGeom = theGeom;
703
704 myConnMode = theConnMode;
705 TInt aNbConn = GetNbConn(theGeom, myEntity, theMeshInfo->myDim);
706 myConn.reset(new TElemNum(theNbElem * aNbConn));
707 }
708
709 TTCellInfo(const PMeshInfo& theMeshInfo,
710 EEntiteMaillage theEntity,
711 EGeometrieElement theGeom,
712 const TIntVector& theConnectivities,
713 EConnectivite theConnMode,
714 const TIntVector& theFamilyNums,
715 const TIntVector& theElemNums,
716 const TStringVector& theElemNames,
717 EModeSwitch theMode):
718 TModeSwitchInfo(theMode),
719 TElemInfoBase(theMeshInfo,
720 (TInt)theConnectivities.size() / GetNbNodes(theGeom),
721 theFamilyNums,
722 theElemNums,
723 theElemNames)
724 {
725 myEntity = theEntity;
726 myGeom = theGeom;
727
728 myConnMode = theConnMode;
729 TInt aConnDim = GetNbNodes(myGeom);
730 TInt aNbConn = GetNbConn(myGeom, myEntity, myMeshInfo->myDim);
731 myConn.reset(new TElemNum(myNbElem * aNbConn));
732 for(TInt anElemId = 0; anElemId < myNbElem; anElemId++){
733 TConnSlice aConnSlice = GetConnSlice(anElemId);
734 for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){
735 aConnSlice[anConnId] = theConnectivities[anElemId*aConnDim + anConnId];
736 }
737 }
738 }
739
740 virtual
741 TInt
743 {
744 return GetNbConn(myGeom, myEntity, myMeshInfo->myDim);
745 }
746
747 };
748
749 //---------------------------------------------------------------
750 struct TTBallInfo:
751 virtual TBallInfo,
752 virtual TTCellInfo
753 {
755
756 TTBallInfo(const PMeshInfo& theMeshInfo, const PBallInfo& theInfo):
757 TCellInfoBase::TElemInfoBase(theMeshInfo, theInfo),
758 TCellInfoBase(theMeshInfo,theInfo)
759 {
760 myDiameters = theInfo->myDiameters;
761 }
762
763 TTBallInfo(const PMeshInfo& theMeshInfo,
764 TInt theNbElem,
765 EBooleen theIsElemNum ):
766 TCellInfoBase::TElemInfoBase(theMeshInfo,
767 theNbElem,
768 theIsElemNum,
769 /*theIsElemNames=*/eFAUX),
770 TCellInfoBase(theMeshInfo,
772 eBALL,
773 theNbElem,
774 /*EConnectivite=*/eNOD,
775 theIsElemNum,
776 /*theIsElemNames=*/eFAUX,
778 {
779 myDiameters.resize( theNbElem );
780 }
781
782 TTBallInfo(const PMeshInfo& theMeshInfo,
783 const TIntVector& theNodes,
784 TFloatVector& theDiameters,
785 const TIntVector& theFamilyNums,
786 const TIntVector& theElemNums):
787 TCellInfoBase::TElemInfoBase(theMeshInfo,
788 (TInt)std::max(theNodes.size(),theDiameters.size() ),
789 theFamilyNums,
790 theElemNums,
791 TStringVector()),
792 TCellInfoBase(theMeshInfo,
794 eBALL,
795 theNodes,
796 /*EConnectivite=*/eNOD,
797 theFamilyNums,
798 theElemNums,
801 {
802 myDiameters.swap( theDiameters );
803 }
804 };
805
806 //---------------------------------------------------------------
808 virtual TFieldInfo,
809 virtual TTNameInfo
810 {
812
813 TTFieldInfo(const PMeshInfo& theMeshInfo, const PFieldInfo& theInfo):
814 TNameInfoBase(theInfo->GetName())
815 {
816 myMeshInfo = theMeshInfo;
817
818 myNbComp = theInfo->GetNbComp();
820 for(TInt anId = 0; anId < myNbComp; anId++){
821 SetCompName(anId,theInfo->GetCompName(anId));
822 }
823
825 for(TInt anId = 0; anId < myNbComp; anId++){
826 SetUnitName(anId,theInfo->GetUnitName(anId));
827 }
828
829 myType = theInfo->GetType();
830
831 myIsLocal = theInfo->GetIsLocal();
832 myNbRef = theInfo->GetNbRef();
833 }
834
835 TTFieldInfo(const PMeshInfo& theMeshInfo,
836 TInt theNbComp,
837 ETypeChamp theType,
838 const std::string& theValue,
839 EBooleen theIsLocal,
840 TInt theNbRef):
841 TNameInfoBase(theValue)
842 {
843 myMeshInfo = theMeshInfo;
844
845 myNbComp = theNbComp;
846 myCompNames.resize(theNbComp*GetPNOMLength()+1);
847 myUnitNames.resize(theNbComp*GetPNOMLength()+1);
848
849 myType = theType;
850
851 myIsLocal = theIsLocal;
852 myNbRef = theNbRef;
853 }
854
855 virtual
856 std::string
857 GetCompName(TInt theId) const
858 {
859 return GetString(theId,GetPNOMLength(),myCompNames);
860 }
861
862 virtual
863 void
864 SetCompName(TInt theId, const std::string& theValue)
865 {
866 SetString(theId,GetPNOMLength(),myCompNames,theValue);
867 }
868
869 virtual
870 std::string
871 GetUnitName(TInt theId) const
872 {
873 return GetString(theId,GetPNOMLength(),myUnitNames);
874 }
875
876 virtual
877 void
878 SetUnitName(TInt theId, const std::string& theValue)
879 {
880 SetString(theId,GetPNOMLength(),myUnitNames,theValue);
881 }
882 };
883
884 //---------------------------------------------------------------
885 struct TTGaussInfo:
886 virtual TGaussInfo,
887 virtual TTNameInfo
888 {
890
892 EModeSwitch theMode):
893 TModeSwitchInfo(theMode),
894 TNameInfoBase(boost::get<1>(boost::get<0>(theInfo)))
895 {
896 const TGaussInfo::TKey& aKey = boost::get<0>(theInfo);
897
898 myGeom = boost::get<0>(aKey);
899 myRefCoord.resize(GetNbRef()*GetDim());
900
901 TInt aNbGauss = boost::get<1>(theInfo);
902 myGaussCoord.resize(aNbGauss*GetDim());
903 myWeight.resize(aNbGauss);
904 }
905 };
906
907 //---------------------------------------------------------------
909 {
910 TTTimeStampInfo(const PFieldInfo& theFieldInfo, const PTimeStampInfo& theInfo)
911 {
912 myFieldInfo = theFieldInfo;
913
914 myEntity = theInfo->GetEntity();
915 myGeom2Size = theInfo->GetGeom2Size();
916
917 myNumDt = theInfo->GetNumDt();
918 myNumOrd = theInfo->GetNumOrd();
919 myDt = theInfo->GetDt();
920
921 myUnitDt.resize(GetPNOMLength()+1);
922 SetUnitDt(theInfo->GetUnitDt());
923
924 myGeom2NbGauss = theInfo->myGeom2NbGauss;
925 myGeom2Gauss = theInfo->GetGeom2Gauss();
926 }
927
928 TTTimeStampInfo(const PFieldInfo& theFieldInfo,
929 EEntiteMaillage theEntity,
930 const TGeom2Size& theGeom2Size,
931 const TGeom2NbGauss& theGeom2NbGauss,
932 TInt theNumDt,
933 TInt /*theNumOrd*/,
934 TFloat theDt,
935 const std::string& theUnitDt,
936 const TGeom2Gauss& theGeom2Gauss)
937 {
938 myFieldInfo = theFieldInfo;
939
940 myEntity = theEntity;
941 myGeom2Size = theGeom2Size;
942
943 myNumDt = theNumDt;
944 myNumOrd = theNumDt;
945 myDt = theDt;
946
947 myUnitDt.resize(GetPNOMLength()+1);
948 SetUnitDt(theUnitDt);
949
950 myGeom2NbGauss = theGeom2NbGauss;
951 myGeom2Gauss = theGeom2Gauss;
952 }
953
954 virtual
955 std::string
956 GetUnitDt() const
957 {
958 return GetString(0,GetPNOMLength(),myUnitDt);
959 }
960
961 virtual
962 void
963 SetUnitDt(const std::string& theValue)
964 {
965 SetString(0,GetPNOMLength(),myUnitDt,theValue);
966 }
967 };
968
969 //---------------------------------------------------------------
971 virtual TProfileInfo,
972 virtual TTNameInfo
973 {
975
977 EModeProfil theMode):
978 TNameInfoBase(boost::get<0>(theInfo))
979 {
980 TInt aSize = boost::get<1>(theInfo);
981 myElemNum.reset(new TElemNum(aSize));
982 myMode = aSize > 0? theMode: eNO_PFLMOD;
983 }
984 };
985
986 //---------------------------------------------------------------
987 template<class TMeshValueType>
988 struct TTTimeStampValue: virtual TTimeStampValue<TMeshValueType>
989 {
990 TTTimeStampValue(const PTimeStampInfo& theTimeStampInfo,
991 const PTimeStampValueBase& theInfo,
992 ETypeChamp theTypeChamp)
993 {
994 typedef TTimeStampValue<TMeshValueType> TCompatible;
995 if(TCompatible* aCompatible = dynamic_cast<TCompatible*>(theInfo.get())){
996 this->myTimeStampInfo = theTimeStampInfo;
997 this->myTypeChamp = theTypeChamp;
998 this->myGeom2Profile = aCompatible->GetGeom2Profile();
999 this->myGeom2Value = aCompatible->myGeom2Value;
1000 this->myGeomSet = aCompatible->GetGeomSet();
1001 }else
1002 EXCEPTION(std::runtime_error,"TTTimeStampValue::TTTimeStampValue - use incompatible arguments!");
1003 }
1004
1005 TTTimeStampValue(const PTimeStampInfo& theTimeStampInfo,
1006 ETypeChamp theTypeChamp,
1007 const TGeom2Profile& theGeom2Profile,
1008 EModeSwitch theMode):
1009 TModeSwitchInfo(theMode)
1010 {
1011 this->myTimeStampInfo = theTimeStampInfo;
1012
1013 this->myTypeChamp = theTypeChamp;
1014
1015 this->myGeom2Profile = theGeom2Profile;
1016
1017 TInt aNbComp = theTimeStampInfo->myFieldInfo->myNbComp;
1018
1019 const TGeom2Size& aGeom2Size = theTimeStampInfo->GetGeom2Size();
1020 TGeom2Size::const_iterator anIter = aGeom2Size.begin();
1021 for(; anIter != aGeom2Size.end(); anIter++){
1022 const EGeometrieElement& aGeom = anIter->first;
1023 TInt aNbElem = anIter->second;
1024
1025 MED::PProfileInfo aProfileInfo;
1026 MED::TGeom2Profile::const_iterator anIter = theGeom2Profile.find(aGeom);
1027 if(anIter != theGeom2Profile.end())
1028 aProfileInfo = anIter->second;
1029
1030 if(aProfileInfo && aProfileInfo->IsPresent())
1031 aNbElem = aProfileInfo->GetSize();
1032
1033 TInt aNbGauss = theTimeStampInfo->GetNbGauss(aGeom);
1034
1035 this->GetMeshValue(aGeom).Allocate(aNbElem,aNbGauss,aNbComp);
1036 }
1037 }
1038
1039 virtual
1040 size_t
1042 {
1043 return this->GetMeshValue(theGeom).GetSize();
1044 }
1045
1046 virtual
1047 size_t
1049 {
1050 return this->GetMeshValue(theGeom).GetNbVal();
1051 }
1052
1053 virtual
1054 size_t
1056 {
1057 return this->GetMeshValue(theGeom).GetNbGauss();
1058 }
1059
1060 virtual
1061 void
1063 TInt theNbElem,
1064 TInt theNbGauss,
1065 TInt theNbComp,
1066 EModeSwitch theMode = eFULL_INTERLACE)
1067 {
1068 this->GetMeshValue(theGeom).Allocate(theNbElem,theNbGauss,theNbComp,theMode);
1069 }
1070
1071 virtual
1072 unsigned char*
1074 {
1075 return this->GetMeshValue(theGeom).GetValuePtr();
1076 }
1077 };
1078
1079 //---------------------------------------------------------------
1081 virtual TGrilleInfo
1082 {
1083 TTGrilleInfo(const PMeshInfo& theMeshInfo,
1084 const PGrilleInfo& theInfo)
1085 {
1086 myMeshInfo = theMeshInfo;
1087
1088 myCoord = theInfo->GetNodeCoord();
1089
1090 myGrilleType = theInfo->GetGrilleType();
1091
1092 myCoordNames = theInfo->myCoordNames;
1093
1094 myCoordUnits = theInfo->myCoordUnits;
1095
1096 myIndixes = theInfo->GetMapOfIndexes();
1097
1098 myGrilleStructure = theInfo->GetGrilleStructure();
1099
1100 myGrilleType = theInfo->GetGrilleType();
1101
1102 myFamNumNode.resize(theInfo->GetNbNodes());
1103 myFamNumNode = theInfo->myFamNumNode;
1104
1105 myFamNum = theInfo->myFamNum;
1106 }
1107
1108 TTGrilleInfo(const PMeshInfo& theMeshInfo,
1109 const EGrilleType& type,
1110 const TInt nnoeuds)
1111 {
1112 myMeshInfo = theMeshInfo;
1113 TInt aSpaceDim = theMeshInfo->GetSpaceDim();
1114 if(type == eGRILLE_STANDARD){
1115 myCoord.resize(aSpaceDim*nnoeuds);
1116 myCoordNames.resize(aSpaceDim*GetPNOMLength()+1);
1117 myCoordUnits.resize(aSpaceDim*GetPNOMLength()+1);
1118 } else { //if(type == eGRILLE_CARTESIENNE){
1119 myCoordNames.resize(aSpaceDim*GetPNOMLength()+aSpaceDim);
1120 myCoordUnits.resize(aSpaceDim*GetPNOMLength()+aSpaceDim);
1121 }
1122 myGrilleStructure.resize(aSpaceDim);
1123 myFamNumNode.resize(nnoeuds);
1124 }
1125
1126 TTGrilleInfo(const PMeshInfo& theMeshInfo,
1127 const EGrilleType& type)
1128 {
1129 myMeshInfo = theMeshInfo;
1130 TInt aSpaceDim = theMeshInfo->GetSpaceDim();
1131 if(type == eGRILLE_STANDARD){
1132 myCoordNames.resize(aSpaceDim*GetPNOMLength()+1);
1133 myCoordUnits.resize(aSpaceDim*GetPNOMLength()+1);
1134 } else {// if(type == eGRILLE_CARTESIENNE){
1135 myCoordNames.resize(aSpaceDim*GetPNOMLength()+aSpaceDim);
1136 myCoordUnits.resize(aSpaceDim*GetPNOMLength()+aSpaceDim);
1137 }
1138 myGrilleStructure.resize(aSpaceDim);
1139 }
1140
1141 TTGrilleInfo(const PMeshInfo& theMeshInfo,
1142 const EGrilleType& type,
1143 const MED::TIntVector& nbNodeVec)
1144 {
1145 myMeshInfo = theMeshInfo;
1146
1147 TInt aSpaceDim = theMeshInfo->GetSpaceDim();
1148 if(type == eGRILLE_STANDARD){
1149 myCoordNames.resize(aSpaceDim*GetPNOMLength()+1);
1150 myCoordUnits.resize(aSpaceDim*GetPNOMLength()+1);
1151 } else {// if(type == eGRILLE_CARTESIENNE){
1152 myCoordNames.resize(aSpaceDim*GetPNOMLength()+aSpaceDim);
1153 myCoordUnits.resize(aSpaceDim*GetPNOMLength()+aSpaceDim);
1154 }
1155
1156 if(type != eGRILLE_STANDARD)
1157 for(unsigned int aAxe=0;aAxe<nbNodeVec.size();aAxe++){
1158 myIndixes[aAxe].resize(nbNodeVec[aAxe]);
1159 }
1160 myGrilleStructure.resize(aSpaceDim);
1161 }
1162
1163 virtual
1164 std::string
1165 GetCoordName(TInt theId) const
1166 {
1167 return GetString(theId,GetPNOMLength(),myCoordNames);
1168 }
1169
1170 virtual
1171 void
1172 SetCoordName(TInt theId, const std::string& theValue)
1173 {
1174 SetString(theId,GetPNOMLength(),myCoordNames,theValue);
1175 }
1176
1177 virtual
1178 std::string
1179 GetCoordUnit(TInt theId) const
1180 {
1181 return GetString(theId,GetPNOMLength(),myCoordUnits);
1182 }
1183
1184 virtual
1185 void
1186 SetCoordUnit(TInt theId, const std::string& theValue)
1187 {
1188 SetString(theId,GetPNOMLength(),myCoordUnits,theValue);
1189 }
1190 };
1191}
1192
1193#endif // MED_TStructures_HeaderFile
#define EXCEPTION(TYPE, MSG)
Definition: UNV_Utilities.hxx:160
This class intends to provide a uniform way to handle multidimensional data (const version)
Definition: MED_SliceArray.hxx:47
This class extends TCSlice functionality for non-constant case.
Definition: MED_SliceArray.hxx:138
Definition: MED_Algorithm.cxx:28
TIntVector TElemNum
Definition: MED_Structures.hxx:182
EEntiteMaillage
Definition: MED_Common.hxx:72
@ eSTRUCT_ELEMENT
Definition: MED_Common.hxx:72
std::map< EGeometrieElement, TInt > TGeom2NbGauss
Definition: MED_Structures.hxx:495
void SetString(TInt theId, TInt theStep, TString &theString, const std::string &theValue)
Set a substring in the sequence of the strings.
Definition: MED_Structures.cxx:41
TInt GetPNOMLength()
Definition: MED_Common.cxx:53
ERepere
Definition: MED_Common.hxx:60
TFloatVector TValue
Definition: MED_Structures.hxx:757
std::string GetString(TInt theId, TInt theStep, const TString &theString)
Extract a substring from the sequence of the strings.
Definition: MED_Structures.cxx:31
TFloatVector TNodeCoord
Definition: MED_Structures.hxx:236
double TFloat
Definition: MED_Common.hxx:44
EModeProfil
Definition: MED_Common.hxx:74
@ eNO_PFLMOD
Definition: MED_Common.hxx:74
EGeometrieElement
Definition: MED_Common.hxx:64
@ eBALL
Definition: MED_Common.hxx:69
EConnectivite
Definition: MED_Common.hxx:62
@ eNOD
Definition: MED_Common.hxx:62
EMaillage
Definition: MED_Common.hxx:58
EBooleen
Definition: MED_Common.hxx:43
@ eFAUX
Definition: MED_Common.hxx:43
@ eVRAI
Definition: MED_Common.hxx:43
TInt GetNbConn(EGeometrieElement typmai, EEntiteMaillage, TInt)
Definition: MED_Common.cxx:67
TInt GetLNOMLength()
Definition: MED_Common.cxx:47
TInt GetNbNodes(EGeometrieElement typmai)
Definition: MED_Common.cxx:75
std::map< EGeometrieElement, PGaussInfo > TGeom2Gauss
Definition: MED_Structures.hxx:494
med_int TInt
Definition: MED_Common.hxx:50
TInt GetNOMLength()
Definition: MED_Common.cxx:41
TVector< char > TString
Defines a type for managing sequence of strings.
Definition: MED_Structures.hxx:41
TInt GetDESCLength()
Definition: MED_Common.cxx:29
EGrilleType
Definition: MED_Common.hxx:76
@ eGRILLE_STANDARD
Definition: MED_Common.hxx:76
ETypeChamp
Definition: MED_Common.hxx:56
EModeSwitch
Definition: MED_Common.hxx:54
@ eFULL_INTERLACE
Definition: MED_Common.hxx:54
std::set< std::string > TStringSet
Definition: MED_Common.hxx:84
std::map< EGeometrieElement, TInt > TGeom2Size
Definition: MED_Common.hxx:86
std::map< EGeometrieElement, PProfileInfo > TGeom2Profile
Definition: MED_Structures.hxx:768
Definition: SMESH_MAT2d.cxx:224
Define a class representing MED_BALL structure element.
Definition: MED_Structures.hxx:346
TFloatVector myDiameters
Definition: MED_Structures.hxx:347
Define a base class which represents MED Cells entity.
Definition: MED_Structures.hxx:282
EConnectivite myConnMode
Defines connectivity mode.
Definition: MED_Structures.hxx:291
EGeometrieElement myGeom
Defines the MED Geometric type of the instance.
Definition: MED_Structures.hxx:287
EEntiteMaillage myEntity
Defines the MED Entity where the mesh cells belongs to.
Definition: MED_Structures.hxx:283
TCConnSlice GetConnSlice(TInt theElemId) const
Gives connectivities for mesh cell by its number (const version)
Definition: MED_Structures.cxx:174
PElemNum myConn
Defines sequence which describe connectivity for each of mesh cell.
Definition: MED_Structures.hxx:297
Define a parent class for all MED entities that describes mesh entities such as nodes and cells.
Definition: MED_Structures.hxx:188
PElemNum myFamNum
Get number of mesh elements.
Definition: MED_Structures.hxx:197
PMeshInfo myMeshInfo
A reference to corresponding MED Mesh.
Definition: MED_Structures.hxx:189
PString myElemNames
Contains sequence of the names for the mesh elements.
Definition: MED_Structures.hxx:226
EBooleen myIsElemNum
Defines if the mesh elements are indexed.
Definition: MED_Structures.hxx:204
PElemNum myElemNum
Contains sequence of the indexes for the mesh elements.
Definition: MED_Structures.hxx:214
EBooleen myIsElemNames
Defines if the mesh elements are named.
Definition: MED_Structures.hxx:221
void SetElemNum(TInt theId, TInt theVal)
Set a reference number for the mesh element by its order number.
Definition: MED_Structures.cxx:142
EBooleen myIsFamNum
Defines if the mesh elements family are indexed.
Definition: MED_Structures.hxx:209
TInt myNbElem
Definition: MED_Structures.hxx:193
void SetFamNum(TInt theId, TInt theVal)
Set number of a MED FAMILY for the mesh element with the order number.
Definition: MED_Structures.cxx:127
Define a base class which represents MED Family entity.
Definition: MED_Structures.hxx:135
TFamAttr myAttrId
Defines sequence of the indexes of the MED Family attributes.
Definition: MED_Structures.hxx:160
TInt myNbGroup
Define number of the MED FAMILY.
Definition: MED_Structures.hxx:144
TInt myNbAttr
Defines number of the MED Family attributes.
Definition: MED_Structures.hxx:155
TString myGroupNames
Contains sequence of the names for the MED Groups connected to.
Definition: MED_Structures.hxx:149
TInt myId
An unique index of the MED FAMILY.
Definition: MED_Structures.hxx:140
TString myAttrDesc
Defines sequence of the names of the MED Family attributes.
Definition: MED_Structures.hxx:174
PMeshInfo myMeshInfo
A reference to corresponding MED Mesh.
Definition: MED_Structures.hxx:136
TFamAttr myAttrVal
Defines sequence of the values of the MED Family attributes.
Definition: MED_Structures.hxx:167
Define a base class which represents MED Field entity.
Definition: MED_Structures.hxx:393
PMeshInfo myMeshInfo
A reference to corresponding MED Mesh.
Definition: MED_Structures.hxx:394
ETypeChamp myType
Defines type of MED Field.
Definition: MED_Structures.hxx:398
TString myUnitNames
Contains units for each of MED Field components.
Definition: MED_Structures.hxx:420
TString myCompNames
Contains names for each of MED Field components.
Definition: MED_Structures.hxx:414
TInt myNbRef
Defines number of references of the field.
Definition: MED_Structures.hxx:410
EBooleen myIsLocal
Defines if the MED Field is local.
Definition: MED_Structures.hxx:406
TInt myNbComp
Defines number of components stored in the field.
Definition: MED_Structures.hxx:402
The class represents MED Gauss entity.
Definition: MED_Structures.hxx:447
TNodeCoord myGaussCoord
Contains coordinates for the Gauss points.
Definition: MED_Structures.hxx:473
TNodeCoord myRefCoord
Contains coordinates for the referenced nodes.
Definition: MED_Structures.hxx:465
boost::tuple< TKey, TInt > TInfo
Definition: MED_Structures.hxx:449
TWeight myWeight
Contains weights for the Gauss points.
Definition: MED_Structures.hxx:481
TInt GetNbRef() const
Gives number of the referenced nodes.
Definition: MED_Structures.hxx:484
EGeometrieElement myGeom
Defines, which geometrical type the MED Gauss entity belongs to.
Definition: MED_Structures.hxx:460
TInt GetDim() const
Gives dimension of the referenced nodes.
Definition: MED_Structures.hxx:487
boost::tuple< EGeometrieElement, std::string > TKey
Definition: MED_Structures.hxx:448
Define a base class which represents MED Grille (structured mesh)
Definition: MED_Structures.hxx:978
EGrilleType myGrilleType
Defines grille type (eGRILLE_CARTESIENNE,eGRILLE_POLAIRE,eGRILLE_STANDARD)
Definition: MED_Structures.hxx:991
TString myCoordNames
Contains names for the coordinate dimensions.
Definition: MED_Structures.hxx:999
TNodeCoord myCoord
Contains all nodal coordinates, now used only for eGRILLE_STANDARD.
Definition: MED_Structures.hxx:982
PMeshInfo myMeshInfo
Definition: MED_Structures.hxx:979
TElemNum myFamNum
Defines sequence MED Family indexes for corresponding mesh entities.
Definition: MED_Structures.hxx:1046
TString myCoordUnits
Contains units for the coordinate dimensions.
Definition: MED_Structures.hxx:1005
TElemNum myFamNumNode
Defines sequence MED Family indexes for corresponding mesh nodes.
Definition: MED_Structures.hxx:1064
TIndexes myIndixes
Map of index of axes and Table of indexes for certain axe, now used for eGRILLE_CARTESIENNE and eGRIL...
Definition: MED_Structures.hxx:1012
TIntVector myGrilleStructure
Return sub entity.
Definition: MED_Structures.hxx:1035
Define a base class which represents MED Mesh entity.
Definition: MED_Structures.hxx:112
TInt mySpaceDim
Definition: MED_Structures.hxx:116
EMaillage myType
Type of the mesh.
Definition: MED_Structures.hxx:119
TString myDesc
Description of the mesh.
Definition: MED_Structures.hxx:122
TInt myDim
Dimension of the mesh (0, 1, 2 or 3)
Definition: MED_Structures.hxx:113
Define a parent class for all MED entities that contains a sequence of numbers.
Definition: MED_Structures.hxx:94
EModeSwitch myModeSwitch
Keeps the interlace mode.
Definition: MED_Structures.hxx:105
Define a parent class for all named MED entities.
Definition: MED_Structures.hxx:80
TString myName
Keeps its name.
Definition: MED_Structures.hxx:81
Define a base class which represents MED Nodes entity.
Definition: MED_Structures.hxx:246
TString myCoordUnits
Contains units for the coordinate dimensions.
Definition: MED_Structures.hxx:266
PNodeCoord myCoord
Contains all nodal coordinates.
Definition: MED_Structures.hxx:247
ERepere mySystem
Defines, which coordinate system is used.
Definition: MED_Structures.hxx:254
TString myCoordNames
Contains names for the coordinate dimensions.
Definition: MED_Structures.hxx:260
Define a base class which represents MED Polyedre entity.
Definition: MED_Structures.hxx:358
EEntiteMaillage myEntity
Defines the MED Entity where the polyedres belongs to.
Definition: MED_Structures.hxx:360
EConnectivite myConnMode
Defines connectivity mode.
Definition: MED_Structures.hxx:370
PElemNum myIndex
Table de indexes.
Definition: MED_Structures.hxx:376
PElemNum myFaces
Table de faces indexes.
Definition: MED_Structures.hxx:375
EGeometrieElement myGeom
Defines the MED Geometric type of the instance.
Definition: MED_Structures.hxx:365
PElemNum myConn
Table de connectivities.
Definition: MED_Structures.hxx:374
Define a base class which represents MED Polygon entity.
Definition: MED_Structures.hxx:309
PElemNum myIndex
Table de indexes.
Definition: MED_Structures.hxx:326
PElemNum myConn
Table de connectivities.
Definition: MED_Structures.hxx:325
EEntiteMaillage myEntity
Defines the MED Entity where the polygons belongs to.
Definition: MED_Structures.hxx:311
EGeometrieElement myGeom
Defines the MED Geometric type of the instance.
Definition: MED_Structures.hxx:316
EConnectivite myConnMode
Defines connectivity mode.
Definition: MED_Structures.hxx:321
The class represents MED Profile entity.
Definition: MED_Structures.hxx:544
boost::tuple< TKey, TInt > TInfo
Definition: MED_Structures.hxx:546
PElemNum myElemNum
Keeps sequence of cell by its number which belong to the profile.
Definition: MED_Structures.hxx:554
EModeProfil myMode
Keeps mode for the MED Profile.
Definition: MED_Structures.hxx:548
Definition: MED_TStructures.hxx:753
TTBallInfo(const PMeshInfo &theMeshInfo, const PBallInfo &theInfo)
Definition: MED_TStructures.hxx:756
TTBallInfo(const PMeshInfo &theMeshInfo, const TIntVector &theNodes, TFloatVector &theDiameters, const TIntVector &theFamilyNums, const TIntVector &theElemNums)
Definition: MED_TStructures.hxx:782
TTCellInfo TCellInfoBase
Definition: MED_TStructures.hxx:754
TTBallInfo(const PMeshInfo &theMeshInfo, TInt theNbElem, EBooleen theIsElemNum)
Definition: MED_TStructures.hxx:763
Definition: MED_TStructures.hxx:665
virtual TInt GetConnDim() const
Gives step in the connectivity sequence.
Definition: MED_TStructures.hxx:742
TTCellInfo(const PMeshInfo &theMeshInfo, EEntiteMaillage theEntity, EGeometrieElement theGeom, const TIntVector &theConnectivities, EConnectivite theConnMode, const TIntVector &theFamilyNums, const TIntVector &theElemNums, const TStringVector &theElemNames, EModeSwitch theMode)
Definition: MED_TStructures.hxx:709
TTElemInfo TElemInfoBase
Definition: MED_TStructures.hxx:666
TTCellInfo(const PMeshInfo &theMeshInfo, const PCellInfo &theInfo)
Definition: MED_TStructures.hxx:668
TTCellInfo(const PMeshInfo &theMeshInfo, EEntiteMaillage theEntity, EGeometrieElement theGeom, TInt theNbElem, EConnectivite theConnMode, EBooleen theIsElemNum, EBooleen theIsElemNames, EModeSwitch theMode)
Definition: MED_TStructures.hxx:687
Definition: MED_TStructures.hxx:294
virtual void SetElemName(TInt theId, const std::string &theValue)
Set name of the mesh element by its order number.
Definition: MED_TStructures.hxx:406
TTElemInfo(const PMeshInfo &theMeshInfo, TInt theNbElem, EBooleen theIsElemNum, EBooleen theIsElemNames)
Definition: MED_TStructures.hxx:332
virtual std::string GetElemName(TInt theId) const
Get name of the mesh element by its order number.
Definition: MED_TStructures.hxx:399
TTElemInfo(const PMeshInfo &theMeshInfo, const PElemInfo &theInfo)
Definition: MED_TStructures.hxx:295
TTElemInfo(const PMeshInfo &theMeshInfo, TInt theNbElem, const TIntVector &theFamilyNums, const TIntVector &theElemNums, const TStringVector &theElemNames)
Definition: MED_TStructures.hxx:356
Definition: MED_TStructures.hxx:176
TTNameInfo TNameInfoBase
Definition: MED_TStructures.hxx:177
TTFamilyInfo(const PMeshInfo &theMeshInfo, const PFamilyInfo &theInfo)
Definition: MED_TStructures.hxx:179
TTFamilyInfo(const PMeshInfo &theMeshInfo, TInt theNbGroup, TInt theNbAttr, TInt theId, const std::string &theValue)
Definition: MED_TStructures.hxx:207
virtual std::string GetAttrDesc(TInt theId) const
Get value of the MED FAMILY attribute by its number.
Definition: MED_TStructures.hxx:279
virtual void SetAttrDesc(TInt theId, const std::string &theValue)
Set value of the MED FAMILY attribute by its number.
Definition: MED_TStructures.hxx:286
virtual std::string GetGroupName(TInt theId) const
Gets name of a bound MED GROUP by its number.
Definition: MED_TStructures.hxx:265
virtual void SetGroupName(TInt theId, const std::string &theValue)
Sets name of the defined MED GROUP by its number.
Definition: MED_TStructures.hxx:272
TTFamilyInfo(const PMeshInfo &theMeshInfo, const std::string &theValue, TInt theId, const TStringSet &theGroupNames, const TStringVector &theAttrDescs, const TIntVector &theAttrIds, const TIntVector &theAttrVals)
Definition: MED_TStructures.hxx:227
Definition: MED_TStructures.hxx:810
virtual std::string GetUnitName(TInt theId) const
Get unit of the component by its order number.
Definition: MED_TStructures.hxx:871
virtual void SetUnitName(TInt theId, const std::string &theValue)
Set unit for the component by its order number.
Definition: MED_TStructures.hxx:878
TTNameInfo TNameInfoBase
Definition: MED_TStructures.hxx:811
TTFieldInfo(const PMeshInfo &theMeshInfo, const PFieldInfo &theInfo)
Definition: MED_TStructures.hxx:813
TTFieldInfo(const PMeshInfo &theMeshInfo, TInt theNbComp, ETypeChamp theType, const std::string &theValue, EBooleen theIsLocal, TInt theNbRef)
Definition: MED_TStructures.hxx:835
virtual void SetCompName(TInt theId, const std::string &theValue)
Set name for the component by its order number.
Definition: MED_TStructures.hxx:864
virtual std::string GetCompName(TInt theId) const
Get name of the component by its order number.
Definition: MED_TStructures.hxx:857
Definition: MED_TStructures.hxx:888
TTGaussInfo(const TGaussInfo::TInfo &theInfo, EModeSwitch theMode)
Definition: MED_TStructures.hxx:891
TTNameInfo TNameInfoBase
Definition: MED_TStructures.hxx:889
Definition: MED_TStructures.hxx:1082
TTGrilleInfo(const PMeshInfo &theMeshInfo, const EGrilleType &type, const TInt nnoeuds)
Definition: MED_TStructures.hxx:1108
virtual std::string GetCoordUnit(TInt theId) const
Get name of unit for the coordinate dimension by its order number.
Definition: MED_TStructures.hxx:1179
TTGrilleInfo(const PMeshInfo &theMeshInfo, const PGrilleInfo &theInfo)
Definition: MED_TStructures.hxx:1083
virtual void SetCoordUnit(TInt theId, const std::string &theValue)
Set name of unit for the coordinate dimension by its order number.
Definition: MED_TStructures.hxx:1186
TTGrilleInfo(const PMeshInfo &theMeshInfo, const EGrilleType &type, const MED::TIntVector &nbNodeVec)
Definition: MED_TStructures.hxx:1141
virtual void SetCoordName(TInt theId, const std::string &theValue)
Set name of the coordinate dimension by its order number.
Definition: MED_TStructures.hxx:1172
TTGrilleInfo(const PMeshInfo &theMeshInfo, const EGrilleType &type)
Definition: MED_TStructures.hxx:1126
virtual std::string GetCoordName(TInt theId) const
Get name of the coordinate dimension by its order number.
Definition: MED_TStructures.hxx:1165
Definition: MED_TStructures.hxx:129
virtual std::string GetDesc() const
Get description for the mesh.
Definition: MED_TStructures.hxx:159
TTMeshInfo(const PMeshInfo &theInfo)
Definition: MED_TStructures.hxx:132
TTMeshInfo(TInt theDim, TInt theSpaceDim, const std::string &theValue, EMaillage theType, const std::string &theDesc)
Definition: MED_TStructures.hxx:143
TTNameInfo TNameInfoBase
Definition: MED_TStructures.hxx:130
virtual void SetDesc(const std::string &theValue)
Sets description for the mesh.
Definition: MED_TStructures.hxx:166
Definition: MED_TStructures.hxx:96
virtual void SetName(const std::string &theValue)
Set a new name.
Definition: MED_TStructures.hxx:112
TTNameInfo(const std::string &theValue)
Definition: MED_TStructures.hxx:97
virtual void SetName(const TString &theValue)
Set a new name.
Definition: MED_TStructures.hxx:119
virtual std::string GetName() const
Gets its name.
Definition: MED_TStructures.hxx:105
Definition: MED_TStructures.hxx:416
TTNodeInfo(const PMeshInfo &theMeshInfo, TInt theNbElem, EModeSwitch theMode, ERepere theSystem, EBooleen theIsElemNum, EBooleen theIsElemNames)
Definition: MED_TStructures.hxx:440
virtual void SetCoordUnit(TInt theId, const std::string &theValue)
Set name of unit for the coordinate dimension by its order number.
Definition: MED_TStructures.hxx:518
virtual std::string GetCoordName(TInt theId) const
Get name of the coordinate dimension by its order number.
Definition: MED_TStructures.hxx:497
TTNodeInfo(const PMeshInfo &theMeshInfo, const PNodeInfo &theInfo)
Definition: MED_TStructures.hxx:419
virtual std::string GetCoordUnit(TInt theId) const
Get name of unit for the coordinate dimension by its order number.
Definition: MED_TStructures.hxx:511
TTElemInfo TElemInfoBase
Definition: MED_TStructures.hxx:417
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)
Definition: MED_TStructures.hxx:462
virtual void SetCoordName(TInt theId, const std::string &theValue)
Set name of the coordinate dimension by its order number.
Definition: MED_TStructures.hxx:504
Definition: MED_TStructures.hxx:594
TTPolyedreInfo(const PMeshInfo &theMeshInfo, const PPolyedreInfo &theInfo)
Definition: MED_TStructures.hxx:597
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)
Definition: MED_TStructures.hxx:634
TTPolyedreInfo(const PMeshInfo &theMeshInfo, EEntiteMaillage theEntity, EGeometrieElement theGeom, TInt theNbElem, TInt theNbFaces, TInt theConnSize, EConnectivite theConnMode, EBooleen theIsElemNum, EBooleen theIsElemNames)
Definition: MED_TStructures.hxx:610
TTElemInfo TElemInfoBase
Definition: MED_TStructures.hxx:595
Definition: MED_TStructures.hxx:528
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)
Definition: MED_TStructures.hxx:565
TTElemInfo TElemInfoBase
Definition: MED_TStructures.hxx:529
TTPolygoneInfo(const PMeshInfo &theMeshInfo, EEntiteMaillage theEntity, EGeometrieElement theGeom, TInt theNbElem, TInt theConnSize, EConnectivite theConnMode, EBooleen theIsElemNum, EBooleen theIsElemNames)
Definition: MED_TStructures.hxx:543
TTPolygoneInfo(const PMeshInfo &theMeshInfo, const PPolygoneInfo &theInfo)
Definition: MED_TStructures.hxx:531
Definition: MED_TStructures.hxx:973
TTNameInfo TNameInfoBase
Definition: MED_TStructures.hxx:974
TTProfileInfo(const TProfileInfo::TInfo &theInfo, EModeProfil theMode)
Definition: MED_TStructures.hxx:976
Definition: MED_TStructures.hxx:909
TTTimeStampInfo(const PFieldInfo &theFieldInfo, const PTimeStampInfo &theInfo)
Definition: MED_TStructures.hxx:910
virtual std::string GetUnitDt() const
Get unit of time for the MED TimeStamp.
Definition: MED_TStructures.hxx:956
virtual void SetUnitDt(const std::string &theValue)
Set unit of time for the MED TimeStamp.
Definition: MED_TStructures.hxx:963
TTTimeStampInfo(const PFieldInfo &theFieldInfo, EEntiteMaillage theEntity, const TGeom2Size &theGeom2Size, const TGeom2NbGauss &theGeom2NbGauss, TInt theNumDt, TInt, TFloat theDt, const std::string &theUnitDt, const TGeom2Gauss &theGeom2Gauss)
Definition: MED_TStructures.hxx:928
Definition: MED_TStructures.hxx:989
TTTimeStampValue(const PTimeStampInfo &theTimeStampInfo, const PTimeStampValueBase &theInfo, ETypeChamp theTypeChamp)
Definition: MED_TStructures.hxx:990
TTTimeStampValue(const PTimeStampInfo &theTimeStampInfo, ETypeChamp theTypeChamp, const TGeom2Profile &theGeom2Profile, EModeSwitch theMode)
Definition: MED_TStructures.hxx:1005
virtual size_t GetValueSize(EGeometrieElement theGeom) const
Definition: MED_TStructures.hxx:1041
virtual size_t GetNbGauss(EGeometrieElement theGeom) const
Definition: MED_TStructures.hxx:1055
virtual unsigned char * GetValuePtr(EGeometrieElement theGeom)
Definition: MED_TStructures.hxx:1073
virtual size_t GetNbVal(EGeometrieElement theGeom) const
Definition: MED_TStructures.hxx:1048
virtual void AllocateValue(EGeometrieElement theGeom, TInt theNbElem, TInt theNbGauss, TInt theNbComp, EModeSwitch theMode=eFULL_INTERLACE)
Allocates values for the given geometry.
Definition: MED_TStructures.hxx:1062
Define a base class which represents MED TimeStamp.
Definition: MED_Structures.hxx:501
TString myUnitDt
Defines unit for the time for the MED TimeStamp.
Definition: MED_Structures.hxx:533
EEntiteMaillage myEntity
Defines the MED Entity where the MED TimeStamp belongs to.
Definition: MED_Structures.hxx:507
TGeom2Gauss myGeom2Gauss
Keeps map of MED Gauss entityes per geometric type.
Definition: MED_Structures.hxx:529
TFloat myDt
Keeps time for the MED TimeStamp.
Definition: MED_Structures.hxx:525
TInt myNumDt
Keeps number in time for the MED TimeStamp.
Definition: MED_Structures.hxx:519
TGeom2NbGauss myGeom2NbGauss
Keeps number of the Gauss Points for the MED TimeStamp.
Definition: MED_Structures.hxx:516
PFieldInfo myFieldInfo
A reference to corresponding MED Field.
Definition: MED_Structures.hxx:502
TGeom2Size myGeom2Size
Keeps map of number of cells per geometric type where the MED TimeStamp belongs to.
Definition: MED_Structures.hxx:512
TInt myNumOrd
Keeps number for the MED TimeStamp.
Definition: MED_Structures.hxx:522
TGeom2Profile myGeom2Profile
Keeps map of MED Profiles per geometric type.
Definition: MED_Structures.hxx:786
PTimeStampInfo myTimeStampInfo
A reference to corresponding MED TimeStamp.
Definition: MED_Structures.hxx:777
TGeomSet myGeomSet
Keeps set of MED EGeometrieElement which contains values for the timestamp.
Definition: MED_Structures.hxx:782
The class implements a container for MED TimeStamp values.
Definition: MED_Structures.hxx:826
const TTMeshValue & GetMeshValue(EGeometrieElement theGeom) const
Gets MED TimeStamp values for the given geometric type (const version)
Definition: MED_Structures.hxx:875
TTGeom2Value myGeom2Value
Keeps map of MED TimeStamp values per geometric type (const version)
Definition: MED_Structures.hxx:843
ETypeChamp myTypeChamp
Definition: MED_Structures.hxx:832
TVector< TVal > TValue
Definition: MED_TStructures.hxx:74
TValueHolder(TValue &theValue)
Definition: MED_TStructures.hxx:78
TValue & myValue
Definition: MED_TStructures.hxx:75
TRepresentation * myRepresentation
Definition: MED_TStructures.hxx:76
To provide a common way to handle values of MEDWrapper types as native MED types.
Definition: MED_TStructures.hxx:38
~TValueHolder()
Definition: MED_TStructures.hxx:47
TValue & myValue
Definition: MED_TStructures.hxx:39
const TValue & operator()() const
Definition: MED_TStructures.hxx:64
TRepresentation * operator&()
Definition: MED_TStructures.hxx:53
TValueHolder(TValue &theValue)
Definition: MED_TStructures.hxx:42
TRepresentation myRepresentation
Definition: MED_TStructures.hxx:40