2 File MEDMEM_CellModel.cxx
6 #include "MEDMEM_CellModel.hxx"
9 using namespace MEDMEM;
10 using namespace MED_EN;
12 CELLMODEL::CELLMODEL(medGeometryElement t)
14 // init first all to nothing
18 _numberOfConstituentsDimension=0 ;
19 _numberOfConstituents=(int*)NULL ;
20 _numberOfNodeOfEachConstituent=(int**)NULL ;
21 _constituents=(int***)NULL ;
22 //_numberOfonstituentsType=(int*)NULL ;
23 _constituentsType=(medGeometryElement**)NULL ;
25 MESSAGE("CELLMODEL : constructeur pour le type " << t);
34 // nothing else : POINT are none constituent
43 // constituent are POINT1 and we have no need to define _constituents vector
44 _numberOfConstituentsDimension=1 ;
45 _numberOfConstituents=new int[1] ;
46 _numberOfConstituents[0]=2 ;
47 _numberOfNodeOfEachConstituent=new int*[1] ;
48 _numberOfNodeOfEachConstituent[0]=new int[2] ;
49 _numberOfNodeOfEachConstituent[0][0]=1 ;
50 _numberOfNodeOfEachConstituent[0][1]=1 ;
52 _constituents = new int**[1] ;
53 _constituents[0] = new int*[2] ;
54 _constituents[0][0] = new int[1] ;
55 _constituents[0][0][0] = 1 ;
56 _constituents[0][1] = new int[1] ;
57 _constituents[0][1][0] = 2 ;
59 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[2] ;
60 tmpConstituentsType1[0] = MED_POINT1 ;
61 tmpConstituentsType1[1] = MED_POINT1 ;
62 _constituentsType = new medGeometryElement*[1] ;
63 _constituentsType[0]=tmpConstituentsType1 ;
72 // constituent are POINT1 and we have no need to define _constituents vector
73 _numberOfConstituentsDimension=1 ;
74 _numberOfConstituents=new int[1] ;
75 _numberOfConstituents[0]=3 ;
76 _numberOfNodeOfEachConstituent=new int*[1] ;
77 _numberOfNodeOfEachConstituent[0]=new int[3] ;
78 _numberOfNodeOfEachConstituent[0][0]=1 ;
79 _numberOfNodeOfEachConstituent[0][1]=1 ;
80 _numberOfNodeOfEachConstituent[0][2]=1 ;
82 _constituents = new int**[1] ;
83 _constituents[0] = new int*[3] ;
84 _constituents[0][0] = new int[1] ;
85 _constituents[0][0][0] = 1 ;
86 _constituents[0][1] = new int[1] ;
87 _constituents[0][1][0] = 2 ;
88 _constituents[0][2] = new int[1] ;
89 _constituents[0][2][0] = 3 ;
91 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[3] ;
92 tmpConstituentsType1[0] = MED_POINT1 ;
93 tmpConstituentsType1[1] = MED_POINT1 ;
94 tmpConstituentsType1[2] = MED_POINT1 ;
95 _constituentsType = new medGeometryElement*[1] ;
96 _constituentsType[0]=tmpConstituentsType1 ;
106 _numberOfConstituentsDimension=1 ;
107 _numberOfConstituents=new int[1] ;
108 _numberOfConstituents[0]=3 ;
109 _numberOfNodeOfEachConstituent=new int*[1] ;
110 _numberOfNodeOfEachConstituent[0]=new int[3] ;
111 _numberOfNodeOfEachConstituent[0][0]=2 ;
112 _numberOfNodeOfEachConstituent[0][1]=2 ;
113 _numberOfNodeOfEachConstituent[0][2]=2 ;
115 int* _edge1=new int[2];
118 int* _edge2=new int[2];
121 int* _edge3=new int[2];
124 int ** tmpConstituents1 = new int*[3];
125 tmpConstituents1[0]=_edge1 ;
126 tmpConstituents1[1]=_edge2 ;
127 tmpConstituents1[2]=_edge3 ;
128 _constituents = new int**[1] ;
129 _constituents[0]=tmpConstituents1 ;
131 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[3] ;
132 tmpConstituentsType1[0] = MED_SEG2 ;
133 tmpConstituentsType1[1] = MED_SEG2 ;
134 tmpConstituentsType1[2] = MED_SEG2 ;
135 // medGeometryElement * tmpConstituentsType2 = new medGeometryElement[3] ;
136 // tmpConstituentsType2[0] = MED_POINT1 ;
137 // tmpConstituentsType2[1] = MED_POINT1 ;
138 // tmpConstituentsType2[2] = MED_POINT1 ;
139 // _constituentsType = new medGeometryElement*[2] ;
140 _constituentsType = new medGeometryElement*[1] ;
141 _constituentsType[0]=tmpConstituentsType1 ;
142 // _constituentsType[1]=tmpConstituentsType2 ;
143 // Well, point are defined, but could not be acces because we have
144 // only 1 numberOfConstituentsDimension !
154 _numberOfConstituentsDimension=1 ;
155 _numberOfConstituents=new int[1] ;
156 _numberOfConstituents[0]=3 ;
157 _numberOfNodeOfEachConstituent=new int*[1] ;
158 _numberOfNodeOfEachConstituent[0]=new int[3] ;
159 _numberOfNodeOfEachConstituent[0][0]=3 ;
160 _numberOfNodeOfEachConstituent[0][1]=3 ;
161 _numberOfNodeOfEachConstituent[0][2]=3 ;
163 int* _edge1=new int[3];
167 int* _edge2=new int[3];
171 int* _edge3=new int[3];
175 int ** tmpConstituents1 = new int*[3];
176 tmpConstituents1[0]=_edge1 ;
177 tmpConstituents1[1]=_edge2 ;
178 tmpConstituents1[2]=_edge3 ;
179 _constituents = new int**[1] ;
180 _constituents[0]=tmpConstituents1 ;
181 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[3] ;
182 tmpConstituentsType1[0] = MED_SEG3 ;
183 tmpConstituentsType1[1] = MED_SEG3 ;
184 tmpConstituentsType1[2] = MED_SEG3 ;
185 // medGeometryElement * tmpConstituentsType2 = new medGeometryElement[6] ;
186 // tmpConstituentsType2[0] = MED_POINT1 ;
187 // tmpConstituentsType2[1] = MED_POINT1 ;
188 // tmpConstituentsType2[2] = MED_POINT1 ;
189 // tmpConstituentsType2[3] = MED_POINT1 ;
190 // tmpConstituentsType2[4] = MED_POINT1 ;
191 // tmpConstituentsType2[5] = MED_POINT1 ;
192 // _constituentsType = new medGeometryElement*[2] ;
193 _constituentsType = new medGeometryElement*[1] ;
194 _constituentsType[0]=tmpConstituentsType1 ;
195 // _constituentsType[1]=tmpConstituentsType2 ;
196 // Well, point are defined, but could not be acces because we have
197 // only 1 numberOfConstituentsDimension !
207 _numberOfConstituentsDimension=1 ;
208 _numberOfConstituents=new int[1] ;
209 _numberOfConstituents[0]=4 ;
210 _numberOfNodeOfEachConstituent=new int*[1] ;
211 _numberOfNodeOfEachConstituent[0]=new int[4] ;
212 _numberOfNodeOfEachConstituent[0][0]=2 ;
213 _numberOfNodeOfEachConstituent[0][1]=2 ;
214 _numberOfNodeOfEachConstituent[0][2]=2 ;
215 _numberOfNodeOfEachConstituent[0][3]=2 ;
217 int* _edge1=new int[2];
220 int* _edge2=new int[2];
223 int* _edge3=new int[2];
226 int* _edge4=new int[2];
229 int ** tmpConstituents1 = new int*[4];
230 tmpConstituents1[0]=_edge1 ;
231 tmpConstituents1[1]=_edge2 ;
232 tmpConstituents1[2]=_edge3 ;
233 tmpConstituents1[3]=_edge4 ;
234 _constituents = new int**[1] ;
235 _constituents[0]=tmpConstituents1 ;
236 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[4] ;
237 tmpConstituentsType1[0] = MED_SEG2 ;
238 tmpConstituentsType1[1] = MED_SEG2 ;
239 tmpConstituentsType1[2] = MED_SEG2 ;
240 tmpConstituentsType1[3] = MED_SEG2 ;
241 // medGeometryElement * tmpConstituentsType2 = new medGeometryElement[4] ;
242 // tmpConstituentsType2[0] = MED_POINT1 ;
243 // tmpConstituentsType2[1] = MED_POINT1 ;
244 // tmpConstituentsType2[2] = MED_POINT1 ;
245 // tmpConstituentsType2[3] = MED_POINT1 ;
246 // _constituentsType = new medGeometryElement*[2] ;
247 _constituentsType = new medGeometryElement*[1] ;
248 _constituentsType[0]=tmpConstituentsType1 ;
249 // _constituentsType[1]=tmpConstituentsType2 ;
250 // Well, point are defined, but could not be acces because we have
251 // only 1 numberOfConstituentsDimension !
261 _numberOfConstituentsDimension=1 ;
262 _numberOfConstituents=new int[1] ;
263 _numberOfConstituents[0]=4 ;
264 _numberOfNodeOfEachConstituent=new int*[1] ;
265 _numberOfNodeOfEachConstituent[0]=new int[4] ;
266 _numberOfNodeOfEachConstituent[0][0]=3 ;
267 _numberOfNodeOfEachConstituent[0][1]=3 ;
268 _numberOfNodeOfEachConstituent[0][2]=3 ;
269 _numberOfNodeOfEachConstituent[0][3]=3 ;
271 int* _edge1=new int[3];
275 int* _edge2=new int[3];
279 int* _edge3=new int[3];
283 int* _edge4=new int[3];
287 int ** tmpConstituents1 = new int*[4];
288 tmpConstituents1[0]=_edge1 ;
289 tmpConstituents1[1]=_edge2 ;
290 tmpConstituents1[2]=_edge3 ;
291 tmpConstituents1[3]=_edge4 ;
292 _constituents = new int**[1] ;
293 _constituents[0]=tmpConstituents1 ;
294 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[4] ;
295 tmpConstituentsType1[0] = MED_SEG3 ;
296 tmpConstituentsType1[1] = MED_SEG3 ;
297 tmpConstituentsType1[2] = MED_SEG3 ;
298 tmpConstituentsType1[3] = MED_SEG3 ;
299 // medGeometryElement * tmpConstituentsType2 = new medGeometryElement[8] ;
300 // tmpConstituentsType2[0] = MED_POINT1 ;
301 // tmpConstituentsType2[1] = MED_POINT1 ;
302 // tmpConstituentsType2[2] = MED_POINT1 ;
303 // tmpConstituentsType2[3] = MED_POINT1 ;
304 // tmpConstituentsType2[4] = MED_POINT1 ;
305 // tmpConstituentsType2[5] = MED_POINT1 ;
306 // tmpConstituentsType2[6] = MED_POINT1 ;
307 // tmpConstituentsType2[7] = MED_POINT1 ;
308 // _constituentsType = new medGeometryElement*[2] ;
309 _constituentsType = new medGeometryElement*[1] ;
310 _constituentsType[0]=tmpConstituentsType1 ;
311 // _constituentsType[1]=tmpConstituentsType2 ;
312 // Well, point are defined, but could not be acces because we have
313 // only 1 numberOfConstituentsDimension !
323 _numberOfConstituentsDimension=2 ;
324 _numberOfConstituents=new int[2] ;
325 _numberOfConstituents[0]=4 ;
326 _numberOfConstituents[1]=6 ;
327 _numberOfNodeOfEachConstituent=new int*[2] ;
328 _numberOfNodeOfEachConstituent[0]=new int[4] ;
329 _numberOfNodeOfEachConstituent[0][0]=3 ;
330 _numberOfNodeOfEachConstituent[0][1]=3 ;
331 _numberOfNodeOfEachConstituent[0][2]=3 ;
332 _numberOfNodeOfEachConstituent[0][3]=3 ;
333 _numberOfNodeOfEachConstituent[1]=new int[6] ;
334 _numberOfNodeOfEachConstituent[1][0]=2 ;
335 _numberOfNodeOfEachConstituent[1][1]=2 ;
336 _numberOfNodeOfEachConstituent[1][2]=2 ;
337 _numberOfNodeOfEachConstituent[1][3]=2 ;
338 _numberOfNodeOfEachConstituent[1][4]=2 ;
339 _numberOfNodeOfEachConstituent[1][5]=2 ;
341 int* _face1=new int[3];
345 int* _face2=new int[3];
349 int* _face3=new int[3];
353 int* _face4=new int[3];
357 int* _edge1=new int[2];
360 int* _edge2=new int[2];
363 int* _edge3=new int[2];
366 int* _edge4=new int[2];
369 int* _edge5=new int[2];
372 int* _edge6=new int[2];
375 int ** tmpConstituents1 = new int*[4];
376 tmpConstituents1[0]=_face1 ;
377 tmpConstituents1[1]=_face2 ;
378 tmpConstituents1[2]=_face3 ;
379 tmpConstituents1[3]=_face4 ;
380 int ** tmpConstituents2 = new int*[6];
381 tmpConstituents2[0]=_edge1 ;
382 tmpConstituents2[1]=_edge2 ;
383 tmpConstituents2[2]=_edge3 ;
384 tmpConstituents2[3]=_edge4 ;
385 tmpConstituents2[4]=_edge5 ;
386 tmpConstituents2[5]=_edge6 ;
387 _constituents = new int**[2] ;
388 _constituents[0]=tmpConstituents1 ;
389 _constituents[1]=tmpConstituents2 ;
390 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[4] ;
391 tmpConstituentsType1[0] = MED_TRIA3 ;
392 tmpConstituentsType1[1] = MED_TRIA3 ;
393 tmpConstituentsType1[2] = MED_TRIA3 ;
394 tmpConstituentsType1[3] = MED_TRIA3 ;
395 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[6] ;
396 tmpConstituentsType2[0] = MED_SEG2 ;
397 tmpConstituentsType2[1] = MED_SEG2 ;
398 tmpConstituentsType2[2] = MED_SEG2 ;
399 tmpConstituentsType2[3] = MED_SEG2 ;
400 tmpConstituentsType2[4] = MED_SEG2 ;
401 tmpConstituentsType2[5] = MED_SEG2 ;
402 _constituentsType = new medGeometryElement*[2] ;
403 _constituentsType[0]=tmpConstituentsType1 ;
404 _constituentsType[1]=tmpConstituentsType2 ;
408 _name="MED_TETRA10" ;
413 _numberOfConstituentsDimension=2 ;
414 _numberOfConstituents=new int[2] ;
415 _numberOfConstituents[0]=4 ;
416 _numberOfConstituents[1]=6 ;
417 _numberOfNodeOfEachConstituent=new int*[2] ;
418 _numberOfNodeOfEachConstituent[0]=new int[4] ;
419 _numberOfNodeOfEachConstituent[0][0]=6 ;
420 _numberOfNodeOfEachConstituent[0][1]=6 ;
421 _numberOfNodeOfEachConstituent[0][2]=6 ;
422 _numberOfNodeOfEachConstituent[0][3]=6 ;
423 _numberOfNodeOfEachConstituent[1]=new int[6] ;
424 _numberOfNodeOfEachConstituent[1][0]=3 ;
425 _numberOfNodeOfEachConstituent[1][1]=3 ;
426 _numberOfNodeOfEachConstituent[1][2]=3 ;
427 _numberOfNodeOfEachConstituent[1][3]=3 ;
428 _numberOfNodeOfEachConstituent[1][4]=3 ;
429 _numberOfNodeOfEachConstituent[1][5]=3 ;
431 int* _face1=new int[6];
438 int* _face2=new int[6];
445 int* _face3=new int[6];
452 int* _face4=new int[6];
459 int* _edge1=new int[3];
463 int* _edge2=new int[3];
467 int* _edge3=new int[3];
471 int* _edge4=new int[3];
475 int* _edge5=new int[3];
479 int* _edge6=new int[3];
483 int ** tmpConstituents1 = new int*[4];
484 tmpConstituents1[0]=_face1 ;
485 tmpConstituents1[1]=_face2 ;
486 tmpConstituents1[2]=_face3 ;
487 tmpConstituents1[3]=_face4 ;
488 int ** tmpConstituents2 = new int*[6];
489 tmpConstituents2[0]=_edge1 ;
490 tmpConstituents2[1]=_edge2 ;
491 tmpConstituents2[2]=_edge3 ;
492 tmpConstituents2[3]=_edge4 ;
493 tmpConstituents2[4]=_edge5 ;
494 tmpConstituents2[5]=_edge6 ;
495 _constituents = new int**[2] ;
496 _constituents[0]=tmpConstituents1 ;
497 _constituents[1]=tmpConstituents2 ;
498 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[4] ;
499 tmpConstituentsType1[0] = MED_TRIA6 ;
500 tmpConstituentsType1[1] = MED_TRIA6 ;
501 tmpConstituentsType1[2] = MED_TRIA6 ;
502 tmpConstituentsType1[3] = MED_TRIA6 ;
503 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[6] ;
504 tmpConstituentsType2[0] = MED_SEG3 ;
505 tmpConstituentsType2[1] = MED_SEG3 ;
506 tmpConstituentsType2[2] = MED_SEG3 ;
507 tmpConstituentsType2[3] = MED_SEG3 ;
508 tmpConstituentsType2[4] = MED_SEG3 ;
509 tmpConstituentsType2[5] = MED_SEG3 ;
510 _constituentsType = new medGeometryElement*[2] ;
511 _constituentsType[0]=tmpConstituentsType1 ;
512 _constituentsType[1]=tmpConstituentsType2 ;
521 _numberOfConstituentsDimension=2 ;
522 _numberOfConstituents=new int[2] ;
523 _numberOfConstituents[0]=6 ;
524 _numberOfConstituents[1]=12 ;
525 _numberOfNodeOfEachConstituent=new int*[2] ;
526 _numberOfNodeOfEachConstituent[0]=new int[6] ;
527 _numberOfNodeOfEachConstituent[0][0]=4 ;
528 _numberOfNodeOfEachConstituent[0][1]=4 ;
529 _numberOfNodeOfEachConstituent[0][2]=4 ;
530 _numberOfNodeOfEachConstituent[0][3]=4 ;
531 _numberOfNodeOfEachConstituent[0][4]=4 ;
532 _numberOfNodeOfEachConstituent[0][5]=4 ;
533 _numberOfNodeOfEachConstituent[1]=new int[12] ;
534 _numberOfNodeOfEachConstituent[1][0]=2 ;
535 _numberOfNodeOfEachConstituent[1][1]=2 ;
536 _numberOfNodeOfEachConstituent[1][2]=2 ;
537 _numberOfNodeOfEachConstituent[1][3]=2 ;
538 _numberOfNodeOfEachConstituent[1][4]=2 ;
539 _numberOfNodeOfEachConstituent[1][5]=2 ;
540 _numberOfNodeOfEachConstituent[1][6]=2 ;
541 _numberOfNodeOfEachConstituent[1][7]=2 ;
542 _numberOfNodeOfEachConstituent[1][8]=2 ;
543 _numberOfNodeOfEachConstituent[1][9]=2 ;
544 _numberOfNodeOfEachConstituent[1][10]=2 ;
545 _numberOfNodeOfEachConstituent[1][11]=2 ;
547 int* _edge1=new int[2];
550 int* _edge2=new int[2];
553 int* _edge3=new int[2];
556 int* _edge4=new int[2];
559 int* _edge5=new int[2];
562 int* _edge6=new int[2];
565 int* _edge7=new int[2];
568 int* _edge8=new int[2];
571 int* _edge9=new int[2];
574 int* _edge10=new int[2];
577 int* _edge11=new int[2];
580 int* _edge12=new int[2];
583 int* _face1=new int[4];
588 int* _face2=new int[4];
593 int* _face3=new int[4];
598 int* _face4=new int[4];
603 int* _face5=new int[4];
608 int* _face6=new int[4];
613 int ** tmpConstituents1 = new int*[6];
614 tmpConstituents1[0]=_face1 ;
615 tmpConstituents1[1]=_face2 ;
616 tmpConstituents1[2]=_face3 ;
617 tmpConstituents1[3]=_face4 ;
618 tmpConstituents1[4]=_face5 ;
619 tmpConstituents1[5]=_face6 ;
620 int ** tmpConstituents2 = new int*[12];
621 tmpConstituents2[0]=_edge1 ;
622 tmpConstituents2[1]=_edge2 ;
623 tmpConstituents2[2]=_edge3 ;
624 tmpConstituents2[3]=_edge4 ;
625 tmpConstituents2[4]=_edge5 ;
626 tmpConstituents2[5]=_edge6 ;
627 tmpConstituents2[6]=_edge7 ;
628 tmpConstituents2[7]=_edge8 ;
629 tmpConstituents2[8]=_edge9 ;
630 tmpConstituents2[9]=_edge10;
631 tmpConstituents2[10]=_edge11;
632 tmpConstituents2[11]=_edge12;
633 _constituents = new int**[2] ;
634 _constituents[0]=tmpConstituents1 ;
635 _constituents[1]=tmpConstituents2 ;
636 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[6] ;
637 tmpConstituentsType1[0] = MED_QUAD4 ;
638 tmpConstituentsType1[1] = MED_QUAD4 ;
639 tmpConstituentsType1[2] = MED_QUAD4 ;
640 tmpConstituentsType1[3] = MED_QUAD4 ;
641 tmpConstituentsType1[4] = MED_QUAD4 ;
642 tmpConstituentsType1[5] = MED_QUAD4 ;
643 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[12] ;
644 tmpConstituentsType2[0] = MED_SEG2 ;
645 tmpConstituentsType2[1] = MED_SEG2 ;
646 tmpConstituentsType2[2] = MED_SEG2 ;
647 tmpConstituentsType2[3] = MED_SEG2 ;
648 tmpConstituentsType2[4] = MED_SEG2 ;
649 tmpConstituentsType2[5] = MED_SEG2 ;
650 tmpConstituentsType2[6] = MED_SEG2 ;
651 tmpConstituentsType2[7] = MED_SEG2 ;
652 tmpConstituentsType2[8] = MED_SEG2 ;
653 tmpConstituentsType2[9] = MED_SEG2 ;
654 tmpConstituentsType2[10] = MED_SEG2 ;
655 tmpConstituentsType2[11] = MED_SEG2 ;
656 _constituentsType = new medGeometryElement*[2] ;
657 _constituentsType[0]=tmpConstituentsType1 ;
658 _constituentsType[1]=tmpConstituentsType2 ;
667 _numberOfConstituentsDimension=2 ;
668 _numberOfConstituents=new int[2] ;
669 _numberOfConstituents[0]=6 ;
670 _numberOfConstituents[1]=12 ;
671 _numberOfNodeOfEachConstituent=new int*[2] ;
672 _numberOfNodeOfEachConstituent[0]=new int[6] ;
673 _numberOfNodeOfEachConstituent[0][0]=8 ;
674 _numberOfNodeOfEachConstituent[0][1]=8 ;
675 _numberOfNodeOfEachConstituent[0][2]=8 ;
676 _numberOfNodeOfEachConstituent[0][3]=8 ;
677 _numberOfNodeOfEachConstituent[0][4]=8 ;
678 _numberOfNodeOfEachConstituent[0][5]=8 ;
679 _numberOfNodeOfEachConstituent[1]=new int[12] ;
680 _numberOfNodeOfEachConstituent[1][0]=3 ;
681 _numberOfNodeOfEachConstituent[1][1]=3 ;
682 _numberOfNodeOfEachConstituent[1][2]=3 ;
683 _numberOfNodeOfEachConstituent[1][3]=3 ;
684 _numberOfNodeOfEachConstituent[1][4]=3 ;
685 _numberOfNodeOfEachConstituent[1][5]=3 ;
686 _numberOfNodeOfEachConstituent[1][6]=3 ;
687 _numberOfNodeOfEachConstituent[1][7]=3 ;
688 _numberOfNodeOfEachConstituent[1][8]=3 ;
689 _numberOfNodeOfEachConstituent[1][9]=3 ;
690 _numberOfNodeOfEachConstituent[1][10]=3 ;
691 _numberOfNodeOfEachConstituent[1][11]=3 ;
693 int* _edge1=new int[3];
697 int* _edge2=new int[3];
701 int* _edge3=new int[3];
705 int* _edge4=new int[3];
709 int* _edge5=new int[3];
713 int* _edge6=new int[3];
717 int* _edge7=new int[3];
721 int* _edge8=new int[3];
725 int* _edge9=new int[3];
729 int* _edge10=new int[3];
733 int* _edge11=new int[3];
737 int* _edge12=new int[3];
741 int* _face1=new int[8];
750 int* _face2=new int[8];
759 int* _face3=new int[8];
768 int* _face4=new int[8];
777 int* _face5=new int[8];
786 int* _face6=new int[8];
795 int ** tmpConstituents1 = new int*[6];
796 tmpConstituents1[0]=_face1 ;
797 tmpConstituents1[1]=_face2 ;
798 tmpConstituents1[2]=_face3 ;
799 tmpConstituents1[3]=_face4 ;
800 tmpConstituents1[4]=_face5 ;
801 tmpConstituents1[5]=_face6 ;
802 int ** tmpConstituents2 = new int*[12];
803 tmpConstituents2[0]=_edge1 ;
804 tmpConstituents2[1]=_edge2 ;
805 tmpConstituents2[2]=_edge3 ;
806 tmpConstituents2[3]=_edge4 ;
807 tmpConstituents2[4]=_edge5 ;
808 tmpConstituents2[5]=_edge6 ;
809 tmpConstituents2[6]=_edge7 ;
810 tmpConstituents2[7]=_edge8 ;
811 tmpConstituents2[8]=_edge9 ;
812 tmpConstituents2[9]=_edge10;
813 tmpConstituents2[10]=_edge11;
814 tmpConstituents2[11]=_edge12;
815 _constituents = new int**[2] ;
816 _constituents[0]=tmpConstituents1 ;
817 _constituents[1]=tmpConstituents2 ;
818 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[6] ;
819 tmpConstituentsType1[0] = MED_QUAD8 ;
820 tmpConstituentsType1[1] = MED_QUAD8 ;
821 tmpConstituentsType1[2] = MED_QUAD8 ;
822 tmpConstituentsType1[3] = MED_QUAD8 ;
823 tmpConstituentsType1[4] = MED_QUAD8 ;
824 tmpConstituentsType1[5] = MED_QUAD8 ;
825 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[12] ;
826 tmpConstituentsType2[0] = MED_SEG3 ;
827 tmpConstituentsType2[1] = MED_SEG3 ;
828 tmpConstituentsType2[2] = MED_SEG3 ;
829 tmpConstituentsType2[3] = MED_SEG3 ;
830 tmpConstituentsType2[4] = MED_SEG3 ;
831 tmpConstituentsType2[5] = MED_SEG3 ;
832 tmpConstituentsType2[6] = MED_SEG3 ;
833 tmpConstituentsType2[7] = MED_SEG3 ;
834 tmpConstituentsType2[8] = MED_SEG3 ;
835 tmpConstituentsType2[9] = MED_SEG3 ;
836 tmpConstituentsType2[10] = MED_SEG3 ;
837 tmpConstituentsType2[11] = MED_SEG3 ;
838 _constituentsType = new medGeometryElement*[2] ;
839 _constituentsType[0]=tmpConstituentsType1 ;
840 _constituentsType[1]=tmpConstituentsType2 ;
850 _numberOfConstituentsDimension=2 ;
851 _numberOfConstituents=new int[2] ;
852 _numberOfConstituents[0]=5 ;
853 _numberOfConstituents[1]=9 ;
854 _numberOfNodeOfEachConstituent=new int*[2] ;
855 _numberOfNodeOfEachConstituent[0]=new int[5] ;
856 _numberOfNodeOfEachConstituent[0][0]=3 ;
857 _numberOfNodeOfEachConstituent[0][1]=3 ;
858 _numberOfNodeOfEachConstituent[0][2]=4 ;
859 _numberOfNodeOfEachConstituent[0][3]=4 ;
860 _numberOfNodeOfEachConstituent[0][4]=4 ;
861 _numberOfNodeOfEachConstituent[1]=new int[9] ;
862 _numberOfNodeOfEachConstituent[1][0]=2 ;
863 _numberOfNodeOfEachConstituent[1][1]=2 ;
864 _numberOfNodeOfEachConstituent[1][2]=2 ;
865 _numberOfNodeOfEachConstituent[1][3]=2 ;
866 _numberOfNodeOfEachConstituent[1][4]=2 ;
867 _numberOfNodeOfEachConstituent[1][5]=2 ;
868 _numberOfNodeOfEachConstituent[1][6]=2 ;
869 _numberOfNodeOfEachConstituent[1][7]=2 ;
870 _numberOfNodeOfEachConstituent[1][8]=2 ;
872 int* _edge1=new int[2];
875 int* _edge2=new int[2];
878 int* _edge3=new int[2];
881 int* _edge4=new int[2];
884 int* _edge5=new int[2];
887 int* _edge6=new int[2];
890 int* _edge7=new int[2];
893 int* _edge8=new int[2];
896 int* _edge9=new int[2];
899 int* _face1=new int[3];
903 int* _face2=new int[3];
907 int* _face3=new int[4];
912 int* _face4=new int[4];
917 int* _face5=new int[4];
922 int ** tmpConstituents1 = new int*[5];
923 tmpConstituents1[0]=_face1 ;
924 tmpConstituents1[1]=_face2 ;
925 tmpConstituents1[2]=_face3 ;
926 tmpConstituents1[3]=_face4 ;
927 tmpConstituents1[4]=_face5 ;
928 int ** tmpConstituents2 = new int*[9];
929 tmpConstituents2[0]=_edge1 ;
930 tmpConstituents2[1]=_edge2 ;
931 tmpConstituents2[2]=_edge3 ;
932 tmpConstituents2[3]=_edge4 ;
933 tmpConstituents2[4]=_edge5 ;
934 tmpConstituents2[5]=_edge6 ;
935 tmpConstituents2[6]=_edge7 ;
936 tmpConstituents2[7]=_edge8 ;
937 tmpConstituents2[8]=_edge9 ;
938 _constituents = new int**[2] ;
939 _constituents[0]=tmpConstituents1 ;
940 _constituents[1]=tmpConstituents2 ;
941 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[5] ;
942 tmpConstituentsType1[0] = MED_TRIA3 ;
943 tmpConstituentsType1[1] = MED_TRIA3 ;
944 tmpConstituentsType1[2] = MED_QUAD4 ;
945 tmpConstituentsType1[3] = MED_QUAD4 ;
946 tmpConstituentsType1[4] = MED_QUAD4 ;
947 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[9] ;
948 tmpConstituentsType2[0] = MED_SEG2 ;
949 tmpConstituentsType2[1] = MED_SEG2 ;
950 tmpConstituentsType2[2] = MED_SEG2 ;
951 tmpConstituentsType2[3] = MED_SEG2 ;
952 tmpConstituentsType2[4] = MED_SEG2 ;
953 tmpConstituentsType2[5] = MED_SEG2 ;
954 tmpConstituentsType2[6] = MED_SEG2 ;
955 tmpConstituentsType2[7] = MED_SEG2 ;
956 tmpConstituentsType2[8] = MED_SEG2 ;
957 _constituentsType = new medGeometryElement*[2] ;
958 _constituentsType[0]=tmpConstituentsType1 ;
959 _constituentsType[1]=tmpConstituentsType2 ;
963 _name="MED_PENTA15" ;
968 _numberOfConstituentsDimension=2 ;
969 _numberOfConstituents=new int[2] ;
970 _numberOfConstituents[0]=5 ;
971 _numberOfConstituents[1]=9 ;
972 _numberOfNodeOfEachConstituent=new int*[2] ;
973 _numberOfNodeOfEachConstituent[0]=new int[5] ;
974 _numberOfNodeOfEachConstituent[0][0]=6 ;
975 _numberOfNodeOfEachConstituent[0][1]=6 ;
976 _numberOfNodeOfEachConstituent[0][2]=8 ;
977 _numberOfNodeOfEachConstituent[0][3]=8 ;
978 _numberOfNodeOfEachConstituent[0][4]=8 ;
979 _numberOfNodeOfEachConstituent[1]=new int[9] ;
980 _numberOfNodeOfEachConstituent[1][0]=3 ;
981 _numberOfNodeOfEachConstituent[1][1]=3 ;
982 _numberOfNodeOfEachConstituent[1][2]=3 ;
983 _numberOfNodeOfEachConstituent[1][3]=3 ;
984 _numberOfNodeOfEachConstituent[1][4]=3 ;
985 _numberOfNodeOfEachConstituent[1][5]=3 ;
986 _numberOfNodeOfEachConstituent[1][6]=3 ;
987 _numberOfNodeOfEachConstituent[1][7]=3 ;
988 _numberOfNodeOfEachConstituent[1][8]=3 ;
990 int* _edge1=new int[3];
994 int* _edge2=new int[3];
998 int* _edge3=new int[3];
1002 int* _edge4=new int[3];
1006 int* _edge5=new int[3];
1010 int* _edge6=new int[3];
1014 int* _edge7=new int[3];
1018 int* _edge8=new int[3];
1022 int* _edge9=new int[3];
1026 int* _face1=new int[6];
1033 int* _face2=new int[6];
1040 int* _face3=new int[8];
1049 int* _face4=new int[8];
1058 int* _face5=new int[8];
1067 int ** tmpConstituents1 = new int*[5];
1068 tmpConstituents1[0]=_face1 ;
1069 tmpConstituents1[1]=_face2 ;
1070 tmpConstituents1[2]=_face3 ;
1071 tmpConstituents1[3]=_face4 ;
1072 tmpConstituents1[4]=_face5 ;
1073 int ** tmpConstituents2 = new int*[9];
1074 tmpConstituents2[0]=_edge1 ;
1075 tmpConstituents2[1]=_edge2 ;
1076 tmpConstituents2[2]=_edge3 ;
1077 tmpConstituents2[3]=_edge4 ;
1078 tmpConstituents2[4]=_edge5 ;
1079 tmpConstituents2[5]=_edge6 ;
1080 tmpConstituents2[6]=_edge7 ;
1081 tmpConstituents2[7]=_edge8 ;
1082 tmpConstituents2[8]=_edge9 ;
1083 _constituents = new int**[2] ;
1084 _constituents[0]=tmpConstituents1 ;
1085 _constituents[1]=tmpConstituents2 ;
1086 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[5] ;
1087 tmpConstituentsType1[0] = MED_TRIA6 ;
1088 tmpConstituentsType1[1] = MED_TRIA6 ;
1089 tmpConstituentsType1[2] = MED_QUAD8 ;
1090 tmpConstituentsType1[3] = MED_QUAD8 ;
1091 tmpConstituentsType1[4] = MED_QUAD8 ;
1092 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[9] ;
1093 tmpConstituentsType2[0] = MED_SEG3 ;
1094 tmpConstituentsType2[1] = MED_SEG3 ;
1095 tmpConstituentsType2[2] = MED_SEG3 ;
1096 tmpConstituentsType2[3] = MED_SEG3 ;
1097 tmpConstituentsType2[4] = MED_SEG3 ;
1098 tmpConstituentsType2[5] = MED_SEG3 ;
1099 tmpConstituentsType2[6] = MED_SEG3 ;
1100 tmpConstituentsType2[7] = MED_SEG3 ;
1101 tmpConstituentsType2[8] = MED_SEG3 ;
1102 _constituentsType = new medGeometryElement*[2] ;
1103 _constituentsType[0]=tmpConstituentsType1 ;
1104 _constituentsType[1]=tmpConstituentsType2 ;
1111 _numberOfVertexes=5;
1113 _numberOfConstituentsDimension=2 ;
1114 _numberOfConstituents=new int[2] ;
1115 _numberOfConstituents[0]=5 ;
1116 _numberOfConstituents[1]=8 ;
1117 _numberOfNodeOfEachConstituent=new int*[2] ;
1118 _numberOfNodeOfEachConstituent[0]=new int[5] ;
1119 _numberOfNodeOfEachConstituent[0][0]=4 ;
1120 _numberOfNodeOfEachConstituent[0][1]=3 ;
1121 _numberOfNodeOfEachConstituent[0][2]=3 ;
1122 _numberOfNodeOfEachConstituent[0][3]=3 ;
1123 _numberOfNodeOfEachConstituent[0][4]=3 ;
1124 _numberOfNodeOfEachConstituent[1]=new int[8] ;
1125 _numberOfNodeOfEachConstituent[1][0]=2 ;
1126 _numberOfNodeOfEachConstituent[1][1]=2 ;
1127 _numberOfNodeOfEachConstituent[1][2]=2 ;
1128 _numberOfNodeOfEachConstituent[1][3]=2 ;
1129 _numberOfNodeOfEachConstituent[1][4]=2 ;
1130 _numberOfNodeOfEachConstituent[1][5]=2 ;
1131 _numberOfNodeOfEachConstituent[1][6]=2 ;
1132 _numberOfNodeOfEachConstituent[1][7]=2 ;
1134 int* _edge1=new int[2];
1137 int* _edge2=new int[2];
1140 int* _edge3=new int[2];
1143 int* _edge4=new int[2];
1146 int* _edge5=new int[2];
1149 int* _edge6=new int[2];
1152 int* _edge7=new int[2];
1155 int* _edge8=new int[2];
1158 int* _face1=new int[4];
1163 int* _face2=new int[3];
1167 int* _face3=new int[3];
1171 int* _face4=new int[3];
1175 int* _face5=new int[3];
1179 int ** tmpConstituents1 = new int*[5];
1180 tmpConstituents1[0]=_face1 ;
1181 tmpConstituents1[1]=_face2 ;
1182 tmpConstituents1[2]=_face3 ;
1183 tmpConstituents1[3]=_face4 ;
1184 tmpConstituents1[4]=_face5 ;
1185 int ** tmpConstituents2 = new int*[8];
1186 tmpConstituents2[0]=_edge1 ;
1187 tmpConstituents2[1]=_edge2 ;
1188 tmpConstituents2[2]=_edge3 ;
1189 tmpConstituents2[3]=_edge4 ;
1190 tmpConstituents2[4]=_edge5 ;
1191 tmpConstituents2[5]=_edge6 ;
1192 tmpConstituents2[6]=_edge7 ;
1193 tmpConstituents2[7]=_edge8 ;
1194 _constituents = new int**[2] ;
1195 _constituents[0]=tmpConstituents1 ;
1196 _constituents[1]=tmpConstituents2 ;
1197 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[5] ;
1198 tmpConstituentsType1[0] = MED_QUAD4 ;
1199 tmpConstituentsType1[1] = MED_TRIA3 ;
1200 tmpConstituentsType1[2] = MED_TRIA3 ;
1201 tmpConstituentsType1[3] = MED_TRIA3 ;
1202 tmpConstituentsType1[4] = MED_TRIA3 ;
1203 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[8] ;
1204 tmpConstituentsType2[0] = MED_SEG2 ;
1205 tmpConstituentsType2[1] = MED_SEG2 ;
1206 tmpConstituentsType2[2] = MED_SEG2 ;
1207 tmpConstituentsType2[3] = MED_SEG2 ;
1208 tmpConstituentsType2[4] = MED_SEG2 ;
1209 tmpConstituentsType2[5] = MED_SEG2 ;
1210 tmpConstituentsType2[6] = MED_SEG2 ;
1211 tmpConstituentsType2[7] = MED_SEG2 ;
1212 _constituentsType = new medGeometryElement*[2] ;
1213 _constituentsType[0]=tmpConstituentsType1 ;
1214 _constituentsType[1]=tmpConstituentsType2 ;
1218 _name="MED_PYRA13" ;
1221 _numberOfVertexes=5;
1223 _numberOfConstituentsDimension=2 ;
1224 _numberOfConstituents=new int[2] ;
1225 _numberOfConstituents[0]=5 ;
1226 _numberOfConstituents[1]=8 ;
1227 _numberOfNodeOfEachConstituent=new int*[2] ;
1228 _numberOfNodeOfEachConstituent[0]=new int[5] ;
1229 _numberOfNodeOfEachConstituent[0][0]=8 ;
1230 _numberOfNodeOfEachConstituent[0][1]=6 ;
1231 _numberOfNodeOfEachConstituent[0][2]=6 ;
1232 _numberOfNodeOfEachConstituent[0][3]=6 ;
1233 _numberOfNodeOfEachConstituent[0][4]=6 ;
1234 _numberOfNodeOfEachConstituent[1]=new int[8] ;
1235 _numberOfNodeOfEachConstituent[1][0]=3 ;
1236 _numberOfNodeOfEachConstituent[1][1]=3 ;
1237 _numberOfNodeOfEachConstituent[1][2]=3 ;
1238 _numberOfNodeOfEachConstituent[1][3]=3 ;
1239 _numberOfNodeOfEachConstituent[1][4]=3 ;
1240 _numberOfNodeOfEachConstituent[1][5]=3 ;
1241 _numberOfNodeOfEachConstituent[1][6]=3 ;
1242 _numberOfNodeOfEachConstituent[1][7]=3 ;
1244 int* _edge1=new int[3];
1248 int* _edge2=new int[3];
1252 int* _edge3=new int[3];
1256 int* _edge4=new int[3];
1260 int* _edge5=new int[3];
1264 int* _edge6=new int[3];
1268 int* _edge7=new int[3];
1272 int* _edge8=new int[3];
1276 int* _face1=new int[8];
1285 int* _face2=new int[6];
1292 int* _face3=new int[6];
1299 int* _face4=new int[6];
1306 int* _face5=new int[6];
1313 int ** tmpConstituents1 = new int*[5];
1314 tmpConstituents1[0]=_face1 ;
1315 tmpConstituents1[1]=_face2 ;
1316 tmpConstituents1[2]=_face3 ;
1317 tmpConstituents1[3]=_face4 ;
1318 tmpConstituents1[4]=_face5 ;
1319 int ** tmpConstituents2 = new int*[8];
1320 tmpConstituents2[0]=_edge1 ;
1321 tmpConstituents2[1]=_edge2 ;
1322 tmpConstituents2[2]=_edge3 ;
1323 tmpConstituents2[3]=_edge4 ;
1324 tmpConstituents2[4]=_edge5 ;
1325 tmpConstituents2[5]=_edge6 ;
1326 tmpConstituents2[6]=_edge7 ;
1327 tmpConstituents2[7]=_edge8 ;
1328 _constituents = new int**[2] ;
1329 _constituents[0]=tmpConstituents1 ;
1330 _constituents[1]=tmpConstituents2 ;
1331 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[5] ;
1332 tmpConstituentsType1[0] = MED_QUAD8 ;
1333 tmpConstituentsType1[1] = MED_TRIA6 ;
1334 tmpConstituentsType1[2] = MED_TRIA6 ;
1335 tmpConstituentsType1[3] = MED_TRIA6 ;
1336 tmpConstituentsType1[4] = MED_TRIA6 ;
1337 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[8] ;
1338 tmpConstituentsType2[0] = MED_SEG3 ;
1339 tmpConstituentsType2[1] = MED_SEG3 ;
1340 tmpConstituentsType2[2] = MED_SEG3 ;
1341 tmpConstituentsType2[3] = MED_SEG3 ;
1342 tmpConstituentsType2[4] = MED_SEG3 ;
1343 tmpConstituentsType2[5] = MED_SEG3 ;
1344 tmpConstituentsType2[6] = MED_SEG3 ;
1345 tmpConstituentsType2[7] = MED_SEG3 ;
1346 _constituentsType = new medGeometryElement*[2] ;
1347 _constituentsType[0]=tmpConstituentsType1 ;
1348 _constituentsType[1]=tmpConstituentsType2 ;
1357 ostream & MEDMEM::operator<<(ostream &os,const CELLMODEL &my)
1359 os << "Cell Model :" << endl ;
1360 os << " - name : " << my._name << endl;
1361 os << " - type : " << (int)my._type << endl;
1362 os << " - dimension : " << my._dimension << endl;
1363 os << " - number of nodes : " << my._numberOfNodes << endl ;
1364 os << " - number of vertexes : " << my._numberOfVertexes << endl ;
1366 os << " - number of Constituents Dimension : " << my._numberOfConstituentsDimension << endl ;
1368 for(int i=0;i<my._numberOfConstituentsDimension;i++)
1371 os << " - for dimension (-" << i+1 << ") : " << endl ;
1372 os << " - number of Constituents for this Dimension : " << my._numberOfConstituents[i] << endl ;
1374 for(int j=0;j<my._numberOfConstituents[i];j++)
1376 os << " - number of node for this constituent : " << my._numberOfNodeOfEachConstituent[i][j] << endl ;
1377 os << " - constituents " << j+1 << " of type "<< my._constituentsType[i][j] <<" : " ;
1378 for(int k=0;k<my._numberOfNodeOfEachConstituent[i][j];k++)
1379 os << my._constituents[i][j][k] << " " ;
1388 // Return number of constituents type (which dimension is _dimension-1).
1389 int CELLMODEL::getNumberOfConstituentsType() const
1391 set<medGeometryElement> constituentsTypes ;
1392 // if (_constituentsType.size() > 0 ) {
1393 // vector<medGeometryElement> constituentsType = _constituentsType[0] ;
1394 // vector<medGeometryElement>::iterator itvec ;
1395 // for(itvec=constituentsType.begin();itvec!=constituentsType.end();itvec++)
1396 // constituentsTypes.insert(*itvec);
1398 return constituentsTypes.size() ;
1401 // Return all types of constituents which dimension is (_dimension-1).
1402 set<medGeometryElement> CELLMODEL::getAllConstituentsType() const
1404 set<medGeometryElement> constituentsTypes ;
1405 // if (_constituentsType.size() > 0 ) {
1406 // vector<medGeometryElement> constituentsType = _constituentsType[0] ;
1407 // vector<medGeometryElement>::iterator itvec ;
1408 // for(itvec=constituentsType.begin();itvec!=constituentsType.end();itvec++)
1409 // constituentsTypes.insert(*itvec);
1411 return constituentsTypes ;
1414 // Return number of constituents foreach type (which dimension is _dimension-1).
1415 map<medGeometryElement,int> CELLMODEL::getNumberOfConstituentsForeachType() const
1417 map<medGeometryElement,int> numberOfConstituentsForeachType ;
1418 // map<medGeometryElement,int>::iterator itmap ;
1419 // if (_constituentsType.size() > 0 ) {
1420 // vector<medGeometryElement> constituentsType = _constituentsType[0] ;
1421 // vector<medGeometryElement>::iterator itvec ;
1422 // for(itvec=constituentsType.begin();itvec!=constituentsType.end();itvec++) {
1423 // itmap = numberOfConstituentsForeachType.find(*itvec);
1424 // if (itmap==numberOfConstituentsForeachType.end()) // new element
1425 // numberOfConstituentsForeachType[*itvec]=1 ;
1427 // numberOfConstituentsForeachType[*itvec]++ ;
1430 return numberOfConstituentsForeachType ;
1433 void CELLMODEL::init(const CELLMODEL &m)
1437 _dimension = m._dimension ;
1438 _numberOfNodes = m._numberOfNodes ;
1439 _numberOfVertexes = m._numberOfVertexes ;
1441 _numberOfConstituentsDimension = m._numberOfConstituentsDimension ;
1443 _numberOfConstituents = new int[_numberOfConstituentsDimension] ;
1444 for(int i=0; i<_numberOfConstituentsDimension; i++)
1445 _numberOfConstituents[i]=m._numberOfConstituents[i] ;
1447 _numberOfNodeOfEachConstituent = new int*[_numberOfConstituentsDimension] ;
1448 for(int i=0; i<_numberOfConstituentsDimension; i++) {
1449 int numberOf = _numberOfConstituents[i] ;
1450 int * newArray = new int[numberOf] ;
1451 int * oldArray = m._numberOfNodeOfEachConstituent[i] ;
1452 for(int j=0; j<numberOf; j++)
1453 newArray[j] = oldArray[j] ;
1454 _numberOfNodeOfEachConstituent[i] = newArray ;
1456 _constituents = new int**[_numberOfConstituentsDimension] ;
1457 _constituentsType = new medGeometryElement*[_numberOfConstituentsDimension] ;
1458 for(int i=0; i<_numberOfConstituentsDimension; i++) {
1459 int numberOf = _numberOfConstituents[i] ;
1460 int ** tmpArray = new int*[numberOf] ;
1461 medGeometryElement * newArrayType = new medGeometryElement[numberOf] ;
1462 medGeometryElement * oldArrayType = m._constituentsType[i] ;
1464 for(int j=0; j<numberOf; j++) {
1465 int numberOf2 = _numberOfNodeOfEachConstituent[i][j] ;
1466 int * newArray = new int[numberOf2] ;
1467 int * oldArray = m._constituents[i][j] ;
1468 for(int k=0; k<numberOf2; k++)
1469 newArray[k] = oldArray[k] ;
1470 tmpArray[j] = newArray ;
1471 newArrayType[j] = oldArrayType[j] ;
1473 _constituents[i] = tmpArray ;
1474 _constituentsType[i] = newArrayType ;
1478 void CELLMODEL::clean()
1480 for(int i=0; i<_numberOfConstituentsDimension; i++) {
1481 int numberOf = _numberOfConstituents[i] ;
1482 for(int j=0; j<numberOf; j++) {
1483 if (NULL!=_constituents[i][j])
1484 delete[] _constituents[i][j] ;
1486 if (NULL!=_constituentsType[i])
1487 delete[] _constituentsType[i] ;
1488 if (NULL!=_constituents[i])
1489 delete[] _constituents[i] ;
1490 if (NULL!=_numberOfNodeOfEachConstituent[i])
1491 delete[] _numberOfNodeOfEachConstituent[i] ;
1493 if (NULL!=_numberOfConstituents)
1494 delete[]_numberOfConstituents ;
1495 if (NULL!=_constituentsType)
1496 delete[] _constituentsType ;
1497 if (NULL!=_constituents)
1498 delete[] _constituents ;
1499 if (NULL!=_numberOfNodeOfEachConstituent)
1500 delete[] _numberOfNodeOfEachConstituent ;