3 File MEDMEM_CellModel.cxx
8 #include "MEDMEM_CellModel.hxx"
9 using namespace MEDMEM;
11 CELLMODEL::CELLMODEL(medGeometryElement t)
13 // init first all to nothing
17 _numberOfConstituentsDimension=0 ;
18 _numberOfConstituents=(int*)NULL ;
19 _numberOfNodeOfEachConstituent=(int**)NULL ;
20 _constituents=(int***)NULL ;
21 //_numberOfonstituentsType=(int*)NULL ;
22 _constituentsType=(medGeometryElement**)NULL ;
24 MESSAGE("CELLMODEL : constructeur pour le type " << t);
33 // nothing else : POINT are none constituent
42 // constituent are POINT1 and we have no need to define _constituents vector
43 _numberOfConstituentsDimension=1 ;
44 _numberOfConstituents=new int[1] ;
45 _numberOfConstituents[0]=2 ;
46 _numberOfNodeOfEachConstituent=new (int*)[1] ;
47 _numberOfNodeOfEachConstituent[0]=new (int)[2] ;
48 _numberOfNodeOfEachConstituent[0][0]=1 ;
49 _numberOfNodeOfEachConstituent[0][1]=1 ;
51 _constituents = new (int**)[1] ;
52 _constituents[0] = new (int*)[2] ;
53 _constituents[0][0] = new int[1] ;
54 _constituents[0][0][0] = 1 ;
55 _constituents[0][1] = new int[1] ;
56 _constituents[0][1][0] = 2 ;
58 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[2] ;
59 tmpConstituentsType1[0] = MED_POINT1 ;
60 tmpConstituentsType1[1] = MED_POINT1 ;
61 _constituentsType = new medGeometryElement*[1] ;
62 _constituentsType[0]=tmpConstituentsType1 ;
71 // constituent are POINT1 and we have no need to define _constituents vector
72 _numberOfConstituentsDimension=1 ;
73 _numberOfConstituents=new int[1] ;
74 _numberOfConstituents[0]=3 ;
75 _numberOfNodeOfEachConstituent=new (int*)[1] ;
76 _numberOfNodeOfEachConstituent[0]=new (int)[3] ;
77 _numberOfNodeOfEachConstituent[0][0]=1 ;
78 _numberOfNodeOfEachConstituent[0][1]=1 ;
79 _numberOfNodeOfEachConstituent[0][2]=1 ;
81 _constituents = new (int**)[1] ;
82 _constituents[0] = new (int*)[3] ;
83 _constituents[0][0] = new int[1] ;
84 _constituents[0][0][0] = 1 ;
85 _constituents[0][1] = new int[1] ;
86 _constituents[0][1][0] = 2 ;
87 _constituents[0][2] = new int[1] ;
88 _constituents[0][2][0] = 3 ;
90 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[3] ;
91 tmpConstituentsType1[0] = MED_POINT1 ;
92 tmpConstituentsType1[1] = MED_POINT1 ;
93 tmpConstituentsType1[2] = MED_POINT1 ;
94 _constituentsType = new medGeometryElement*[1] ;
95 _constituentsType[0]=tmpConstituentsType1 ;
105 _numberOfConstituentsDimension=1 ;
106 _numberOfConstituents=new int[1] ;
107 _numberOfConstituents[0]=3 ;
108 _numberOfNodeOfEachConstituent=new (int*)[1] ;
109 _numberOfNodeOfEachConstituent[0]=new (int)[3] ;
110 _numberOfNodeOfEachConstituent[0][0]=2 ;
111 _numberOfNodeOfEachConstituent[0][1]=2 ;
112 _numberOfNodeOfEachConstituent[0][2]=2 ;
114 int* _edge1=new int[2];
117 int* _edge2=new int[2];
120 int* _edge3=new int[2];
123 int ** tmpConstituents1 = new (int*)[3];
124 tmpConstituents1[0]=_edge1 ;
125 tmpConstituents1[1]=_edge2 ;
126 tmpConstituents1[2]=_edge3 ;
127 _constituents = new int**[1] ;
128 _constituents[0]=tmpConstituents1 ;
130 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[3] ;
131 tmpConstituentsType1[0] = MED_SEG2 ;
132 tmpConstituentsType1[1] = MED_SEG2 ;
133 tmpConstituentsType1[2] = MED_SEG2 ;
134 // medGeometryElement * tmpConstituentsType2 = new medGeometryElement[3] ;
135 // tmpConstituentsType2[0] = MED_POINT1 ;
136 // tmpConstituentsType2[1] = MED_POINT1 ;
137 // tmpConstituentsType2[2] = MED_POINT1 ;
138 // _constituentsType = new medGeometryElement*[2] ;
139 _constituentsType = new medGeometryElement*[1] ;
140 _constituentsType[0]=tmpConstituentsType1 ;
141 // _constituentsType[1]=tmpConstituentsType2 ;
142 // Well, point are defined, but could not be acces because we have
143 // only 1 numberOfConstituentsDimension !
153 _numberOfConstituentsDimension=1 ;
154 _numberOfConstituents=new int[1] ;
155 _numberOfConstituents[0]=3 ;
156 _numberOfNodeOfEachConstituent=new (int*)[1] ;
157 _numberOfNodeOfEachConstituent[0]=new (int)[3] ;
158 _numberOfNodeOfEachConstituent[0][0]=3 ;
159 _numberOfNodeOfEachConstituent[0][1]=3 ;
160 _numberOfNodeOfEachConstituent[0][2]=3 ;
162 int* _edge1=new int[3];
166 int* _edge2=new int[3];
170 int* _edge3=new int[3];
174 int ** tmpConstituents1 = new (int*)[3];
175 tmpConstituents1[0]=_edge1 ;
176 tmpConstituents1[1]=_edge2 ;
177 tmpConstituents1[2]=_edge3 ;
178 _constituents = new int**[1] ;
179 _constituents[0]=tmpConstituents1 ;
180 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[3] ;
181 tmpConstituentsType1[0] = MED_SEG3 ;
182 tmpConstituentsType1[1] = MED_SEG3 ;
183 tmpConstituentsType1[2] = MED_SEG3 ;
184 // medGeometryElement * tmpConstituentsType2 = new medGeometryElement[6] ;
185 // tmpConstituentsType2[0] = MED_POINT1 ;
186 // tmpConstituentsType2[1] = MED_POINT1 ;
187 // tmpConstituentsType2[2] = MED_POINT1 ;
188 // tmpConstituentsType2[3] = MED_POINT1 ;
189 // tmpConstituentsType2[4] = MED_POINT1 ;
190 // tmpConstituentsType2[5] = MED_POINT1 ;
191 // _constituentsType = new medGeometryElement*[2] ;
192 _constituentsType = new medGeometryElement*[1] ;
193 _constituentsType[0]=tmpConstituentsType1 ;
194 // _constituentsType[1]=tmpConstituentsType2 ;
195 // Well, point are defined, but could not be acces because we have
196 // only 1 numberOfConstituentsDimension !
206 _numberOfConstituentsDimension=1 ;
207 _numberOfConstituents=new int[1] ;
208 _numberOfConstituents[0]=4 ;
209 _numberOfNodeOfEachConstituent=new (int*)[1] ;
210 _numberOfNodeOfEachConstituent[0]=new (int)[4] ;
211 _numberOfNodeOfEachConstituent[0][0]=2 ;
212 _numberOfNodeOfEachConstituent[0][1]=2 ;
213 _numberOfNodeOfEachConstituent[0][2]=2 ;
214 _numberOfNodeOfEachConstituent[0][3]=2 ;
216 int* _edge1=new int[2];
219 int* _edge2=new int[2];
222 int* _edge3=new int[2];
225 int* _edge4=new int[2];
228 int ** tmpConstituents1 = new (int*)[4];
229 tmpConstituents1[0]=_edge1 ;
230 tmpConstituents1[1]=_edge2 ;
231 tmpConstituents1[2]=_edge3 ;
232 tmpConstituents1[3]=_edge4 ;
233 _constituents = new int**[1] ;
234 _constituents[0]=tmpConstituents1 ;
235 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[4] ;
236 tmpConstituentsType1[0] = MED_SEG2 ;
237 tmpConstituentsType1[1] = MED_SEG2 ;
238 tmpConstituentsType1[2] = MED_SEG2 ;
239 tmpConstituentsType1[3] = MED_SEG2 ;
240 // medGeometryElement * tmpConstituentsType2 = new medGeometryElement[4] ;
241 // tmpConstituentsType2[0] = MED_POINT1 ;
242 // tmpConstituentsType2[1] = MED_POINT1 ;
243 // tmpConstituentsType2[2] = MED_POINT1 ;
244 // tmpConstituentsType2[3] = MED_POINT1 ;
245 // _constituentsType = new medGeometryElement*[2] ;
246 _constituentsType = new medGeometryElement*[1] ;
247 _constituentsType[0]=tmpConstituentsType1 ;
248 // _constituentsType[1]=tmpConstituentsType2 ;
249 // Well, point are defined, but could not be acces because we have
250 // only 1 numberOfConstituentsDimension !
260 _numberOfConstituentsDimension=1 ;
261 _numberOfConstituents=new int[1] ;
262 _numberOfConstituents[0]=4 ;
263 _numberOfNodeOfEachConstituent=new (int*)[1] ;
264 _numberOfNodeOfEachConstituent[0]=new (int)[4] ;
265 _numberOfNodeOfEachConstituent[0][0]=3 ;
266 _numberOfNodeOfEachConstituent[0][1]=3 ;
267 _numberOfNodeOfEachConstituent[0][2]=3 ;
268 _numberOfNodeOfEachConstituent[0][3]=3 ;
270 int* _edge1=new int[3];
274 int* _edge2=new int[3];
278 int* _edge3=new int[3];
282 int* _edge4=new int[3];
286 int ** tmpConstituents1 = new (int*)[4];
287 tmpConstituents1[0]=_edge1 ;
288 tmpConstituents1[1]=_edge2 ;
289 tmpConstituents1[2]=_edge3 ;
290 tmpConstituents1[3]=_edge4 ;
291 _constituents = new int**[1] ;
292 _constituents[0]=tmpConstituents1 ;
293 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[4] ;
294 tmpConstituentsType1[0] = MED_SEG3 ;
295 tmpConstituentsType1[1] = MED_SEG3 ;
296 tmpConstituentsType1[2] = MED_SEG3 ;
297 tmpConstituentsType1[3] = MED_SEG3 ;
298 // medGeometryElement * tmpConstituentsType2 = new medGeometryElement[8] ;
299 // tmpConstituentsType2[0] = MED_POINT1 ;
300 // tmpConstituentsType2[1] = MED_POINT1 ;
301 // tmpConstituentsType2[2] = MED_POINT1 ;
302 // tmpConstituentsType2[3] = MED_POINT1 ;
303 // tmpConstituentsType2[4] = MED_POINT1 ;
304 // tmpConstituentsType2[5] = MED_POINT1 ;
305 // tmpConstituentsType2[6] = MED_POINT1 ;
306 // tmpConstituentsType2[7] = MED_POINT1 ;
307 // _constituentsType = new medGeometryElement*[2] ;
308 _constituentsType = new medGeometryElement*[1] ;
309 _constituentsType[0]=tmpConstituentsType1 ;
310 // _constituentsType[1]=tmpConstituentsType2 ;
311 // Well, point are defined, but could not be acces because we have
312 // only 1 numberOfConstituentsDimension !
322 _numberOfConstituentsDimension=2 ;
323 _numberOfConstituents=new int[2] ;
324 _numberOfConstituents[0]=4 ;
325 _numberOfConstituents[1]=6 ;
326 _numberOfNodeOfEachConstituent=new (int*)[2] ;
327 _numberOfNodeOfEachConstituent[0]=new (int)[4] ;
328 _numberOfNodeOfEachConstituent[0][0]=3 ;
329 _numberOfNodeOfEachConstituent[0][1]=3 ;
330 _numberOfNodeOfEachConstituent[0][2]=3 ;
331 _numberOfNodeOfEachConstituent[0][3]=3 ;
332 _numberOfNodeOfEachConstituent[1]=new (int)[6] ;
333 _numberOfNodeOfEachConstituent[1][0]=2 ;
334 _numberOfNodeOfEachConstituent[1][1]=2 ;
335 _numberOfNodeOfEachConstituent[1][2]=2 ;
336 _numberOfNodeOfEachConstituent[1][3]=2 ;
337 _numberOfNodeOfEachConstituent[1][4]=2 ;
338 _numberOfNodeOfEachConstituent[1][5]=2 ;
340 int* _face1=new int[3];
344 int* _face2=new int[3];
348 int* _face3=new int[3];
352 int* _face4=new int[3];
356 int* _edge1=new int[2];
359 int* _edge2=new int[2];
362 int* _edge3=new int[2];
365 int* _edge4=new int[2];
368 int* _edge5=new int[2];
371 int* _edge6=new int[2];
374 int ** tmpConstituents1 = new (int*)[4];
375 tmpConstituents1[0]=_face1 ;
376 tmpConstituents1[1]=_face2 ;
377 tmpConstituents1[2]=_face3 ;
378 tmpConstituents1[3]=_face4 ;
379 int ** tmpConstituents2 = new (int*)[6];
380 tmpConstituents2[0]=_edge1 ;
381 tmpConstituents2[1]=_edge2 ;
382 tmpConstituents2[2]=_edge3 ;
383 tmpConstituents2[3]=_edge4 ;
384 tmpConstituents2[4]=_edge5 ;
385 tmpConstituents2[5]=_edge6 ;
386 _constituents = new int**[2] ;
387 _constituents[0]=tmpConstituents1 ;
388 _constituents[1]=tmpConstituents2 ;
389 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[4] ;
390 tmpConstituentsType1[0] = MED_TRIA3 ;
391 tmpConstituentsType1[1] = MED_TRIA3 ;
392 tmpConstituentsType1[2] = MED_TRIA3 ;
393 tmpConstituentsType1[3] = MED_TRIA3 ;
394 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[6] ;
395 tmpConstituentsType2[0] = MED_SEG2 ;
396 tmpConstituentsType2[1] = MED_SEG2 ;
397 tmpConstituentsType2[2] = MED_SEG2 ;
398 tmpConstituentsType2[3] = MED_SEG2 ;
399 tmpConstituentsType2[4] = MED_SEG2 ;
400 tmpConstituentsType2[5] = MED_SEG2 ;
401 _constituentsType = new medGeometryElement*[2] ;
402 _constituentsType[0]=tmpConstituentsType1 ;
403 _constituentsType[1]=tmpConstituentsType2 ;
407 _name="MED_TETRA10" ;
412 _numberOfConstituentsDimension=2 ;
413 _numberOfConstituents=new int[2] ;
414 _numberOfConstituents[0]=4 ;
415 _numberOfConstituents[1]=6 ;
416 _numberOfNodeOfEachConstituent=new (int*)[2] ;
417 _numberOfNodeOfEachConstituent[0]=new (int)[4] ;
418 _numberOfNodeOfEachConstituent[0][0]=6 ;
419 _numberOfNodeOfEachConstituent[0][1]=6 ;
420 _numberOfNodeOfEachConstituent[0][2]=6 ;
421 _numberOfNodeOfEachConstituent[0][3]=6 ;
422 _numberOfNodeOfEachConstituent[1]=new (int)[6] ;
423 _numberOfNodeOfEachConstituent[1][0]=3 ;
424 _numberOfNodeOfEachConstituent[1][1]=3 ;
425 _numberOfNodeOfEachConstituent[1][2]=3 ;
426 _numberOfNodeOfEachConstituent[1][3]=3 ;
427 _numberOfNodeOfEachConstituent[1][4]=3 ;
428 _numberOfNodeOfEachConstituent[1][5]=3 ;
430 int* _face1=new int[6];
437 int* _face2=new int[6];
444 int* _face3=new int[6];
451 int* _face4=new int[6];
458 int* _edge1=new int[3];
462 int* _edge2=new int[3];
466 int* _edge3=new int[3];
470 int* _edge4=new int[3];
474 int* _edge5=new int[3];
478 int* _edge6=new int[3];
482 int ** tmpConstituents1 = new (int*)[4];
483 tmpConstituents1[0]=_face1 ;
484 tmpConstituents1[1]=_face2 ;
485 tmpConstituents1[2]=_face3 ;
486 tmpConstituents1[3]=_face4 ;
487 int ** tmpConstituents2 = new (int*)[6];
488 tmpConstituents2[0]=_edge1 ;
489 tmpConstituents2[1]=_edge2 ;
490 tmpConstituents2[2]=_edge3 ;
491 tmpConstituents2[3]=_edge4 ;
492 tmpConstituents2[4]=_edge5 ;
493 tmpConstituents2[5]=_edge6 ;
494 _constituents = new int**[2] ;
495 _constituents[0]=tmpConstituents1 ;
496 _constituents[1]=tmpConstituents2 ;
497 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[4] ;
498 tmpConstituentsType1[0] = MED_TRIA6 ;
499 tmpConstituentsType1[1] = MED_TRIA6 ;
500 tmpConstituentsType1[2] = MED_TRIA6 ;
501 tmpConstituentsType1[3] = MED_TRIA6 ;
502 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[6] ;
503 tmpConstituentsType2[0] = MED_SEG3 ;
504 tmpConstituentsType2[1] = MED_SEG3 ;
505 tmpConstituentsType2[2] = MED_SEG3 ;
506 tmpConstituentsType2[3] = MED_SEG3 ;
507 tmpConstituentsType2[4] = MED_SEG3 ;
508 tmpConstituentsType2[5] = MED_SEG3 ;
509 _constituentsType = new medGeometryElement*[2] ;
510 _constituentsType[0]=tmpConstituentsType1 ;
511 _constituentsType[1]=tmpConstituentsType2 ;
520 _numberOfConstituentsDimension=2 ;
521 _numberOfConstituents=new int[2] ;
522 _numberOfConstituents[0]=6 ;
523 _numberOfConstituents[1]=12 ;
524 _numberOfNodeOfEachConstituent=new (int*)[2] ;
525 _numberOfNodeOfEachConstituent[0]=new (int)[6] ;
526 _numberOfNodeOfEachConstituent[0][0]=4 ;
527 _numberOfNodeOfEachConstituent[0][1]=4 ;
528 _numberOfNodeOfEachConstituent[0][2]=4 ;
529 _numberOfNodeOfEachConstituent[0][3]=4 ;
530 _numberOfNodeOfEachConstituent[0][4]=4 ;
531 _numberOfNodeOfEachConstituent[0][5]=4 ;
532 _numberOfNodeOfEachConstituent[1]=new (int)[12] ;
533 _numberOfNodeOfEachConstituent[1][0]=2 ;
534 _numberOfNodeOfEachConstituent[1][1]=2 ;
535 _numberOfNodeOfEachConstituent[1][2]=2 ;
536 _numberOfNodeOfEachConstituent[1][3]=2 ;
537 _numberOfNodeOfEachConstituent[1][4]=2 ;
538 _numberOfNodeOfEachConstituent[1][5]=2 ;
539 _numberOfNodeOfEachConstituent[1][6]=2 ;
540 _numberOfNodeOfEachConstituent[1][7]=2 ;
541 _numberOfNodeOfEachConstituent[1][8]=2 ;
542 _numberOfNodeOfEachConstituent[1][9]=2 ;
543 _numberOfNodeOfEachConstituent[1][10]=2 ;
544 _numberOfNodeOfEachConstituent[1][11]=2 ;
546 int* _edge1=new int[2];
549 int* _edge2=new int[2];
552 int* _edge3=new int[2];
555 int* _edge4=new int[2];
558 int* _edge5=new int[2];
561 int* _edge6=new int[2];
564 int* _edge7=new int[2];
567 int* _edge8=new int[2];
570 int* _edge9=new int[2];
573 int* _edge10=new int[2];
576 int* _edge11=new int[2];
579 int* _edge12=new int[2];
582 int* _face1=new int[4];
587 int* _face2=new int[4];
592 int* _face3=new int[4];
597 int* _face4=new int[4];
602 int* _face5=new int[4];
607 int* _face6=new int[4];
612 int ** tmpConstituents1 = new (int*)[6];
613 tmpConstituents1[0]=_face1 ;
614 tmpConstituents1[1]=_face2 ;
615 tmpConstituents1[2]=_face3 ;
616 tmpConstituents1[3]=_face4 ;
617 tmpConstituents1[4]=_face5 ;
618 tmpConstituents1[5]=_face6 ;
619 int ** tmpConstituents2 = new (int*)[12];
620 tmpConstituents2[0]=_edge1 ;
621 tmpConstituents2[1]=_edge2 ;
622 tmpConstituents2[2]=_edge3 ;
623 tmpConstituents2[3]=_edge4 ;
624 tmpConstituents2[4]=_edge5 ;
625 tmpConstituents2[5]=_edge6 ;
626 tmpConstituents2[6]=_edge7 ;
627 tmpConstituents2[7]=_edge8 ;
628 tmpConstituents2[8]=_edge9 ;
629 tmpConstituents2[9]=_edge10;
630 tmpConstituents2[10]=_edge11;
631 tmpConstituents2[11]=_edge12;
632 _constituents = new int**[2] ;
633 _constituents[0]=tmpConstituents1 ;
634 _constituents[1]=tmpConstituents2 ;
635 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[6] ;
636 tmpConstituentsType1[0] = MED_QUAD4 ;
637 tmpConstituentsType1[1] = MED_QUAD4 ;
638 tmpConstituentsType1[2] = MED_QUAD4 ;
639 tmpConstituentsType1[3] = MED_QUAD4 ;
640 tmpConstituentsType1[4] = MED_QUAD4 ;
641 tmpConstituentsType1[5] = MED_QUAD4 ;
642 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[12] ;
643 tmpConstituentsType2[0] = MED_SEG2 ;
644 tmpConstituentsType2[1] = MED_SEG2 ;
645 tmpConstituentsType2[2] = MED_SEG2 ;
646 tmpConstituentsType2[3] = MED_SEG2 ;
647 tmpConstituentsType2[4] = MED_SEG2 ;
648 tmpConstituentsType2[5] = MED_SEG2 ;
649 tmpConstituentsType2[6] = MED_SEG2 ;
650 tmpConstituentsType2[7] = MED_SEG2 ;
651 tmpConstituentsType2[8] = MED_SEG2 ;
652 tmpConstituentsType2[9] = MED_SEG2 ;
653 tmpConstituentsType2[10] = MED_SEG2 ;
654 tmpConstituentsType2[11] = MED_SEG2 ;
655 _constituentsType = new medGeometryElement*[2] ;
656 _constituentsType[0]=tmpConstituentsType1 ;
657 _constituentsType[1]=tmpConstituentsType2 ;
666 _numberOfConstituentsDimension=2 ;
667 _numberOfConstituents=new int[2] ;
668 _numberOfConstituents[0]=6 ;
669 _numberOfConstituents[1]=12 ;
670 _numberOfNodeOfEachConstituent=new (int*)[2] ;
671 _numberOfNodeOfEachConstituent[0]=new (int)[6] ;
672 _numberOfNodeOfEachConstituent[0][0]=8 ;
673 _numberOfNodeOfEachConstituent[0][1]=8 ;
674 _numberOfNodeOfEachConstituent[0][2]=8 ;
675 _numberOfNodeOfEachConstituent[0][3]=8 ;
676 _numberOfNodeOfEachConstituent[0][4]=8 ;
677 _numberOfNodeOfEachConstituent[0][5]=8 ;
678 _numberOfNodeOfEachConstituent[1]=new (int)[12] ;
679 _numberOfNodeOfEachConstituent[1][0]=3 ;
680 _numberOfNodeOfEachConstituent[1][1]=3 ;
681 _numberOfNodeOfEachConstituent[1][2]=3 ;
682 _numberOfNodeOfEachConstituent[1][3]=3 ;
683 _numberOfNodeOfEachConstituent[1][4]=3 ;
684 _numberOfNodeOfEachConstituent[1][5]=3 ;
685 _numberOfNodeOfEachConstituent[1][6]=3 ;
686 _numberOfNodeOfEachConstituent[1][7]=3 ;
687 _numberOfNodeOfEachConstituent[1][8]=3 ;
688 _numberOfNodeOfEachConstituent[1][9]=3 ;
689 _numberOfNodeOfEachConstituent[1][10]=3 ;
690 _numberOfNodeOfEachConstituent[1][11]=3 ;
692 int* _edge1=new int[3];
696 int* _edge2=new int[3];
700 int* _edge3=new int[3];
704 int* _edge4=new int[3];
708 int* _edge5=new int[3];
712 int* _edge6=new int[3];
716 int* _edge7=new int[3];
720 int* _edge8=new int[3];
724 int* _edge9=new int[3];
728 int* _edge10=new int[3];
732 int* _edge11=new int[3];
736 int* _edge12=new int[3];
740 int* _face1=new int[8];
749 int* _face2=new int[8];
758 int* _face3=new int[8];
767 int* _face4=new int[8];
776 int* _face5=new int[8];
785 int* _face6=new int[8];
794 int ** tmpConstituents1 = new (int*)[6];
795 tmpConstituents1[0]=_face1 ;
796 tmpConstituents1[1]=_face2 ;
797 tmpConstituents1[2]=_face3 ;
798 tmpConstituents1[3]=_face4 ;
799 tmpConstituents1[4]=_face5 ;
800 tmpConstituents1[5]=_face6 ;
801 int ** tmpConstituents2 = new (int*)[12];
802 tmpConstituents2[0]=_edge1 ;
803 tmpConstituents2[1]=_edge2 ;
804 tmpConstituents2[2]=_edge3 ;
805 tmpConstituents2[3]=_edge4 ;
806 tmpConstituents2[4]=_edge5 ;
807 tmpConstituents2[5]=_edge6 ;
808 tmpConstituents2[6]=_edge7 ;
809 tmpConstituents2[7]=_edge8 ;
810 tmpConstituents2[8]=_edge9 ;
811 tmpConstituents2[9]=_edge10;
812 tmpConstituents2[10]=_edge11;
813 tmpConstituents2[11]=_edge12;
814 _constituents = new int**[2] ;
815 _constituents[0]=tmpConstituents1 ;
816 _constituents[1]=tmpConstituents2 ;
817 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[6] ;
818 tmpConstituentsType1[0] = MED_QUAD8 ;
819 tmpConstituentsType1[1] = MED_QUAD8 ;
820 tmpConstituentsType1[2] = MED_QUAD8 ;
821 tmpConstituentsType1[3] = MED_QUAD8 ;
822 tmpConstituentsType1[4] = MED_QUAD8 ;
823 tmpConstituentsType1[5] = MED_QUAD8 ;
824 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[12] ;
825 tmpConstituentsType2[0] = MED_SEG3 ;
826 tmpConstituentsType2[1] = MED_SEG3 ;
827 tmpConstituentsType2[2] = MED_SEG3 ;
828 tmpConstituentsType2[3] = MED_SEG3 ;
829 tmpConstituentsType2[4] = MED_SEG3 ;
830 tmpConstituentsType2[5] = MED_SEG3 ;
831 tmpConstituentsType2[6] = MED_SEG3 ;
832 tmpConstituentsType2[7] = MED_SEG3 ;
833 tmpConstituentsType2[8] = MED_SEG3 ;
834 tmpConstituentsType2[9] = MED_SEG3 ;
835 tmpConstituentsType2[10] = MED_SEG3 ;
836 tmpConstituentsType2[11] = MED_SEG3 ;
837 _constituentsType = new medGeometryElement*[2] ;
838 _constituentsType[0]=tmpConstituentsType1 ;
839 _constituentsType[1]=tmpConstituentsType2 ;
849 _numberOfConstituentsDimension=2 ;
850 _numberOfConstituents=new int[2] ;
851 _numberOfConstituents[0]=5 ;
852 _numberOfConstituents[1]=9 ;
853 _numberOfNodeOfEachConstituent=new (int*)[2] ;
854 _numberOfNodeOfEachConstituent[0]=new (int)[5] ;
855 _numberOfNodeOfEachConstituent[0][0]=3 ;
856 _numberOfNodeOfEachConstituent[0][1]=3 ;
857 _numberOfNodeOfEachConstituent[0][2]=4 ;
858 _numberOfNodeOfEachConstituent[0][3]=4 ;
859 _numberOfNodeOfEachConstituent[0][4]=4 ;
860 _numberOfNodeOfEachConstituent[1]=new (int)[9] ;
861 _numberOfNodeOfEachConstituent[1][0]=2 ;
862 _numberOfNodeOfEachConstituent[1][1]=2 ;
863 _numberOfNodeOfEachConstituent[1][2]=2 ;
864 _numberOfNodeOfEachConstituent[1][3]=2 ;
865 _numberOfNodeOfEachConstituent[1][4]=2 ;
866 _numberOfNodeOfEachConstituent[1][5]=2 ;
867 _numberOfNodeOfEachConstituent[1][6]=2 ;
868 _numberOfNodeOfEachConstituent[1][7]=2 ;
869 _numberOfNodeOfEachConstituent[1][8]=2 ;
871 int* _edge1=new int[2];
874 int* _edge2=new int[2];
877 int* _edge3=new int[2];
880 int* _edge4=new int[2];
883 int* _edge5=new int[2];
886 int* _edge6=new int[2];
889 int* _edge7=new int[2];
892 int* _edge8=new int[2];
895 int* _edge9=new int[2];
898 int* _face1=new int[3];
902 int* _face2=new int[3];
906 int* _face3=new int[4];
911 int* _face4=new int[4];
916 int* _face5=new int[4];
921 int ** tmpConstituents1 = new (int*)[5];
922 tmpConstituents1[0]=_face1 ;
923 tmpConstituents1[1]=_face2 ;
924 tmpConstituents1[2]=_face3 ;
925 tmpConstituents1[3]=_face4 ;
926 tmpConstituents1[4]=_face5 ;
927 int ** tmpConstituents2 = new (int*)[9];
928 tmpConstituents2[0]=_edge1 ;
929 tmpConstituents2[1]=_edge2 ;
930 tmpConstituents2[2]=_edge3 ;
931 tmpConstituents2[3]=_edge4 ;
932 tmpConstituents2[4]=_edge5 ;
933 tmpConstituents2[5]=_edge6 ;
934 tmpConstituents2[6]=_edge7 ;
935 tmpConstituents2[7]=_edge8 ;
936 tmpConstituents2[8]=_edge9 ;
937 _constituents = new int**[2] ;
938 _constituents[0]=tmpConstituents1 ;
939 _constituents[1]=tmpConstituents2 ;
940 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[5] ;
941 tmpConstituentsType1[0] = MED_TRIA3 ;
942 tmpConstituentsType1[1] = MED_TRIA3 ;
943 tmpConstituentsType1[2] = MED_QUAD4 ;
944 tmpConstituentsType1[3] = MED_QUAD4 ;
945 tmpConstituentsType1[4] = MED_QUAD4 ;
946 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[9] ;
947 tmpConstituentsType2[0] = MED_SEG2 ;
948 tmpConstituentsType2[1] = MED_SEG2 ;
949 tmpConstituentsType2[2] = MED_SEG2 ;
950 tmpConstituentsType2[3] = MED_SEG2 ;
951 tmpConstituentsType2[4] = MED_SEG2 ;
952 tmpConstituentsType2[5] = MED_SEG2 ;
953 tmpConstituentsType2[6] = MED_SEG2 ;
954 tmpConstituentsType2[7] = MED_SEG2 ;
955 tmpConstituentsType2[8] = MED_SEG2 ;
956 _constituentsType = new medGeometryElement*[2] ;
957 _constituentsType[0]=tmpConstituentsType1 ;
958 _constituentsType[1]=tmpConstituentsType2 ;
962 _name="MED_PENTA15" ;
967 _numberOfConstituentsDimension=2 ;
968 _numberOfConstituents=new int[2] ;
969 _numberOfConstituents[0]=5 ;
970 _numberOfConstituents[1]=9 ;
971 _numberOfNodeOfEachConstituent=new (int*)[2] ;
972 _numberOfNodeOfEachConstituent[0]=new (int)[5] ;
973 _numberOfNodeOfEachConstituent[0][0]=6 ;
974 _numberOfNodeOfEachConstituent[0][1]=6 ;
975 _numberOfNodeOfEachConstituent[0][2]=8 ;
976 _numberOfNodeOfEachConstituent[0][3]=8 ;
977 _numberOfNodeOfEachConstituent[0][4]=8 ;
978 _numberOfNodeOfEachConstituent[1]=new (int)[9] ;
979 _numberOfNodeOfEachConstituent[1][0]=3 ;
980 _numberOfNodeOfEachConstituent[1][1]=3 ;
981 _numberOfNodeOfEachConstituent[1][2]=3 ;
982 _numberOfNodeOfEachConstituent[1][3]=3 ;
983 _numberOfNodeOfEachConstituent[1][4]=3 ;
984 _numberOfNodeOfEachConstituent[1][5]=3 ;
985 _numberOfNodeOfEachConstituent[1][6]=3 ;
986 _numberOfNodeOfEachConstituent[1][7]=3 ;
987 _numberOfNodeOfEachConstituent[1][8]=3 ;
989 int* _edge1=new int[3];
993 int* _edge2=new int[3];
997 int* _edge3=new int[3];
1001 int* _edge4=new int[3];
1005 int* _edge5=new int[3];
1009 int* _edge6=new int[3];
1013 int* _edge7=new int[3];
1017 int* _edge8=new int[3];
1021 int* _edge9=new int[3];
1025 int* _face1=new int[6];
1032 int* _face2=new int[6];
1039 int* _face3=new int[8];
1048 int* _face4=new int[8];
1057 int* _face5=new int[8];
1066 int ** tmpConstituents1 = new (int*)[5];
1067 tmpConstituents1[0]=_face1 ;
1068 tmpConstituents1[1]=_face2 ;
1069 tmpConstituents1[2]=_face3 ;
1070 tmpConstituents1[3]=_face4 ;
1071 tmpConstituents1[4]=_face5 ;
1072 int ** tmpConstituents2 = new (int*)[9];
1073 tmpConstituents2[0]=_edge1 ;
1074 tmpConstituents2[1]=_edge2 ;
1075 tmpConstituents2[2]=_edge3 ;
1076 tmpConstituents2[3]=_edge4 ;
1077 tmpConstituents2[4]=_edge5 ;
1078 tmpConstituents2[5]=_edge6 ;
1079 tmpConstituents2[6]=_edge7 ;
1080 tmpConstituents2[7]=_edge8 ;
1081 tmpConstituents2[8]=_edge9 ;
1082 _constituents = new (int**)[2] ;
1083 _constituents[0]=tmpConstituents1 ;
1084 _constituents[1]=tmpConstituents2 ;
1085 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[5] ;
1086 tmpConstituentsType1[0] = MED_TRIA6 ;
1087 tmpConstituentsType1[1] = MED_TRIA6 ;
1088 tmpConstituentsType1[2] = MED_QUAD8 ;
1089 tmpConstituentsType1[3] = MED_QUAD8 ;
1090 tmpConstituentsType1[4] = MED_QUAD8 ;
1091 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[9] ;
1092 tmpConstituentsType2[0] = MED_SEG3 ;
1093 tmpConstituentsType2[1] = MED_SEG3 ;
1094 tmpConstituentsType2[2] = MED_SEG3 ;
1095 tmpConstituentsType2[3] = MED_SEG3 ;
1096 tmpConstituentsType2[4] = MED_SEG3 ;
1097 tmpConstituentsType2[5] = MED_SEG3 ;
1098 tmpConstituentsType2[6] = MED_SEG3 ;
1099 tmpConstituentsType2[7] = MED_SEG3 ;
1100 tmpConstituentsType2[8] = MED_SEG3 ;
1101 _constituentsType = new (medGeometryElement*)[2] ;
1102 _constituentsType[0]=tmpConstituentsType1 ;
1103 _constituentsType[1]=tmpConstituentsType2 ;
1110 _numberOfVertexes=5;
1112 _numberOfConstituentsDimension=2 ;
1113 _numberOfConstituents=new int[2] ;
1114 _numberOfConstituents[0]=5 ;
1115 _numberOfConstituents[1]=8 ;
1116 _numberOfNodeOfEachConstituent=new (int*)[2] ;
1117 _numberOfNodeOfEachConstituent[0]=new (int)[5] ;
1118 _numberOfNodeOfEachConstituent[0][0]=4 ;
1119 _numberOfNodeOfEachConstituent[0][1]=3 ;
1120 _numberOfNodeOfEachConstituent[0][2]=3 ;
1121 _numberOfNodeOfEachConstituent[0][3]=3 ;
1122 _numberOfNodeOfEachConstituent[0][4]=3 ;
1123 _numberOfNodeOfEachConstituent[1]=new (int)[8] ;
1124 _numberOfNodeOfEachConstituent[1][0]=2 ;
1125 _numberOfNodeOfEachConstituent[1][1]=2 ;
1126 _numberOfNodeOfEachConstituent[1][2]=2 ;
1127 _numberOfNodeOfEachConstituent[1][3]=2 ;
1128 _numberOfNodeOfEachConstituent[1][4]=2 ;
1129 _numberOfNodeOfEachConstituent[1][5]=2 ;
1130 _numberOfNodeOfEachConstituent[1][6]=2 ;
1131 _numberOfNodeOfEachConstituent[1][7]=2 ;
1133 int* _edge1=new int[2];
1136 int* _edge2=new int[2];
1139 int* _edge3=new int[2];
1142 int* _edge4=new int[2];
1145 int* _edge5=new int[2];
1148 int* _edge6=new int[2];
1151 int* _edge7=new int[2];
1154 int* _edge8=new int[2];
1157 int* _face1=new int[4];
1162 int* _face2=new int[3];
1166 int* _face3=new int[3];
1170 int* _face4=new int[3];
1174 int* _face5=new int[3];
1178 int ** tmpConstituents1 = new (int*)[5];
1179 tmpConstituents1[0]=_face1 ;
1180 tmpConstituents1[1]=_face2 ;
1181 tmpConstituents1[2]=_face3 ;
1182 tmpConstituents1[3]=_face4 ;
1183 tmpConstituents1[4]=_face5 ;
1184 int ** tmpConstituents2 = new (int*)[8];
1185 tmpConstituents2[0]=_edge1 ;
1186 tmpConstituents2[1]=_edge2 ;
1187 tmpConstituents2[2]=_edge3 ;
1188 tmpConstituents2[3]=_edge4 ;
1189 tmpConstituents2[4]=_edge5 ;
1190 tmpConstituents2[5]=_edge6 ;
1191 tmpConstituents2[6]=_edge7 ;
1192 tmpConstituents2[7]=_edge8 ;
1193 _constituents = new int**[2] ;
1194 _constituents[0]=tmpConstituents1 ;
1195 _constituents[1]=tmpConstituents2 ;
1196 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[5] ;
1197 tmpConstituentsType1[0] = MED_QUAD4 ;
1198 tmpConstituentsType1[1] = MED_TRIA3 ;
1199 tmpConstituentsType1[2] = MED_TRIA3 ;
1200 tmpConstituentsType1[3] = MED_TRIA3 ;
1201 tmpConstituentsType1[4] = MED_TRIA3 ;
1202 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[8] ;
1203 tmpConstituentsType2[0] = MED_SEG2 ;
1204 tmpConstituentsType2[1] = MED_SEG2 ;
1205 tmpConstituentsType2[2] = MED_SEG2 ;
1206 tmpConstituentsType2[3] = MED_SEG2 ;
1207 tmpConstituentsType2[4] = MED_SEG2 ;
1208 tmpConstituentsType2[5] = MED_SEG2 ;
1209 tmpConstituentsType2[6] = MED_SEG2 ;
1210 tmpConstituentsType2[7] = MED_SEG2 ;
1211 _constituentsType = new medGeometryElement*[2] ;
1212 _constituentsType[0]=tmpConstituentsType1 ;
1213 _constituentsType[1]=tmpConstituentsType2 ;
1217 _name="MED_PYRA13" ;
1220 _numberOfVertexes=5;
1222 _numberOfConstituentsDimension=2 ;
1223 _numberOfConstituents=new int[2] ;
1224 _numberOfConstituents[0]=5 ;
1225 _numberOfConstituents[1]=8 ;
1226 _numberOfNodeOfEachConstituent=new (int*)[2] ;
1227 _numberOfNodeOfEachConstituent[0]=new (int)[5] ;
1228 _numberOfNodeOfEachConstituent[0][0]=8 ;
1229 _numberOfNodeOfEachConstituent[0][1]=6 ;
1230 _numberOfNodeOfEachConstituent[0][2]=6 ;
1231 _numberOfNodeOfEachConstituent[0][3]=6 ;
1232 _numberOfNodeOfEachConstituent[0][4]=6 ;
1233 _numberOfNodeOfEachConstituent[1]=new (int)[8] ;
1234 _numberOfNodeOfEachConstituent[1][0]=3 ;
1235 _numberOfNodeOfEachConstituent[1][1]=3 ;
1236 _numberOfNodeOfEachConstituent[1][2]=3 ;
1237 _numberOfNodeOfEachConstituent[1][3]=3 ;
1238 _numberOfNodeOfEachConstituent[1][4]=3 ;
1239 _numberOfNodeOfEachConstituent[1][5]=3 ;
1240 _numberOfNodeOfEachConstituent[1][6]=3 ;
1241 _numberOfNodeOfEachConstituent[1][7]=3 ;
1243 int* _edge1=new int[3];
1247 int* _edge2=new int[3];
1251 int* _edge3=new int[3];
1255 int* _edge4=new int[3];
1259 int* _edge5=new int[3];
1263 int* _edge6=new int[3];
1267 int* _edge7=new int[3];
1271 int* _edge8=new int[3];
1275 int* _face1=new int[8];
1284 int* _face2=new int[6];
1291 int* _face3=new int[6];
1298 int* _face4=new int[6];
1305 int* _face5=new int[6];
1312 int ** tmpConstituents1 = new (int*)[5];
1313 tmpConstituents1[0]=_face1 ;
1314 tmpConstituents1[1]=_face2 ;
1315 tmpConstituents1[2]=_face3 ;
1316 tmpConstituents1[3]=_face4 ;
1317 tmpConstituents1[4]=_face5 ;
1318 int ** tmpConstituents2 = new (int*)[8];
1319 tmpConstituents2[0]=_edge1 ;
1320 tmpConstituents2[1]=_edge2 ;
1321 tmpConstituents2[2]=_edge3 ;
1322 tmpConstituents2[3]=_edge4 ;
1323 tmpConstituents2[4]=_edge5 ;
1324 tmpConstituents2[5]=_edge6 ;
1325 tmpConstituents2[6]=_edge7 ;
1326 tmpConstituents2[7]=_edge8 ;
1327 _constituents = new int**[2] ;
1328 _constituents[0]=tmpConstituents1 ;
1329 _constituents[1]=tmpConstituents2 ;
1330 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[5] ;
1331 tmpConstituentsType1[0] = MED_QUAD8 ;
1332 tmpConstituentsType1[1] = MED_TRIA6 ;
1333 tmpConstituentsType1[2] = MED_TRIA6 ;
1334 tmpConstituentsType1[3] = MED_TRIA6 ;
1335 tmpConstituentsType1[4] = MED_TRIA6 ;
1336 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[8] ;
1337 tmpConstituentsType2[0] = MED_SEG3 ;
1338 tmpConstituentsType2[1] = MED_SEG3 ;
1339 tmpConstituentsType2[2] = MED_SEG3 ;
1340 tmpConstituentsType2[3] = MED_SEG3 ;
1341 tmpConstituentsType2[4] = MED_SEG3 ;
1342 tmpConstituentsType2[5] = MED_SEG3 ;
1343 tmpConstituentsType2[6] = MED_SEG3 ;
1344 tmpConstituentsType2[7] = MED_SEG3 ;
1345 _constituentsType = new medGeometryElement*[2] ;
1346 _constituentsType[0]=tmpConstituentsType1 ;
1347 _constituentsType[1]=tmpConstituentsType2 ;
1356 ostream & MEDMEM::operator<<(ostream &os,const CELLMODEL &my)
1358 os << "Cell Model :" << endl ;
1359 os << " - name : " << my._name << endl;
1360 os << " - type : " << (int)my._type << endl;
1361 os << " - dimension : " << my._dimension << endl;
1362 os << " - number of nodes : " << my._numberOfNodes << endl ;
1363 os << " - number of vertexes : " << my._numberOfVertexes << endl ;
1365 os << " - number of Constituents Dimension : " << my._numberOfConstituentsDimension << endl ;
1367 for(int i=0;i<my._numberOfConstituentsDimension;i++)
1370 os << " - for dimension (-" << i+1 << ") : " << endl ;
1371 os << " - number of Constituents for this Dimension : " << my._numberOfConstituents[i] << endl ;
1373 for(int j=0;j<my._numberOfConstituents[i];j++)
1375 os << " - number of node for this constituent : " << my._numberOfNodeOfEachConstituent[i][j] << endl ;
1376 os << " - constituents " << j+1 << " of type "<< my._constituentsType[i][j] <<" : " ;
1377 for(int k=0;k<my._numberOfNodeOfEachConstituent[i][j];k++)
1378 os << my._constituents[i][j][k] << " " ;
1387 // Return number of constituents type (which dimension is _dimension-1).
1388 int CELLMODEL::getNumberOfConstituentsType() const
1390 set<medGeometryElement> constituentsTypes ;
1391 // if (_constituentsType.size() > 0 ) {
1392 // vector<medGeometryElement> constituentsType = _constituentsType[0] ;
1393 // vector<medGeometryElement>::iterator itvec ;
1394 // for(itvec=constituentsType.begin();itvec!=constituentsType.end();itvec++)
1395 // constituentsTypes.insert(*itvec);
1397 return constituentsTypes.size() ;
1400 // Return all types of constituents which dimension is (_dimension-1).
1401 set<medGeometryElement> CELLMODEL::getAllConstituentsType() const
1403 set<medGeometryElement> constituentsTypes ;
1404 // if (_constituentsType.size() > 0 ) {
1405 // vector<medGeometryElement> constituentsType = _constituentsType[0] ;
1406 // vector<medGeometryElement>::iterator itvec ;
1407 // for(itvec=constituentsType.begin();itvec!=constituentsType.end();itvec++)
1408 // constituentsTypes.insert(*itvec);
1410 return constituentsTypes ;
1413 // Return number of constituents foreach type (which dimension is _dimension-1).
1414 map<medGeometryElement,int> CELLMODEL::getNumberOfConstituentsForeachType() const
1416 map<medGeometryElement,int> numberOfConstituentsForeachType ;
1417 // map<medGeometryElement,int>::iterator itmap ;
1418 // if (_constituentsType.size() > 0 ) {
1419 // vector<medGeometryElement> constituentsType = _constituentsType[0] ;
1420 // vector<medGeometryElement>::iterator itvec ;
1421 // for(itvec=constituentsType.begin();itvec!=constituentsType.end();itvec++) {
1422 // itmap = numberOfConstituentsForeachType.find(*itvec);
1423 // if (itmap==numberOfConstituentsForeachType.end()) // new element
1424 // numberOfConstituentsForeachType[*itvec]=1 ;
1426 // numberOfConstituentsForeachType[*itvec]++ ;
1429 return numberOfConstituentsForeachType ;
1432 void CELLMODEL::init(const CELLMODEL &m)
1436 _dimension = m._dimension ;
1437 _numberOfNodes = m._numberOfNodes ;
1438 _numberOfVertexes = m._numberOfVertexes ;
1440 _numberOfConstituentsDimension = m._numberOfConstituentsDimension ;
1442 _numberOfConstituents = new int[_numberOfConstituentsDimension] ;
1443 for(int i=0; i<_numberOfConstituentsDimension; i++)
1444 _numberOfConstituents[i]=m._numberOfConstituents[i] ;
1446 _numberOfNodeOfEachConstituent = new (int*)[_numberOfConstituentsDimension] ;
1447 for(int i=0; i<_numberOfConstituentsDimension; i++) {
1448 int numberOf = _numberOfConstituents[i] ;
1449 int * newArray = new int[numberOf] ;
1450 int * oldArray = m._numberOfNodeOfEachConstituent[i] ;
1451 for(int j=0; j<numberOf; j++)
1452 newArray[j] = oldArray[j] ;
1453 _numberOfNodeOfEachConstituent[i] = newArray ;
1455 _constituents = new (int**)[_numberOfConstituentsDimension] ;
1456 _constituentsType = new (medGeometryElement*)[_numberOfConstituentsDimension] ;
1457 for(int i=0; i<_numberOfConstituentsDimension; i++) {
1458 int numberOf = _numberOfConstituents[i] ;
1459 int ** tmpArray = new (int*)[numberOf] ;
1460 medGeometryElement * newArrayType = new medGeometryElement[numberOf] ;
1461 medGeometryElement * oldArrayType = m._constituentsType[i] ;
1463 for(int j=0; j<numberOf; j++) {
1464 int numberOf2 = _numberOfNodeOfEachConstituent[i][j] ;
1465 int * newArray = new int[numberOf2] ;
1466 int * oldArray = m._constituents[i][j] ;
1467 for(int k=0; k<numberOf2; k++)
1468 newArray[k] = oldArray[k] ;
1469 tmpArray[j] = newArray ;
1470 newArrayType[j] = oldArrayType[j] ;
1472 _constituents[i] = tmpArray ;
1473 _constituentsType[i] = newArrayType ;
1477 void CELLMODEL::clean()
1479 for(int i=0; i<_numberOfConstituentsDimension; i++) {
1480 int numberOf = _numberOfConstituents[i] ;
1481 for(int j=0; j<numberOf; j++) {
1482 if (NULL!=_constituents[i][j])
1483 delete[] _constituents[i][j] ;
1485 if (NULL!=_constituentsType[i])
1486 delete[] _constituentsType[i] ;
1487 if (NULL!=_constituents[i])
1488 delete[] _constituents[i] ;
1489 if (NULL!=_numberOfNodeOfEachConstituent[i])
1490 delete[] _numberOfNodeOfEachConstituent[i] ;
1492 if (NULL!=_numberOfConstituents)
1493 delete[]_numberOfConstituents ;
1494 if (NULL!=_constituentsType)
1495 delete[] _constituentsType ;
1496 if (NULL!=_constituents)
1497 delete[] _constituents ;
1498 if (NULL!=_numberOfNodeOfEachConstituent)
1499 delete[] _numberOfNodeOfEachConstituent ;