3 File MEDMEM_CellModel.cxx
8 #include "MEDMEM_CellModel.hxx"
10 CELLMODEL::CELLMODEL(medGeometryElement t)
12 // init first all to nothing
16 _numberOfConstituentsDimension=0 ;
17 _numberOfConstituents=(int*)NULL ;
18 _numberOfNodeOfEachConstituent=(int**)NULL ;
19 _constituents=(int***)NULL ;
20 //_numberOfonstituentsType=(int*)NULL ;
21 _constituentsType=(medGeometryElement**)NULL ;
23 MESSAGE("CELLMODEL : constructeur pour le type " << t);
32 // nothing else : POINT are none constituent
41 // constituent are POINT1 and we have no need to define _constituents vector
42 _numberOfConstituentsDimension=1 ;
43 _numberOfConstituents=new int[1] ;
44 _numberOfConstituents[0]=2 ;
45 _numberOfNodeOfEachConstituent=new (int*)[1] ;
46 _numberOfNodeOfEachConstituent[0]=new (int)[2] ;
47 _numberOfNodeOfEachConstituent[0][0]=1 ;
48 _numberOfNodeOfEachConstituent[0][1]=1 ;
50 _constituents = new (int**)[1] ;
51 _constituents[0] = new (int*)[2] ;
52 _constituents[0][0] = new int[1] ;
53 _constituents[0][0][0] = 1 ;
54 _constituents[0][1] = new int[1] ;
55 _constituents[0][1][0] = 2 ;
57 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[2] ;
58 tmpConstituentsType1[0] = MED_POINT1 ;
59 tmpConstituentsType1[1] = MED_POINT1 ;
60 _constituentsType = new medGeometryElement*[1] ;
61 _constituentsType[0]=tmpConstituentsType1 ;
70 // constituent are POINT1 and we have no need to define _constituents vector
71 _numberOfConstituentsDimension=1 ;
72 _numberOfConstituents=new int[1] ;
73 _numberOfConstituents[0]=3 ;
74 _numberOfNodeOfEachConstituent=new (int*)[1] ;
75 _numberOfNodeOfEachConstituent[0]=new (int)[3] ;
76 _numberOfNodeOfEachConstituent[0][0]=1 ;
77 _numberOfNodeOfEachConstituent[0][1]=1 ;
78 _numberOfNodeOfEachConstituent[0][2]=1 ;
80 _constituents = new (int**)[1] ;
81 _constituents[0] = new (int*)[3] ;
82 _constituents[0][0] = new int[1] ;
83 _constituents[0][0][0] = 1 ;
84 _constituents[0][1] = new int[1] ;
85 _constituents[0][1][0] = 2 ;
86 _constituents[0][2] = new int[1] ;
87 _constituents[0][2][0] = 3 ;
89 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[3] ;
90 tmpConstituentsType1[0] = MED_POINT1 ;
91 tmpConstituentsType1[1] = MED_POINT1 ;
92 tmpConstituentsType1[2] = MED_POINT1 ;
93 _constituentsType = new medGeometryElement*[1] ;
94 _constituentsType[0]=tmpConstituentsType1 ;
104 _numberOfConstituentsDimension=1 ;
105 _numberOfConstituents=new int[1] ;
106 _numberOfConstituents[0]=3 ;
107 _numberOfNodeOfEachConstituent=new (int*)[1] ;
108 _numberOfNodeOfEachConstituent[0]=new (int)[3] ;
109 _numberOfNodeOfEachConstituent[0][0]=2 ;
110 _numberOfNodeOfEachConstituent[0][1]=2 ;
111 _numberOfNodeOfEachConstituent[0][2]=2 ;
113 int* _edge1=new int[2];
116 int* _edge2=new int[2];
119 int* _edge3=new int[2];
122 int ** tmpConstituents1 = new (int*)[3];
123 tmpConstituents1[0]=_edge1 ;
124 tmpConstituents1[1]=_edge2 ;
125 tmpConstituents1[2]=_edge3 ;
126 _constituents = new int**[1] ;
127 _constituents[0]=tmpConstituents1 ;
129 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[3] ;
130 tmpConstituentsType1[0] = MED_SEG2 ;
131 tmpConstituentsType1[1] = MED_SEG2 ;
132 tmpConstituentsType1[2] = MED_SEG2 ;
133 // medGeometryElement * tmpConstituentsType2 = new medGeometryElement[3] ;
134 // tmpConstituentsType2[0] = MED_POINT1 ;
135 // tmpConstituentsType2[1] = MED_POINT1 ;
136 // tmpConstituentsType2[2] = MED_POINT1 ;
137 // _constituentsType = new medGeometryElement*[2] ;
138 _constituentsType = new medGeometryElement*[1] ;
139 _constituentsType[0]=tmpConstituentsType1 ;
140 // _constituentsType[1]=tmpConstituentsType2 ;
141 // Well, point are defined, but could not be acces because we have
142 // only 1 numberOfConstituentsDimension !
152 _numberOfConstituentsDimension=1 ;
153 _numberOfConstituents=new int[1] ;
154 _numberOfConstituents[0]=3 ;
155 _numberOfNodeOfEachConstituent=new (int*)[1] ;
156 _numberOfNodeOfEachConstituent[0]=new (int)[3] ;
157 _numberOfNodeOfEachConstituent[0][0]=3 ;
158 _numberOfNodeOfEachConstituent[0][1]=3 ;
159 _numberOfNodeOfEachConstituent[0][2]=3 ;
161 int* _edge1=new int[3];
165 int* _edge2=new int[3];
169 int* _edge3=new int[3];
173 int ** tmpConstituents1 = new (int*)[3];
174 tmpConstituents1[0]=_edge1 ;
175 tmpConstituents1[1]=_edge2 ;
176 tmpConstituents1[2]=_edge3 ;
177 _constituents = new int**[1] ;
178 _constituents[0]=tmpConstituents1 ;
179 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[3] ;
180 tmpConstituentsType1[0] = MED_SEG3 ;
181 tmpConstituentsType1[1] = MED_SEG3 ;
182 tmpConstituentsType1[2] = MED_SEG3 ;
183 // medGeometryElement * tmpConstituentsType2 = new medGeometryElement[6] ;
184 // tmpConstituentsType2[0] = MED_POINT1 ;
185 // tmpConstituentsType2[1] = MED_POINT1 ;
186 // tmpConstituentsType2[2] = MED_POINT1 ;
187 // tmpConstituentsType2[3] = MED_POINT1 ;
188 // tmpConstituentsType2[4] = MED_POINT1 ;
189 // tmpConstituentsType2[5] = MED_POINT1 ;
190 // _constituentsType = new medGeometryElement*[2] ;
191 _constituentsType = new medGeometryElement*[1] ;
192 _constituentsType[0]=tmpConstituentsType1 ;
193 // _constituentsType[1]=tmpConstituentsType2 ;
194 // Well, point are defined, but could not be acces because we have
195 // only 1 numberOfConstituentsDimension !
205 _numberOfConstituentsDimension=1 ;
206 _numberOfConstituents=new int[1] ;
207 _numberOfConstituents[0]=4 ;
208 _numberOfNodeOfEachConstituent=new (int*)[1] ;
209 _numberOfNodeOfEachConstituent[0]=new (int)[4] ;
210 _numberOfNodeOfEachConstituent[0][0]=2 ;
211 _numberOfNodeOfEachConstituent[0][1]=2 ;
212 _numberOfNodeOfEachConstituent[0][2]=2 ;
213 _numberOfNodeOfEachConstituent[0][3]=2 ;
215 int* _edge1=new int[2];
218 int* _edge2=new int[2];
221 int* _edge3=new int[2];
224 int* _edge4=new int[2];
227 int ** tmpConstituents1 = new (int*)[4];
228 tmpConstituents1[0]=_edge1 ;
229 tmpConstituents1[1]=_edge2 ;
230 tmpConstituents1[2]=_edge3 ;
231 tmpConstituents1[3]=_edge4 ;
232 _constituents = new int**[1] ;
233 _constituents[0]=tmpConstituents1 ;
234 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[4] ;
235 tmpConstituentsType1[0] = MED_SEG2 ;
236 tmpConstituentsType1[1] = MED_SEG2 ;
237 tmpConstituentsType1[2] = MED_SEG2 ;
238 tmpConstituentsType1[3] = MED_SEG2 ;
239 // medGeometryElement * tmpConstituentsType2 = new medGeometryElement[4] ;
240 // tmpConstituentsType2[0] = MED_POINT1 ;
241 // tmpConstituentsType2[1] = MED_POINT1 ;
242 // tmpConstituentsType2[2] = MED_POINT1 ;
243 // tmpConstituentsType2[3] = MED_POINT1 ;
244 // _constituentsType = new medGeometryElement*[2] ;
245 _constituentsType = new medGeometryElement*[1] ;
246 _constituentsType[0]=tmpConstituentsType1 ;
247 // _constituentsType[1]=tmpConstituentsType2 ;
248 // Well, point are defined, but could not be acces because we have
249 // only 1 numberOfConstituentsDimension !
259 _numberOfConstituentsDimension=1 ;
260 _numberOfConstituents=new int[1] ;
261 _numberOfConstituents[0]=4 ;
262 _numberOfNodeOfEachConstituent=new (int*)[1] ;
263 _numberOfNodeOfEachConstituent[0]=new (int)[4] ;
264 _numberOfNodeOfEachConstituent[0][0]=3 ;
265 _numberOfNodeOfEachConstituent[0][1]=3 ;
266 _numberOfNodeOfEachConstituent[0][2]=3 ;
267 _numberOfNodeOfEachConstituent[0][3]=3 ;
269 int* _edge1=new int[3];
273 int* _edge2=new int[3];
277 int* _edge3=new int[3];
281 int* _edge4=new int[3];
285 int ** tmpConstituents1 = new (int*)[4];
286 tmpConstituents1[0]=_edge1 ;
287 tmpConstituents1[1]=_edge2 ;
288 tmpConstituents1[2]=_edge3 ;
289 tmpConstituents1[3]=_edge4 ;
290 _constituents = new int**[1] ;
291 _constituents[0]=tmpConstituents1 ;
292 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[4] ;
293 tmpConstituentsType1[0] = MED_SEG3 ;
294 tmpConstituentsType1[1] = MED_SEG3 ;
295 tmpConstituentsType1[2] = MED_SEG3 ;
296 tmpConstituentsType1[3] = MED_SEG3 ;
297 // medGeometryElement * tmpConstituentsType2 = new medGeometryElement[8] ;
298 // tmpConstituentsType2[0] = MED_POINT1 ;
299 // tmpConstituentsType2[1] = MED_POINT1 ;
300 // tmpConstituentsType2[2] = MED_POINT1 ;
301 // tmpConstituentsType2[3] = MED_POINT1 ;
302 // tmpConstituentsType2[4] = MED_POINT1 ;
303 // tmpConstituentsType2[5] = MED_POINT1 ;
304 // tmpConstituentsType2[6] = MED_POINT1 ;
305 // tmpConstituentsType2[7] = MED_POINT1 ;
306 // _constituentsType = new medGeometryElement*[2] ;
307 _constituentsType = new medGeometryElement*[1] ;
308 _constituentsType[0]=tmpConstituentsType1 ;
309 // _constituentsType[1]=tmpConstituentsType2 ;
310 // Well, point are defined, but could not be acces because we have
311 // only 1 numberOfConstituentsDimension !
321 _numberOfConstituentsDimension=2 ;
322 _numberOfConstituents=new int[2] ;
323 _numberOfConstituents[0]=4 ;
324 _numberOfConstituents[1]=6 ;
325 _numberOfNodeOfEachConstituent=new (int*)[2] ;
326 _numberOfNodeOfEachConstituent[0]=new (int)[4] ;
327 _numberOfNodeOfEachConstituent[0][0]=3 ;
328 _numberOfNodeOfEachConstituent[0][1]=3 ;
329 _numberOfNodeOfEachConstituent[0][2]=3 ;
330 _numberOfNodeOfEachConstituent[0][3]=3 ;
331 _numberOfNodeOfEachConstituent[1]=new (int)[6] ;
332 _numberOfNodeOfEachConstituent[1][0]=2 ;
333 _numberOfNodeOfEachConstituent[1][1]=2 ;
334 _numberOfNodeOfEachConstituent[1][2]=2 ;
335 _numberOfNodeOfEachConstituent[1][3]=2 ;
336 _numberOfNodeOfEachConstituent[1][4]=2 ;
337 _numberOfNodeOfEachConstituent[1][5]=2 ;
339 int* _face1=new int[3];
343 int* _face2=new int[3];
347 int* _face3=new int[3];
351 int* _face4=new int[3];
355 int* _edge1=new int[2];
358 int* _edge2=new int[2];
361 int* _edge3=new int[2];
364 int* _edge4=new int[2];
367 int* _edge5=new int[2];
370 int* _edge6=new int[2];
373 int ** tmpConstituents1 = new (int*)[4];
374 tmpConstituents1[0]=_face1 ;
375 tmpConstituents1[1]=_face2 ;
376 tmpConstituents1[2]=_face3 ;
377 tmpConstituents1[3]=_face4 ;
378 int ** tmpConstituents2 = new (int*)[6];
379 tmpConstituents2[0]=_edge1 ;
380 tmpConstituents2[1]=_edge2 ;
381 tmpConstituents2[2]=_edge3 ;
382 tmpConstituents2[3]=_edge4 ;
383 tmpConstituents2[4]=_edge5 ;
384 tmpConstituents2[5]=_edge6 ;
385 _constituents = new int**[2] ;
386 _constituents[0]=tmpConstituents1 ;
387 _constituents[1]=tmpConstituents2 ;
388 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[4] ;
389 tmpConstituentsType1[0] = MED_TRIA3 ;
390 tmpConstituentsType1[1] = MED_TRIA3 ;
391 tmpConstituentsType1[2] = MED_TRIA3 ;
392 tmpConstituentsType1[3] = MED_TRIA3 ;
393 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[6] ;
394 tmpConstituentsType2[0] = MED_SEG2 ;
395 tmpConstituentsType2[1] = MED_SEG2 ;
396 tmpConstituentsType2[2] = MED_SEG2 ;
397 tmpConstituentsType2[3] = MED_SEG2 ;
398 tmpConstituentsType2[4] = MED_SEG2 ;
399 tmpConstituentsType2[5] = MED_SEG2 ;
400 _constituentsType = new medGeometryElement*[2] ;
401 _constituentsType[0]=tmpConstituentsType1 ;
402 _constituentsType[1]=tmpConstituentsType2 ;
406 _name="MED_TETRA10" ;
411 _numberOfConstituentsDimension=2 ;
412 _numberOfConstituents=new int[2] ;
413 _numberOfConstituents[0]=4 ;
414 _numberOfConstituents[1]=6 ;
415 _numberOfNodeOfEachConstituent=new (int*)[2] ;
416 _numberOfNodeOfEachConstituent[0]=new (int)[4] ;
417 _numberOfNodeOfEachConstituent[0][0]=6 ;
418 _numberOfNodeOfEachConstituent[0][1]=6 ;
419 _numberOfNodeOfEachConstituent[0][2]=6 ;
420 _numberOfNodeOfEachConstituent[0][3]=6 ;
421 _numberOfNodeOfEachConstituent[1]=new (int)[6] ;
422 _numberOfNodeOfEachConstituent[1][0]=3 ;
423 _numberOfNodeOfEachConstituent[1][1]=3 ;
424 _numberOfNodeOfEachConstituent[1][2]=3 ;
425 _numberOfNodeOfEachConstituent[1][3]=3 ;
426 _numberOfNodeOfEachConstituent[1][4]=3 ;
427 _numberOfNodeOfEachConstituent[1][5]=3 ;
429 int* _face1=new int[6];
436 int* _face2=new int[6];
443 int* _face3=new int[6];
450 int* _face4=new int[6];
457 int* _edge1=new int[3];
461 int* _edge2=new int[3];
465 int* _edge3=new int[3];
469 int* _edge4=new int[3];
473 int* _edge5=new int[3];
477 int* _edge6=new int[3];
481 int ** tmpConstituents1 = new (int*)[4];
482 tmpConstituents1[0]=_face1 ;
483 tmpConstituents1[1]=_face2 ;
484 tmpConstituents1[2]=_face3 ;
485 tmpConstituents1[3]=_face4 ;
486 int ** tmpConstituents2 = new (int*)[6];
487 tmpConstituents2[0]=_edge1 ;
488 tmpConstituents2[1]=_edge2 ;
489 tmpConstituents2[2]=_edge3 ;
490 tmpConstituents2[3]=_edge4 ;
491 tmpConstituents2[4]=_edge5 ;
492 tmpConstituents2[5]=_edge6 ;
493 _constituents = new int**[2] ;
494 _constituents[0]=tmpConstituents1 ;
495 _constituents[1]=tmpConstituents2 ;
496 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[4] ;
497 tmpConstituentsType1[0] = MED_TRIA6 ;
498 tmpConstituentsType1[1] = MED_TRIA6 ;
499 tmpConstituentsType1[2] = MED_TRIA6 ;
500 tmpConstituentsType1[3] = MED_TRIA6 ;
501 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[6] ;
502 tmpConstituentsType2[0] = MED_SEG3 ;
503 tmpConstituentsType2[1] = MED_SEG3 ;
504 tmpConstituentsType2[2] = MED_SEG3 ;
505 tmpConstituentsType2[3] = MED_SEG3 ;
506 tmpConstituentsType2[4] = MED_SEG3 ;
507 tmpConstituentsType2[5] = MED_SEG3 ;
508 _constituentsType = new medGeometryElement*[2] ;
509 _constituentsType[0]=tmpConstituentsType1 ;
510 _constituentsType[1]=tmpConstituentsType2 ;
519 _numberOfConstituentsDimension=2 ;
520 _numberOfConstituents=new int[2] ;
521 _numberOfConstituents[0]=6 ;
522 _numberOfConstituents[1]=12 ;
523 _numberOfNodeOfEachConstituent=new (int*)[2] ;
524 _numberOfNodeOfEachConstituent[0]=new (int)[6] ;
525 _numberOfNodeOfEachConstituent[0][0]=4 ;
526 _numberOfNodeOfEachConstituent[0][1]=4 ;
527 _numberOfNodeOfEachConstituent[0][2]=4 ;
528 _numberOfNodeOfEachConstituent[0][3]=4 ;
529 _numberOfNodeOfEachConstituent[0][4]=4 ;
530 _numberOfNodeOfEachConstituent[0][5]=4 ;
531 _numberOfNodeOfEachConstituent[1]=new (int)[12] ;
532 _numberOfNodeOfEachConstituent[1][0]=2 ;
533 _numberOfNodeOfEachConstituent[1][1]=2 ;
534 _numberOfNodeOfEachConstituent[1][2]=2 ;
535 _numberOfNodeOfEachConstituent[1][3]=2 ;
536 _numberOfNodeOfEachConstituent[1][4]=2 ;
537 _numberOfNodeOfEachConstituent[1][5]=2 ;
538 _numberOfNodeOfEachConstituent[1][6]=2 ;
539 _numberOfNodeOfEachConstituent[1][7]=2 ;
540 _numberOfNodeOfEachConstituent[1][8]=2 ;
541 _numberOfNodeOfEachConstituent[1][9]=2 ;
542 _numberOfNodeOfEachConstituent[1][10]=2 ;
543 _numberOfNodeOfEachConstituent[1][11]=2 ;
545 int* _edge1=new int[2];
548 int* _edge2=new int[2];
551 int* _edge3=new int[2];
554 int* _edge4=new int[2];
557 int* _edge5=new int[2];
560 int* _edge6=new int[2];
563 int* _edge7=new int[2];
566 int* _edge8=new int[2];
569 int* _edge9=new int[2];
572 int* _edge10=new int[2];
575 int* _edge11=new int[2];
578 int* _edge12=new int[2];
581 int* _face1=new int[4];
586 int* _face2=new int[4];
591 int* _face3=new int[4];
596 int* _face4=new int[4];
601 int* _face5=new int[4];
606 int* _face6=new int[4];
611 int ** tmpConstituents1 = new (int*)[6];
612 tmpConstituents1[0]=_face1 ;
613 tmpConstituents1[1]=_face2 ;
614 tmpConstituents1[2]=_face3 ;
615 tmpConstituents1[3]=_face4 ;
616 tmpConstituents1[4]=_face5 ;
617 tmpConstituents1[5]=_face6 ;
618 int ** tmpConstituents2 = new (int*)[12];
619 tmpConstituents2[0]=_edge1 ;
620 tmpConstituents2[1]=_edge2 ;
621 tmpConstituents2[2]=_edge3 ;
622 tmpConstituents2[3]=_edge4 ;
623 tmpConstituents2[4]=_edge5 ;
624 tmpConstituents2[5]=_edge6 ;
625 tmpConstituents2[6]=_edge7 ;
626 tmpConstituents2[7]=_edge8 ;
627 tmpConstituents2[8]=_edge9 ;
628 tmpConstituents2[9]=_edge10;
629 tmpConstituents2[10]=_edge11;
630 tmpConstituents2[11]=_edge12;
631 _constituents = new int**[2] ;
632 _constituents[0]=tmpConstituents1 ;
633 _constituents[1]=tmpConstituents2 ;
634 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[6] ;
635 tmpConstituentsType1[0] = MED_QUAD4 ;
636 tmpConstituentsType1[1] = MED_QUAD4 ;
637 tmpConstituentsType1[2] = MED_QUAD4 ;
638 tmpConstituentsType1[3] = MED_QUAD4 ;
639 tmpConstituentsType1[4] = MED_QUAD4 ;
640 tmpConstituentsType1[5] = MED_QUAD4 ;
641 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[12] ;
642 tmpConstituentsType2[0] = MED_SEG2 ;
643 tmpConstituentsType2[1] = MED_SEG2 ;
644 tmpConstituentsType2[2] = MED_SEG2 ;
645 tmpConstituentsType2[3] = MED_SEG2 ;
646 tmpConstituentsType2[4] = MED_SEG2 ;
647 tmpConstituentsType2[5] = MED_SEG2 ;
648 tmpConstituentsType2[6] = MED_SEG2 ;
649 tmpConstituentsType2[7] = MED_SEG2 ;
650 tmpConstituentsType2[8] = MED_SEG2 ;
651 tmpConstituentsType2[9] = MED_SEG2 ;
652 tmpConstituentsType2[10] = MED_SEG2 ;
653 tmpConstituentsType2[11] = MED_SEG2 ;
654 _constituentsType = new medGeometryElement*[2] ;
655 _constituentsType[0]=tmpConstituentsType1 ;
656 _constituentsType[1]=tmpConstituentsType2 ;
665 _numberOfConstituentsDimension=2 ;
666 _numberOfConstituents=new int[2] ;
667 _numberOfConstituents[0]=6 ;
668 _numberOfConstituents[1]=12 ;
669 _numberOfNodeOfEachConstituent=new (int*)[2] ;
670 _numberOfNodeOfEachConstituent[0]=new (int)[6] ;
671 _numberOfNodeOfEachConstituent[0][0]=8 ;
672 _numberOfNodeOfEachConstituent[0][1]=8 ;
673 _numberOfNodeOfEachConstituent[0][2]=8 ;
674 _numberOfNodeOfEachConstituent[0][3]=8 ;
675 _numberOfNodeOfEachConstituent[0][4]=8 ;
676 _numberOfNodeOfEachConstituent[0][5]=8 ;
677 _numberOfNodeOfEachConstituent[1]=new (int)[12] ;
678 _numberOfNodeOfEachConstituent[1][0]=3 ;
679 _numberOfNodeOfEachConstituent[1][1]=3 ;
680 _numberOfNodeOfEachConstituent[1][2]=3 ;
681 _numberOfNodeOfEachConstituent[1][3]=3 ;
682 _numberOfNodeOfEachConstituent[1][4]=3 ;
683 _numberOfNodeOfEachConstituent[1][5]=3 ;
684 _numberOfNodeOfEachConstituent[1][6]=3 ;
685 _numberOfNodeOfEachConstituent[1][7]=3 ;
686 _numberOfNodeOfEachConstituent[1][8]=3 ;
687 _numberOfNodeOfEachConstituent[1][9]=3 ;
688 _numberOfNodeOfEachConstituent[1][10]=3 ;
689 _numberOfNodeOfEachConstituent[1][11]=3 ;
691 int* _edge1=new int[3];
695 int* _edge2=new int[3];
699 int* _edge3=new int[3];
703 int* _edge4=new int[3];
707 int* _edge5=new int[3];
711 int* _edge6=new int[3];
715 int* _edge7=new int[3];
719 int* _edge8=new int[3];
723 int* _edge9=new int[3];
727 int* _edge10=new int[3];
731 int* _edge11=new int[3];
735 int* _edge12=new int[3];
739 int* _face1=new int[8];
748 int* _face2=new int[8];
757 int* _face3=new int[8];
766 int* _face4=new int[8];
775 int* _face5=new int[8];
784 int* _face6=new int[8];
793 int ** tmpConstituents1 = new (int*)[6];
794 tmpConstituents1[0]=_face1 ;
795 tmpConstituents1[1]=_face2 ;
796 tmpConstituents1[2]=_face3 ;
797 tmpConstituents1[3]=_face4 ;
798 tmpConstituents1[4]=_face5 ;
799 tmpConstituents1[5]=_face6 ;
800 int ** tmpConstituents2 = new (int*)[12];
801 tmpConstituents2[0]=_edge1 ;
802 tmpConstituents2[1]=_edge2 ;
803 tmpConstituents2[2]=_edge3 ;
804 tmpConstituents2[3]=_edge4 ;
805 tmpConstituents2[4]=_edge5 ;
806 tmpConstituents2[5]=_edge6 ;
807 tmpConstituents2[6]=_edge7 ;
808 tmpConstituents2[7]=_edge8 ;
809 tmpConstituents2[8]=_edge9 ;
810 tmpConstituents2[9]=_edge10;
811 tmpConstituents2[10]=_edge11;
812 tmpConstituents2[11]=_edge12;
813 _constituents = new int**[2] ;
814 _constituents[0]=tmpConstituents1 ;
815 _constituents[1]=tmpConstituents2 ;
816 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[6] ;
817 tmpConstituentsType1[0] = MED_QUAD8 ;
818 tmpConstituentsType1[1] = MED_QUAD8 ;
819 tmpConstituentsType1[2] = MED_QUAD8 ;
820 tmpConstituentsType1[3] = MED_QUAD8 ;
821 tmpConstituentsType1[4] = MED_QUAD8 ;
822 tmpConstituentsType1[5] = MED_QUAD8 ;
823 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[12] ;
824 tmpConstituentsType2[0] = MED_SEG3 ;
825 tmpConstituentsType2[1] = MED_SEG3 ;
826 tmpConstituentsType2[2] = MED_SEG3 ;
827 tmpConstituentsType2[3] = MED_SEG3 ;
828 tmpConstituentsType2[4] = MED_SEG3 ;
829 tmpConstituentsType2[5] = MED_SEG3 ;
830 tmpConstituentsType2[6] = MED_SEG3 ;
831 tmpConstituentsType2[7] = MED_SEG3 ;
832 tmpConstituentsType2[8] = MED_SEG3 ;
833 tmpConstituentsType2[9] = MED_SEG3 ;
834 tmpConstituentsType2[10] = MED_SEG3 ;
835 tmpConstituentsType2[11] = MED_SEG3 ;
836 _constituentsType = new medGeometryElement*[2] ;
837 _constituentsType[0]=tmpConstituentsType1 ;
838 _constituentsType[1]=tmpConstituentsType2 ;
848 _numberOfConstituentsDimension=2 ;
849 _numberOfConstituents=new int[2] ;
850 _numberOfConstituents[0]=5 ;
851 _numberOfConstituents[1]=9 ;
852 _numberOfNodeOfEachConstituent=new (int*)[2] ;
853 _numberOfNodeOfEachConstituent[0]=new (int)[5] ;
854 _numberOfNodeOfEachConstituent[0][0]=3 ;
855 _numberOfNodeOfEachConstituent[0][1]=3 ;
856 _numberOfNodeOfEachConstituent[0][2]=4 ;
857 _numberOfNodeOfEachConstituent[0][3]=4 ;
858 _numberOfNodeOfEachConstituent[0][4]=4 ;
859 _numberOfNodeOfEachConstituent[1]=new (int)[9] ;
860 _numberOfNodeOfEachConstituent[1][0]=2 ;
861 _numberOfNodeOfEachConstituent[1][1]=2 ;
862 _numberOfNodeOfEachConstituent[1][2]=2 ;
863 _numberOfNodeOfEachConstituent[1][3]=2 ;
864 _numberOfNodeOfEachConstituent[1][4]=2 ;
865 _numberOfNodeOfEachConstituent[1][5]=2 ;
866 _numberOfNodeOfEachConstituent[1][6]=2 ;
867 _numberOfNodeOfEachConstituent[1][7]=2 ;
868 _numberOfNodeOfEachConstituent[1][8]=2 ;
870 int* _edge1=new int[2];
873 int* _edge2=new int[2];
876 int* _edge3=new int[2];
879 int* _edge4=new int[2];
882 int* _edge5=new int[2];
885 int* _edge6=new int[2];
888 int* _edge7=new int[2];
891 int* _edge8=new int[2];
894 int* _edge9=new int[2];
897 int* _face1=new int[3];
901 int* _face2=new int[3];
905 int* _face3=new int[4];
910 int* _face4=new int[4];
915 int* _face5=new int[4];
920 int ** tmpConstituents1 = new (int*)[5];
921 tmpConstituents1[0]=_face1 ;
922 tmpConstituents1[1]=_face2 ;
923 tmpConstituents1[2]=_face3 ;
924 tmpConstituents1[3]=_face4 ;
925 tmpConstituents1[4]=_face5 ;
926 int ** tmpConstituents2 = new (int*)[9];
927 tmpConstituents2[0]=_edge1 ;
928 tmpConstituents2[1]=_edge2 ;
929 tmpConstituents2[2]=_edge3 ;
930 tmpConstituents2[3]=_edge4 ;
931 tmpConstituents2[4]=_edge5 ;
932 tmpConstituents2[5]=_edge6 ;
933 tmpConstituents2[6]=_edge7 ;
934 tmpConstituents2[7]=_edge8 ;
935 tmpConstituents2[8]=_edge9 ;
936 _constituents = new int**[2] ;
937 _constituents[0]=tmpConstituents1 ;
938 _constituents[1]=tmpConstituents2 ;
939 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[5] ;
940 tmpConstituentsType1[0] = MED_TRIA3 ;
941 tmpConstituentsType1[1] = MED_TRIA3 ;
942 tmpConstituentsType1[2] = MED_QUAD4 ;
943 tmpConstituentsType1[3] = MED_QUAD4 ;
944 tmpConstituentsType1[4] = MED_QUAD4 ;
945 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[9] ;
946 tmpConstituentsType2[0] = MED_SEG2 ;
947 tmpConstituentsType2[1] = MED_SEG2 ;
948 tmpConstituentsType2[2] = MED_SEG2 ;
949 tmpConstituentsType2[3] = MED_SEG2 ;
950 tmpConstituentsType2[4] = MED_SEG2 ;
951 tmpConstituentsType2[5] = MED_SEG2 ;
952 tmpConstituentsType2[6] = MED_SEG2 ;
953 tmpConstituentsType2[7] = MED_SEG2 ;
954 tmpConstituentsType2[8] = MED_SEG2 ;
955 _constituentsType = new medGeometryElement*[2] ;
956 _constituentsType[0]=tmpConstituentsType1 ;
957 _constituentsType[1]=tmpConstituentsType2 ;
961 _name="MED_PENTA15" ;
966 _numberOfConstituentsDimension=2 ;
967 _numberOfConstituents=new int[2] ;
968 _numberOfConstituents[0]=5 ;
969 _numberOfConstituents[1]=9 ;
970 _numberOfNodeOfEachConstituent=new (int*)[2] ;
971 _numberOfNodeOfEachConstituent[0]=new (int)[5] ;
972 _numberOfNodeOfEachConstituent[0][0]=6 ;
973 _numberOfNodeOfEachConstituent[0][1]=6 ;
974 _numberOfNodeOfEachConstituent[0][2]=8 ;
975 _numberOfNodeOfEachConstituent[0][3]=8 ;
976 _numberOfNodeOfEachConstituent[0][4]=8 ;
977 _numberOfNodeOfEachConstituent[1]=new (int)[9] ;
978 _numberOfNodeOfEachConstituent[1][0]=3 ;
979 _numberOfNodeOfEachConstituent[1][1]=3 ;
980 _numberOfNodeOfEachConstituent[1][2]=3 ;
981 _numberOfNodeOfEachConstituent[1][3]=3 ;
982 _numberOfNodeOfEachConstituent[1][4]=3 ;
983 _numberOfNodeOfEachConstituent[1][5]=3 ;
984 _numberOfNodeOfEachConstituent[1][6]=3 ;
985 _numberOfNodeOfEachConstituent[1][7]=3 ;
986 _numberOfNodeOfEachConstituent[1][8]=3 ;
988 int* _edge1=new int[3];
992 int* _edge2=new int[3];
996 int* _edge3=new int[3];
1000 int* _edge4=new int[3];
1004 int* _edge5=new int[3];
1008 int* _edge6=new int[3];
1012 int* _edge7=new int[3];
1016 int* _edge8=new int[3];
1020 int* _edge9=new int[3];
1024 int* _face1=new int[6];
1031 int* _face2=new int[6];
1038 int* _face3=new int[8];
1047 int* _face4=new int[8];
1056 int* _face5=new int[8];
1065 int ** tmpConstituents1 = new (int*)[5];
1066 tmpConstituents1[0]=_face1 ;
1067 tmpConstituents1[1]=_face2 ;
1068 tmpConstituents1[2]=_face3 ;
1069 tmpConstituents1[3]=_face4 ;
1070 tmpConstituents1[4]=_face5 ;
1071 int ** tmpConstituents2 = new (int*)[9];
1072 tmpConstituents2[0]=_edge1 ;
1073 tmpConstituents2[1]=_edge2 ;
1074 tmpConstituents2[2]=_edge3 ;
1075 tmpConstituents2[3]=_edge4 ;
1076 tmpConstituents2[4]=_edge5 ;
1077 tmpConstituents2[5]=_edge6 ;
1078 tmpConstituents2[6]=_edge7 ;
1079 tmpConstituents2[7]=_edge8 ;
1080 tmpConstituents2[8]=_edge9 ;
1081 _constituents = new (int**)[2] ;
1082 _constituents[0]=tmpConstituents1 ;
1083 _constituents[1]=tmpConstituents2 ;
1084 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[5] ;
1085 tmpConstituentsType1[0] = MED_TRIA6 ;
1086 tmpConstituentsType1[1] = MED_TRIA6 ;
1087 tmpConstituentsType1[2] = MED_QUAD8 ;
1088 tmpConstituentsType1[3] = MED_QUAD8 ;
1089 tmpConstituentsType1[4] = MED_QUAD8 ;
1090 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[9] ;
1091 tmpConstituentsType2[0] = MED_SEG3 ;
1092 tmpConstituentsType2[1] = MED_SEG3 ;
1093 tmpConstituentsType2[2] = MED_SEG3 ;
1094 tmpConstituentsType2[3] = MED_SEG3 ;
1095 tmpConstituentsType2[4] = MED_SEG3 ;
1096 tmpConstituentsType2[5] = MED_SEG3 ;
1097 tmpConstituentsType2[6] = MED_SEG3 ;
1098 tmpConstituentsType2[7] = MED_SEG3 ;
1099 tmpConstituentsType2[8] = MED_SEG3 ;
1100 _constituentsType = new (medGeometryElement*)[2] ;
1101 _constituentsType[0]=tmpConstituentsType1 ;
1102 _constituentsType[1]=tmpConstituentsType2 ;
1109 _numberOfVertexes=5;
1111 _numberOfConstituentsDimension=2 ;
1112 _numberOfConstituents=new int[2] ;
1113 _numberOfConstituents[0]=5 ;
1114 _numberOfConstituents[1]=8 ;
1115 _numberOfNodeOfEachConstituent=new (int*)[2] ;
1116 _numberOfNodeOfEachConstituent[0]=new (int)[5] ;
1117 _numberOfNodeOfEachConstituent[0][0]=4 ;
1118 _numberOfNodeOfEachConstituent[0][1]=3 ;
1119 _numberOfNodeOfEachConstituent[0][2]=3 ;
1120 _numberOfNodeOfEachConstituent[0][3]=3 ;
1121 _numberOfNodeOfEachConstituent[0][4]=3 ;
1122 _numberOfNodeOfEachConstituent[1]=new (int)[8] ;
1123 _numberOfNodeOfEachConstituent[1][0]=2 ;
1124 _numberOfNodeOfEachConstituent[1][1]=2 ;
1125 _numberOfNodeOfEachConstituent[1][2]=2 ;
1126 _numberOfNodeOfEachConstituent[1][3]=2 ;
1127 _numberOfNodeOfEachConstituent[1][4]=2 ;
1128 _numberOfNodeOfEachConstituent[1][5]=2 ;
1129 _numberOfNodeOfEachConstituent[1][6]=2 ;
1130 _numberOfNodeOfEachConstituent[1][7]=2 ;
1132 int* _edge1=new int[2];
1135 int* _edge2=new int[2];
1138 int* _edge3=new int[2];
1141 int* _edge4=new int[2];
1144 int* _edge5=new int[2];
1147 int* _edge6=new int[2];
1150 int* _edge7=new int[2];
1153 int* _edge8=new int[2];
1156 int* _face1=new int[4];
1161 int* _face2=new int[3];
1165 int* _face3=new int[3];
1169 int* _face4=new int[3];
1173 int* _face5=new int[3];
1177 int ** tmpConstituents1 = new (int*)[5];
1178 tmpConstituents1[0]=_face1 ;
1179 tmpConstituents1[1]=_face2 ;
1180 tmpConstituents1[2]=_face3 ;
1181 tmpConstituents1[3]=_face4 ;
1182 tmpConstituents1[4]=_face5 ;
1183 int ** tmpConstituents2 = new (int*)[8];
1184 tmpConstituents2[0]=_edge1 ;
1185 tmpConstituents2[1]=_edge2 ;
1186 tmpConstituents2[2]=_edge3 ;
1187 tmpConstituents2[3]=_edge4 ;
1188 tmpConstituents2[4]=_edge5 ;
1189 tmpConstituents2[5]=_edge6 ;
1190 tmpConstituents2[6]=_edge7 ;
1191 tmpConstituents2[7]=_edge8 ;
1192 _constituents = new int**[2] ;
1193 _constituents[0]=tmpConstituents1 ;
1194 _constituents[1]=tmpConstituents2 ;
1195 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[5] ;
1196 tmpConstituentsType1[0] = MED_QUAD4 ;
1197 tmpConstituentsType1[1] = MED_TRIA3 ;
1198 tmpConstituentsType1[2] = MED_TRIA3 ;
1199 tmpConstituentsType1[3] = MED_TRIA3 ;
1200 tmpConstituentsType1[4] = MED_TRIA3 ;
1201 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[8] ;
1202 tmpConstituentsType2[0] = MED_SEG2 ;
1203 tmpConstituentsType2[1] = MED_SEG2 ;
1204 tmpConstituentsType2[2] = MED_SEG2 ;
1205 tmpConstituentsType2[3] = MED_SEG2 ;
1206 tmpConstituentsType2[4] = MED_SEG2 ;
1207 tmpConstituentsType2[5] = MED_SEG2 ;
1208 tmpConstituentsType2[6] = MED_SEG2 ;
1209 tmpConstituentsType2[7] = MED_SEG2 ;
1210 _constituentsType = new medGeometryElement*[2] ;
1211 _constituentsType[0]=tmpConstituentsType1 ;
1212 _constituentsType[1]=tmpConstituentsType2 ;
1216 _name="MED_PYRA13" ;
1219 _numberOfVertexes=5;
1221 _numberOfConstituentsDimension=2 ;
1222 _numberOfConstituents=new int[2] ;
1223 _numberOfConstituents[0]=5 ;
1224 _numberOfConstituents[1]=8 ;
1225 _numberOfNodeOfEachConstituent=new (int*)[2] ;
1226 _numberOfNodeOfEachConstituent[0]=new (int)[5] ;
1227 _numberOfNodeOfEachConstituent[0][0]=8 ;
1228 _numberOfNodeOfEachConstituent[0][1]=6 ;
1229 _numberOfNodeOfEachConstituent[0][2]=6 ;
1230 _numberOfNodeOfEachConstituent[0][3]=6 ;
1231 _numberOfNodeOfEachConstituent[0][4]=6 ;
1232 _numberOfNodeOfEachConstituent[1]=new (int)[8] ;
1233 _numberOfNodeOfEachConstituent[1][0]=3 ;
1234 _numberOfNodeOfEachConstituent[1][1]=3 ;
1235 _numberOfNodeOfEachConstituent[1][2]=3 ;
1236 _numberOfNodeOfEachConstituent[1][3]=3 ;
1237 _numberOfNodeOfEachConstituent[1][4]=3 ;
1238 _numberOfNodeOfEachConstituent[1][5]=3 ;
1239 _numberOfNodeOfEachConstituent[1][6]=3 ;
1240 _numberOfNodeOfEachConstituent[1][7]=3 ;
1242 int* _edge1=new int[3];
1246 int* _edge2=new int[3];
1250 int* _edge3=new int[3];
1254 int* _edge4=new int[3];
1258 int* _edge5=new int[3];
1262 int* _edge6=new int[3];
1266 int* _edge7=new int[3];
1270 int* _edge8=new int[3];
1274 int* _face1=new int[8];
1283 int* _face2=new int[6];
1290 int* _face3=new int[6];
1297 int* _face4=new int[6];
1304 int* _face5=new int[6];
1311 int ** tmpConstituents1 = new (int*)[5];
1312 tmpConstituents1[0]=_face1 ;
1313 tmpConstituents1[1]=_face2 ;
1314 tmpConstituents1[2]=_face3 ;
1315 tmpConstituents1[3]=_face4 ;
1316 tmpConstituents1[4]=_face5 ;
1317 int ** tmpConstituents2 = new (int*)[8];
1318 tmpConstituents2[0]=_edge1 ;
1319 tmpConstituents2[1]=_edge2 ;
1320 tmpConstituents2[2]=_edge3 ;
1321 tmpConstituents2[3]=_edge4 ;
1322 tmpConstituents2[4]=_edge5 ;
1323 tmpConstituents2[5]=_edge6 ;
1324 tmpConstituents2[6]=_edge7 ;
1325 tmpConstituents2[7]=_edge8 ;
1326 _constituents = new int**[2] ;
1327 _constituents[0]=tmpConstituents1 ;
1328 _constituents[1]=tmpConstituents2 ;
1329 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[5] ;
1330 tmpConstituentsType1[0] = MED_QUAD8 ;
1331 tmpConstituentsType1[1] = MED_TRIA6 ;
1332 tmpConstituentsType1[2] = MED_TRIA6 ;
1333 tmpConstituentsType1[3] = MED_TRIA6 ;
1334 tmpConstituentsType1[4] = MED_TRIA6 ;
1335 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[8] ;
1336 tmpConstituentsType2[0] = MED_SEG3 ;
1337 tmpConstituentsType2[1] = MED_SEG3 ;
1338 tmpConstituentsType2[2] = MED_SEG3 ;
1339 tmpConstituentsType2[3] = MED_SEG3 ;
1340 tmpConstituentsType2[4] = MED_SEG3 ;
1341 tmpConstituentsType2[5] = MED_SEG3 ;
1342 tmpConstituentsType2[6] = MED_SEG3 ;
1343 tmpConstituentsType2[7] = MED_SEG3 ;
1344 _constituentsType = new medGeometryElement*[2] ;
1345 _constituentsType[0]=tmpConstituentsType1 ;
1346 _constituentsType[1]=tmpConstituentsType2 ;
1355 ostream & operator<<(ostream &os,const CELLMODEL &my)
1357 os << "Cell Model :" << endl ;
1358 os << " - name : " << my._name << endl;
1359 os << " - type : " << (int)my._type << endl;
1360 os << " - dimension : " << my._dimension << endl;
1361 os << " - number of nodes : " << my._numberOfNodes << endl ;
1362 os << " - number of vertexes : " << my._numberOfVertexes << endl ;
1364 os << " - number of Constituents Dimension : " << my._numberOfConstituentsDimension << endl ;
1366 for(int i=0;i<my._numberOfConstituentsDimension;i++)
1369 os << " - for dimension (-" << i+1 << ") : " << endl ;
1370 os << " - number of Constituents for this Dimension : " << my._numberOfConstituents[i] << endl ;
1372 for(int j=0;j<my._numberOfConstituents[i];j++)
1374 os << " - number of node for this constituent : " << my._numberOfNodeOfEachConstituent[i][j] << endl ;
1375 os << " - constituents " << j+1 << " of type "<< my._constituentsType[i][j] <<" : " ;
1376 for(int k=0;k<my._numberOfNodeOfEachConstituent[i][j];k++)
1377 os << my._constituents[i][j][k] << " " ;
1384 // Return number of constituents type (which dimension is _dimension-1).
1385 int CELLMODEL::getNumberOfConstituentsType() const
1387 set<medGeometryElement> constituentsTypes ;
1388 // if (_constituentsType.size() > 0 ) {
1389 // vector<medGeometryElement> constituentsType = _constituentsType[0] ;
1390 // vector<medGeometryElement>::iterator itvec ;
1391 // for(itvec=constituentsType.begin();itvec!=constituentsType.end();itvec++)
1392 // constituentsTypes.insert(*itvec);
1394 return constituentsTypes.size() ;
1397 // Return all types of constituents which dimension is (_dimension-1).
1398 set<medGeometryElement> CELLMODEL::getAllConstituentsType() const
1400 set<medGeometryElement> constituentsTypes ;
1401 // if (_constituentsType.size() > 0 ) {
1402 // vector<medGeometryElement> constituentsType = _constituentsType[0] ;
1403 // vector<medGeometryElement>::iterator itvec ;
1404 // for(itvec=constituentsType.begin();itvec!=constituentsType.end();itvec++)
1405 // constituentsTypes.insert(*itvec);
1407 return constituentsTypes ;
1410 // Return number of constituents foreach type (which dimension is _dimension-1).
1411 map<medGeometryElement,int> CELLMODEL::getNumberOfConstituentsForeachType() const
1413 map<medGeometryElement,int> numberOfConstituentsForeachType ;
1414 // map<medGeometryElement,int>::iterator itmap ;
1415 // if (_constituentsType.size() > 0 ) {
1416 // vector<medGeometryElement> constituentsType = _constituentsType[0] ;
1417 // vector<medGeometryElement>::iterator itvec ;
1418 // for(itvec=constituentsType.begin();itvec!=constituentsType.end();itvec++) {
1419 // itmap = numberOfConstituentsForeachType.find(*itvec);
1420 // if (itmap==numberOfConstituentsForeachType.end()) // new element
1421 // numberOfConstituentsForeachType[*itvec]=1 ;
1423 // numberOfConstituentsForeachType[*itvec]++ ;
1426 return numberOfConstituentsForeachType ;
1429 void CELLMODEL::init(const CELLMODEL &m)
1433 _dimension = m._dimension ;
1434 _numberOfNodes = m._numberOfNodes ;
1435 _numberOfVertexes = m._numberOfVertexes ;
1437 _numberOfConstituentsDimension = m._numberOfConstituentsDimension ;
1439 _numberOfConstituents = new int[_numberOfConstituentsDimension] ;
1440 for(int i=0; i<_numberOfConstituentsDimension; i++)
1441 _numberOfConstituents[i]=m._numberOfConstituents[i] ;
1443 _numberOfNodeOfEachConstituent = new (int*)[_numberOfConstituentsDimension] ;
1444 for(int i=0; i<_numberOfConstituentsDimension; i++) {
1445 int numberOf = _numberOfConstituents[i] ;
1446 int * newArray = new int[numberOf] ;
1447 int * oldArray = m._numberOfNodeOfEachConstituent[i] ;
1448 for(int j=0; j<numberOf; j++)
1449 newArray[j] = oldArray[j] ;
1450 _numberOfNodeOfEachConstituent[i] = newArray ;
1452 _constituents = new (int**)[_numberOfConstituentsDimension] ;
1453 _constituentsType = new (medGeometryElement*)[_numberOfConstituentsDimension] ;
1454 for(int i=0; i<_numberOfConstituentsDimension; i++) {
1455 int numberOf = _numberOfConstituents[i] ;
1456 int ** tmpArray = new (int*)[numberOf] ;
1457 medGeometryElement * newArrayType = new medGeometryElement[numberOf] ;
1458 medGeometryElement * oldArrayType = m._constituentsType[i] ;
1460 for(int j=0; j<numberOf; j++) {
1461 int numberOf2 = _numberOfNodeOfEachConstituent[i][j] ;
1462 int * newArray = new int[numberOf2] ;
1463 int * oldArray = m._constituents[i][j] ;
1464 for(int k=0; k<numberOf2; k++)
1465 newArray[k] = oldArray[k] ;
1466 tmpArray[j] = newArray ;
1467 newArrayType[j] = oldArrayType[j] ;
1469 _constituents[i] = tmpArray ;
1470 _constituentsType[i] = newArrayType ;
1474 void CELLMODEL::clean()
1476 for(int i=0; i<_numberOfConstituentsDimension; i++) {
1477 int numberOf = _numberOfConstituents[i] ;
1478 for(int j=0; j<numberOf; j++) {
1479 if (NULL!=_constituents[i][j])
1480 delete[] _constituents[i][j] ;
1482 if (NULL!=_constituentsType[i])
1483 delete[] _constituentsType[i] ;
1484 if (NULL!=_constituents[i])
1485 delete[] _constituents[i] ;
1486 if (NULL!=_numberOfNodeOfEachConstituent[i])
1487 delete[] _numberOfNodeOfEachConstituent[i] ;
1489 if (NULL!=_numberOfConstituents)
1490 delete[]_numberOfConstituents ;
1491 if (NULL!=_constituentsType)
1492 delete[] _constituentsType ;
1493 if (NULL!=_constituents)
1494 delete[] _constituents ;
1495 if (NULL!=_numberOfNodeOfEachConstituent)
1496 delete[] _numberOfNodeOfEachConstituent ;