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 // vector<medGeometryElement> vector_type(2,MED_POINT1) ;
43 // vector<medGeometryElement> __constituents_type[]={vector_type};
44 // vector< vector<medGeometryElement> > _constituents_type(__constituents_type,__constituents_type+1) ;
45 // _constituentsType = _constituents_type ;
46 //_constituentsType[2][1]={{MED_POINT1,MED_POINT1}} ;
47 _numberOfConstituentsDimension=1 ;
48 _numberOfConstituents=new int[1] ;
49 _numberOfConstituents[0]=2 ;
50 _numberOfNodeOfEachConstituent=new (int*)[1] ;
51 _numberOfNodeOfEachConstituent[0]=new (int)[2] ;
52 _numberOfNodeOfEachConstituent[0][0]=1 ;
53 _numberOfNodeOfEachConstituent[0][1]=1 ;
55 _constituents = new (int**)[1] ;
56 _constituents[0] = new (int*)[2] ;
57 _constituents[0][0] = new int[1] ;
58 _constituents[0][0][0] = 1 ;
59 _constituents[0][1] = new int[1] ;
60 _constituents[0][1][0] = 2 ;
62 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[2] ;
63 tmpConstituentsType1[0] = MED_POINT1 ;
64 tmpConstituentsType1[1] = MED_POINT1 ;
65 _constituentsType = new medGeometryElement*[1] ;
66 _constituentsType[0]=tmpConstituentsType1 ;
75 // constituent are POINT1 and we have no need to define _constituents vector
76 // vector<medGeometryElement> vector_type(3,MED_POINT1) ;
77 // vector<medGeometryElement> __constituents_type[]={vector_type};
78 // vector< vector<medGeometryElement> > _constituents_type(__constituents_type,__constituents_type+1) ;
79 // _constituentsType = _constituents_type ;
80 _numberOfConstituentsDimension=1 ;
81 _numberOfConstituents=new int[1] ;
82 _numberOfConstituents[0]=3 ;
83 _numberOfNodeOfEachConstituent=new (int*)[1] ;
84 _numberOfNodeOfEachConstituent[0]=new (int)[3] ;
85 _numberOfNodeOfEachConstituent[0][0]=1 ;
86 _numberOfNodeOfEachConstituent[0][1]=1 ;
87 _numberOfNodeOfEachConstituent[0][2]=1 ;
89 _constituents = new (int**)[1] ;
90 _constituents[0] = new (int*)[3] ;
91 _constituents[0][0] = new int[1] ;
92 _constituents[0][0][0] = 1 ;
93 _constituents[0][1] = new int[1] ;
94 _constituents[0][1][0] = 2 ;
95 _constituents[0][2] = new int[1] ;
96 _constituents[0][2][0] = 3 ;
98 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[3] ;
99 tmpConstituentsType1[0] = MED_POINT1 ;
100 tmpConstituentsType1[1] = MED_POINT1 ;
101 tmpConstituentsType1[2] = MED_POINT1 ;
102 _constituentsType = new medGeometryElement*[1] ;
103 _constituentsType[0]=tmpConstituentsType1 ;
113 _numberOfConstituentsDimension=1 ;
114 _numberOfConstituents=new int[1] ;
115 _numberOfConstituents[0]=3 ;
116 _numberOfNodeOfEachConstituent=new (int*)[1] ;
117 _numberOfNodeOfEachConstituent[0]=new (int)[3] ;
118 _numberOfNodeOfEachConstituent[0][0]=2 ;
119 _numberOfNodeOfEachConstituent[0][1]=2 ;
120 _numberOfNodeOfEachConstituent[0][2]=2 ;
122 int* _edge1=new int[2];
125 int* _edge2=new int[2];
128 int* _edge3=new int[2];
131 int ** tmpConstituents1 = new (int*)[3];
132 tmpConstituents1[0]=_edge1 ;
133 tmpConstituents1[1]=_edge2 ;
134 tmpConstituents1[2]=_edge3 ;
135 _constituents = new int**[1] ;
136 _constituents[0]=tmpConstituents1 ;
138 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[3] ;
139 tmpConstituentsType1[0] = MED_SEG2 ;
140 tmpConstituentsType1[1] = MED_SEG2 ;
141 tmpConstituentsType1[2] = MED_SEG2 ;
142 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[3] ;
143 tmpConstituentsType2[0] = MED_POINT1 ;
144 tmpConstituentsType2[1] = MED_POINT1 ;
145 tmpConstituentsType2[2] = MED_POINT1 ;
146 _constituentsType = new medGeometryElement*[2] ;
147 _constituentsType[0]=tmpConstituentsType1 ;
148 _constituentsType[1]=tmpConstituentsType2 ;
149 // Well, point are defined, but could not be acces because we have
150 // only 1 numberOfConstituentsDimension !
160 // int _edge1[]={1,2,4} ;
161 // int _edge2[]={2,3,5} ;
162 // int _edge3[]={3,1,6} ;
163 // vector<int> edge1(_edge1,_edge1+3) ;
164 // vector<int> edge2(_edge2,_edge2+3) ;
165 // vector<int> edge3(_edge3,_edge3+3) ;
166 // vector<int> _vector_edge[]={edge1,edge2,edge3};
167 // vector< vector<int> > vector_edge(_vector_edge,_vector_edge+3) ;
168 // vector< vector<int> > __constituents__[]={vector_edge};
169 // vector< vector< vector<int> > > _constituents_(__constituents__,__constituents__+1) ;
170 // _constituents = _constituents_ ;
171 _numberOfConstituentsDimension=1 ;
172 _numberOfConstituents=new int[1] ;
173 _numberOfConstituents[0]=3 ;
174 _numberOfNodeOfEachConstituent=new (int*)[1] ;
175 _numberOfNodeOfEachConstituent[0]=new (int)[3] ;
176 _numberOfNodeOfEachConstituent[0][0]=3 ;
177 _numberOfNodeOfEachConstituent[0][1]=3 ;
178 _numberOfNodeOfEachConstituent[0][2]=3 ;
180 int* _edge1=new int[3];
184 int* _edge2=new int[3];
188 int* _edge3=new int[3];
192 int ** tmpConstituents1 = new (int*)[3];
193 tmpConstituents1[0]=_edge1 ;
194 tmpConstituents1[1]=_edge2 ;
195 tmpConstituents1[2]=_edge3 ;
196 _constituents = new int**[1] ;
197 _constituents[0]=tmpConstituents1 ;
198 // vector<medGeometryElement> vector_edge_type(3,MED_SEG3) ;
199 // vector<medGeometryElement> vector_type(6,MED_POINT1) ;
200 // vector<medGeometryElement> __constituents_type[]={vector_edge_type,vector_type};
201 // vector< vector<medGeometryElement> > _constituents_type(__constituents_type,__constituents_type+2) ;
202 // _constituentsType = _constituents_type ;
203 //_constituentsType={{MED_SEG3,MED_SEG3,MED_SEG3},{MED_POINT1,MED_POINT1,MED_POINT1,MED_POINT1,MED_POINT1,MED_POINT1}} ;
204 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[3] ;
205 tmpConstituentsType1[0] = MED_SEG3 ;
206 tmpConstituentsType1[1] = MED_SEG3 ;
207 tmpConstituentsType1[2] = MED_SEG3 ;
208 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[6] ;
209 tmpConstituentsType2[0] = MED_POINT1 ;
210 tmpConstituentsType2[1] = MED_POINT1 ;
211 tmpConstituentsType2[2] = MED_POINT1 ;
212 tmpConstituentsType2[3] = MED_POINT1 ;
213 tmpConstituentsType2[4] = MED_POINT1 ;
214 tmpConstituentsType2[5] = MED_POINT1 ;
215 _constituentsType = new medGeometryElement*[2] ;
216 _constituentsType[0]=tmpConstituentsType1 ;
217 _constituentsType[1]=tmpConstituentsType2 ;
218 // Well, point are defined, but could not be acces because we have
219 // only 1 numberOfConstituentsDimension !
229 // int _edge1[]={1,2} ;
230 // int _edge2[]={2,3} ;
231 // int _edge3[]={3,4} ;
232 // int _edge4[]={4,1} ;
233 // vector<int> edge1(_edge1,_edge1+2) ;
234 // vector<int> edge2(_edge2,_edge2+2) ;
235 // vector<int> edge3(_edge3,_edge3+2) ;
236 // vector<int> edge4(_edge4,_edge4+2) ;
237 // vector<int> _vector_edge[]={edge1,edge2,edge3,edge4};
238 // vector< vector<int> > vector_edge(_vector_edge,_vector_edge+4) ;
239 // vector< vector<int> > __constituents__[]={vector_edge};
240 // vector< vector< vector<int> > > _constituents_(__constituents__,__constituents__+1) ;
241 // _constituents = _constituents_ ;
242 //_constituents={{{1,2},{2,3},{3,4},{4,1}}} ;
243 _numberOfConstituentsDimension=1 ;
244 _numberOfConstituents=new int[1] ;
245 _numberOfConstituents[0]=4 ;
246 _numberOfNodeOfEachConstituent=new (int*)[1] ;
247 _numberOfNodeOfEachConstituent[0]=new (int)[4] ;
248 _numberOfNodeOfEachConstituent[0][0]=2 ;
249 _numberOfNodeOfEachConstituent[0][1]=2 ;
250 _numberOfNodeOfEachConstituent[0][2]=2 ;
251 _numberOfNodeOfEachConstituent[0][3]=2 ;
253 int* _edge1=new int[2];
256 int* _edge2=new int[2];
259 int* _edge3=new int[2];
262 int* _edge4=new int[2];
265 int ** tmpConstituents1 = new (int*)[4];
266 tmpConstituents1[0]=_edge1 ;
267 tmpConstituents1[1]=_edge2 ;
268 tmpConstituents1[2]=_edge3 ;
269 tmpConstituents1[3]=_edge4 ;
270 _constituents = new int**[1] ;
271 _constituents[0]=tmpConstituents1 ;
272 // vector<medGeometryElement> vector_edge_type(4,MED_SEG2) ;
273 // vector<medGeometryElement> vector_type(4,MED_POINT1) ;
274 // vector<medGeometryElement> __constituents_type[]={vector_edge_type,vector_type};
275 // vector< vector<medGeometryElement> > _constituents_type(__constituents_type,__constituents_type+2) ;
276 // _constituentsType = _constituents_type ;
277 //_constituentsType={{MED_SEG2,MED_SEG2,MED_SEG2,MED_SEG2},{MED_POINT1,MED_POINT1,MED_POINT1,MED_POINT1}} ;
278 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[4] ;
279 tmpConstituentsType1[0] = MED_SEG2 ;
280 tmpConstituentsType1[1] = MED_SEG2 ;
281 tmpConstituentsType1[2] = MED_SEG2 ;
282 tmpConstituentsType1[3] = MED_SEG2 ;
283 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[4] ;
284 tmpConstituentsType2[0] = MED_POINT1 ;
285 tmpConstituentsType2[1] = MED_POINT1 ;
286 tmpConstituentsType2[2] = MED_POINT1 ;
287 tmpConstituentsType2[3] = MED_POINT1 ;
288 _constituentsType = new medGeometryElement*[2] ;
289 _constituentsType[0]=tmpConstituentsType1 ;
290 _constituentsType[1]=tmpConstituentsType2 ;
291 // Well, point are defined, but could not be acces because we have
292 // only 1 numberOfConstituentsDimension !
302 // int _edge1[]={1,2,5} ;
303 // int _edge2[]={2,3,6} ;
304 // int _edge3[]={3,4,7} ;
305 // int _edge4[]={4,1,8} ;
306 // vector<int> edge1(_edge1,_edge1+3) ;
307 // vector<int> edge2(_edge2,_edge2+3) ;
308 // vector<int> edge3(_edge3,_edge3+3) ;
309 // vector<int> edge4(_edge4,_edge4+3) ;
310 // vector<int> _vector_edge[]={edge1,edge2,edge3,edge4};
311 // vector< vector<int> > vector_edge(_vector_edge,_vector_edge+4) ;
312 // vector< vector<int> > __constituents__[]={vector_edge};
313 // vector< vector< vector<int> > > _constituents_(__constituents__,__constituents__+1) ;
314 // _constituents = _constituents_ ;
315 //_constituents={{{1,2,5},{2,3,6},{3,4,7},{4,1,8}}} ;
316 _numberOfConstituentsDimension=1 ;
317 _numberOfConstituents=new int[1] ;
318 _numberOfConstituents[0]=4 ;
319 _numberOfNodeOfEachConstituent=new (int*)[1] ;
320 _numberOfNodeOfEachConstituent[0]=new (int)[4] ;
321 _numberOfNodeOfEachConstituent[0][0]=3 ;
322 _numberOfNodeOfEachConstituent[0][1]=3 ;
323 _numberOfNodeOfEachConstituent[0][2]=3 ;
324 _numberOfNodeOfEachConstituent[0][3]=3 ;
326 int* _edge1=new int[3];
330 int* _edge2=new int[3];
334 int* _edge3=new int[3];
338 int* _edge4=new int[3];
342 int ** tmpConstituents1 = new (int*)[4];
343 tmpConstituents1[0]=_edge1 ;
344 tmpConstituents1[1]=_edge2 ;
345 tmpConstituents1[2]=_edge3 ;
346 tmpConstituents1[3]=_edge4 ;
347 _constituents = new int**[1] ;
348 _constituents[0]=tmpConstituents1 ;
349 // vector<medGeometryElement> vector_edge_type(4,MED_SEG3) ;
350 // vector<medGeometryElement> vector_type(8,MED_POINT1) ;
351 // vector<medGeometryElement> __constituents_type[]={vector_edge_type,vector_type};
352 // vector< vector<medGeometryElement> > _constituents_type(__constituents_type,__constituents_type+2) ;
353 // _constituentsType = _constituents_type ;
354 //_constituentsType={{MED_SEG3,MED_SEG3,MED_SEG3,MED_SEG3},{MED_POINT1,MED_POINT1,MED_POINT1,MED_POINT1,MED_POINT1,MED_POINT1,MED_POINT1,MED_POINT1} ;
355 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[4] ;
356 tmpConstituentsType1[0] = MED_SEG3 ;
357 tmpConstituentsType1[1] = MED_SEG3 ;
358 tmpConstituentsType1[2] = MED_SEG3 ;
359 tmpConstituentsType1[3] = MED_SEG3 ;
360 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[4] ;
361 tmpConstituentsType2[0] = MED_POINT1 ;
362 tmpConstituentsType2[1] = MED_POINT1 ;
363 tmpConstituentsType2[2] = MED_POINT1 ;
364 tmpConstituentsType2[3] = MED_POINT1 ;
365 tmpConstituentsType2[4] = MED_POINT1 ;
366 tmpConstituentsType2[5] = MED_POINT1 ;
367 tmpConstituentsType2[6] = MED_POINT1 ;
368 tmpConstituentsType2[7] = MED_POINT1 ;
369 _constituentsType = new medGeometryElement*[2] ;
370 _constituentsType[0]=tmpConstituentsType1 ;
371 _constituentsType[1]=tmpConstituentsType2 ;
372 // Well, point are defined, but could not be acces because we have
373 // only 1 numberOfConstituentsDimension !
383 // int _edge1[]={1,2} ;
384 // int _edge2[]={2,3} ;
385 // int _edge3[]={3,1} ;
386 // int _edge4[]={1,4} ;
387 // int _edge5[]={2,4} ;
388 // int _edge6[]={3,4} ;
389 // vector<int> edge1(_edge1,_edge1+2) ;
390 // vector<int> edge2(_edge2,_edge2+2) ;
391 // vector<int> edge3(_edge3,_edge3+2) ;
392 // vector<int> edge4(_edge4,_edge4+2) ;
393 // vector<int> edge5(_edge5,_edge5+2) ;
394 // vector<int> edge6(_edge6,_edge6+2) ;
395 // vector<int> _vector_edge[]={edge1,edge2,edge3,edge4,edge5,edge6};
396 // vector< vector<int> > vector_edge(_vector_edge,_vector_edge+6) ;
397 // int _face1[]={1,2,3} ;
398 // int _face2[]={1,4,2} ;
399 // int _face3[]={2,4,3} ;
400 // int _face4[]={3,4,1} ;
401 // vector<int> face1(_face1,_face1+3) ;
402 // vector<int> face2(_face2,_face2+3) ;
403 // vector<int> face3(_face3,_face3+3) ;
404 // vector<int> face4(_face4,_face4+3) ;
405 // vector<int> _vector_face[] = {face1,face2,face3,face4} ;
406 // vector< vector<int> > vector_face(_vector_face,_vector_face+4) ;
407 // vector< vector<int> > __constituents__[]={vector_face,vector_edge};
408 // vector< vector< vector<int> > > _constituents_(__constituents__,__constituents__+2) ;
409 // _constituents = _constituents_ ;
410 //_constituents={{{1,2,3},{1,4,2},{2,4,3},{3,4,1}},{{1,2},{2,3},{3,1},{1,4},{2,4},{3,4}}} ;
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]=3 ;
418 _numberOfNodeOfEachConstituent[0][1]=3 ;
419 _numberOfNodeOfEachConstituent[0][2]=3 ;
420 _numberOfNodeOfEachConstituent[0][3]=3 ;
421 _numberOfNodeOfEachConstituent[1]=new (int)[6] ;
422 _numberOfNodeOfEachConstituent[1][0]=2 ;
423 _numberOfNodeOfEachConstituent[1][1]=2 ;
424 _numberOfNodeOfEachConstituent[1][2]=2 ;
425 _numberOfNodeOfEachConstituent[1][3]=2 ;
426 _numberOfNodeOfEachConstituent[1][4]=2 ;
427 _numberOfNodeOfEachConstituent[1][5]=2 ;
429 int* _face1=new int[3];
433 int* _face2=new int[3];
437 int* _face3=new int[3];
441 int* _face4=new int[3];
445 int* _edge1=new int[2];
448 int* _edge2=new int[2];
451 int* _edge3=new int[2];
454 int* _edge4=new int[2];
457 int* _edge5=new int[2];
460 int* _edge6=new int[2];
463 int ** tmpConstituents1 = new (int*)[4];
464 tmpConstituents1[0]=_face1 ;
465 tmpConstituents1[1]=_face2 ;
466 tmpConstituents1[2]=_face3 ;
467 tmpConstituents1[3]=_face4 ;
468 int ** tmpConstituents2 = new (int*)[6];
469 tmpConstituents2[0]=_edge1 ;
470 tmpConstituents2[1]=_edge2 ;
471 tmpConstituents2[2]=_edge3 ;
472 tmpConstituents2[3]=_edge4 ;
473 tmpConstituents2[4]=_edge5 ;
474 tmpConstituents2[5]=_edge6 ;
475 _constituents = new int**[2] ;
476 _constituents[0]=tmpConstituents1 ;
477 _constituents[1]=tmpConstituents2 ;
478 // vector<medGeometryElement> vector_edge_type(6,MED_SEG2) ;
479 // vector<medGeometryElement> vector_face_type(4,MED_TRIA3) ;
480 // vector<medGeometryElement> __constituents_type[]={vector_face_type,vector_edge_type};
481 // vector< vector<medGeometryElement> > _constituents_type(__constituents_type,__constituents_type+2) ;
482 // _constituentsType = _constituents_type ;
483 //_constituentsType={{MED_TRIA3,MED_TRIA3,MED_TRIA3,MED_TRIA3}{MED_SEG2,MED_SEG2,MED_SEG2,MED_SEG2,MED_SEG2,MED_SEG2}} ;
484 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[4] ;
485 tmpConstituentsType1[0] = MED_TRIA3 ;
486 tmpConstituentsType1[1] = MED_TRIA3 ;
487 tmpConstituentsType1[2] = MED_TRIA3 ;
488 tmpConstituentsType1[3] = MED_TRIA3 ;
489 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[6] ;
490 tmpConstituentsType2[0] = MED_SEG2 ;
491 tmpConstituentsType2[1] = MED_SEG2 ;
492 tmpConstituentsType2[2] = MED_SEG2 ;
493 tmpConstituentsType2[3] = MED_SEG2 ;
494 tmpConstituentsType2[4] = MED_SEG2 ;
495 tmpConstituentsType2[5] = MED_SEG2 ;
496 _constituentsType = new medGeometryElement*[2] ;
497 _constituentsType[0]=tmpConstituentsType1 ;
498 _constituentsType[1]=tmpConstituentsType2 ;
502 _name="MED_TETRA10" ;
507 // int _edge1[]={1,2,5} ;
508 // int _edge2[]={2,3,6} ;
509 // int _edge3[]={3,1,7} ;
510 // int _edge4[]={1,4,8} ;
511 // int _edge5[]={2,4,9} ;
512 // int _edge6[]={3,4,10} ;
513 // vector<int> edge1(_edge1,_edge1+3) ;
514 // vector<int> edge2(_edge2,_edge2+3) ;
515 // vector<int> edge3(_edge3,_edge3+3) ;
516 // vector<int> edge4(_edge4,_edge4+3) ;
517 // vector<int> edge5(_edge5,_edge5+3) ;
518 // vector<int> edge6(_edge6,_edge6+3) ;
519 // vector<int> _vector_edge[]={edge1,edge2,edge3,edge4,edge5,edge6};
520 // vector< vector<int> > vector_edge(_vector_edge,_vector_edge+6) ;
521 // int _face1[]={1,2,3,5,6,7} ;
522 // int _face2[]={1,4,2,8,9,5} ;
523 // int _face3[]={2,4,3,9,10,6} ;
524 // int _face4[]={3,4,1,10,8,7} ;
525 // vector<int> face1(_face1,_face1+6) ;
526 // vector<int> face2(_face2,_face2+6) ;
527 // vector<int> face3(_face3,_face3+6) ;
528 // vector<int> face4(_face4,_face4+6) ;
529 // vector<int> _vector_face[] = {face1,face2,face3,face4} ;
530 // vector< vector<int> > vector_face(_vector_face,_vector_face+4) ;
531 // vector< vector<int> > __constituents__[]={vector_face,vector_edge};
532 // vector< vector< vector<int> > > _constituents_(__constituents__,__constituents__+2) ;
533 // _constituents = _constituents_ ;
534 //_constituents={{{1,2,3,5,6,7},{1,4,2,8,9,5},{2,4,3,9,10,6},{3,4,1,10,8,7}},{{1,2,5},{2,3,6},{3,1,7},{1,4,8},{2,4,9},{3,4,10}}} ;
535 _numberOfConstituentsDimension=2 ;
536 _numberOfConstituents=new int[2] ;
537 _numberOfConstituents[0]=4 ;
538 _numberOfConstituents[1]=6 ;
539 _numberOfNodeOfEachConstituent=new (int*)[2] ;
540 _numberOfNodeOfEachConstituent[0]=new (int)[4] ;
541 _numberOfNodeOfEachConstituent[0][0]=6 ;
542 _numberOfNodeOfEachConstituent[0][1]=6 ;
543 _numberOfNodeOfEachConstituent[0][2]=6 ;
544 _numberOfNodeOfEachConstituent[0][3]=6 ;
545 _numberOfNodeOfEachConstituent[1]=new (int)[6] ;
546 _numberOfNodeOfEachConstituent[1][0]=3 ;
547 _numberOfNodeOfEachConstituent[1][1]=3 ;
548 _numberOfNodeOfEachConstituent[1][2]=3 ;
549 _numberOfNodeOfEachConstituent[1][3]=3 ;
550 _numberOfNodeOfEachConstituent[1][4]=3 ;
551 _numberOfNodeOfEachConstituent[1][5]=3 ;
553 int* _face1=new int[6];
560 int* _face2=new int[6];
567 int* _face3=new int[6];
574 int* _face4=new int[6];
581 int* _edge1=new int[3];
585 int* _edge2=new int[3];
589 int* _edge3=new int[3];
593 int* _edge4=new int[3];
597 int* _edge5=new int[3];
601 int* _edge6=new int[3];
605 int ** tmpConstituents1 = new (int*)[4];
606 tmpConstituents1[0]=_face1 ;
607 tmpConstituents1[1]=_face2 ;
608 tmpConstituents1[2]=_face3 ;
609 tmpConstituents1[3]=_face4 ;
610 int ** tmpConstituents2 = new (int*)[6];
611 tmpConstituents2[0]=_edge1 ;
612 tmpConstituents2[1]=_edge2 ;
613 tmpConstituents2[2]=_edge3 ;
614 tmpConstituents2[3]=_edge4 ;
615 tmpConstituents2[4]=_edge5 ;
616 tmpConstituents2[5]=_edge6 ;
617 _constituents = new int**[2] ;
618 _constituents[0]=tmpConstituents1 ;
619 _constituents[1]=tmpConstituents2 ;
620 // vector<medGeometryElement> vector_edge_type(6,MED_SEG3) ;
621 // vector<medGeometryElement> vector_face_type(4,MED_TRIA6) ;
622 // vector<medGeometryElement> __constituents_type[]={vector_face_type,vector_edge_type};
623 // vector< vector<medGeometryElement> > _constituents_type(__constituents_type,__constituents_type+2) ;
624 // _constituentsType = _constituents_type ;
625 //_constituentsType={{MED_TRIA6,MED_TRIA6,MED_TRIA6,MED_TRIA6}{MED_SEG3,MED_SEG3,MED_SEG3,MED_SEG3,MED_SEG3,MED_SEG3}} ;
626 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[4] ;
627 tmpConstituentsType1[0] = MED_TRIA6 ;
628 tmpConstituentsType1[1] = MED_TRIA6 ;
629 tmpConstituentsType1[2] = MED_TRIA6 ;
630 tmpConstituentsType1[3] = MED_TRIA6 ;
631 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[6] ;
632 tmpConstituentsType2[0] = MED_SEG3 ;
633 tmpConstituentsType2[1] = MED_SEG3 ;
634 tmpConstituentsType2[2] = MED_SEG3 ;
635 tmpConstituentsType2[3] = MED_SEG3 ;
636 tmpConstituentsType2[4] = MED_SEG3 ;
637 tmpConstituentsType2[5] = MED_SEG3 ;
638 _constituentsType = new medGeometryElement*[2] ;
639 _constituentsType[0]=tmpConstituentsType1 ;
640 _constituentsType[1]=tmpConstituentsType2 ;
649 // int _edge1[]={1,2} ;
650 // int _edge2[]={2,3} ;
651 // int _edge3[]={3,4} ;
652 // int _edge4[]={4,1} ;
653 // int _edge5[]={5,6} ;
654 // int _edge6[]={6,7} ;
655 // int _edge7[]={7,8} ;
656 // int _edge8[]={8,5} ;
657 // int _edge9[]={1,5} ;
658 // int _edge10[]={2,6} ;
659 // int _edge11[]={3,7} ;
660 // int _edge12[]={4,8} ;
661 // vector<int> edge1(_edge1,_edge1+2) ;
662 // vector<int> edge2(_edge2,_edge2+2) ;
663 // vector<int> edge3(_edge3,_edge3+2) ;
664 // vector<int> edge4(_edge4,_edge4+2) ;
665 // vector<int> edge5(_edge5,_edge5+2) ;
666 // vector<int> edge6(_edge6,_edge6+2) ;
667 // vector<int> edge7(_edge7,_edge7+2) ;
668 // vector<int> edge8(_edge8,_edge8+2) ;
669 // vector<int> edge9(_edge9,_edge9+2) ;
670 // vector<int> edge10(_edge10,_edge10+2) ;
671 // vector<int> edge11(_edge11,_edge11+2) ;
672 // vector<int> edge12(_edge12,_edge12+2) ;
673 // vector<int> _vector_edge[]={edge1,edge2,edge3,edge4,edge5,edge6,edge7,edge8,edge9,edge10,edge11,edge12};
674 // vector< vector<int> > vector_edge(_vector_edge,_vector_edge+12) ;
675 _numberOfConstituentsDimension=2 ;
676 _numberOfConstituents=new int[2] ;
677 _numberOfConstituents[0]=6 ;
678 _numberOfConstituents[1]=12 ;
679 _numberOfNodeOfEachConstituent=new (int*)[2] ;
680 _numberOfNodeOfEachConstituent[0]=new (int)[6] ;
681 _numberOfNodeOfEachConstituent[0][0]=4 ;
682 _numberOfNodeOfEachConstituent[0][1]=4 ;
683 _numberOfNodeOfEachConstituent[0][2]=4 ;
684 _numberOfNodeOfEachConstituent[0][3]=4 ;
685 _numberOfNodeOfEachConstituent[0][4]=4 ;
686 _numberOfNodeOfEachConstituent[0][5]=4 ;
687 _numberOfNodeOfEachConstituent[1]=new (int)[12] ;
688 _numberOfNodeOfEachConstituent[1][0]=2 ;
689 _numberOfNodeOfEachConstituent[1][1]=2 ;
690 _numberOfNodeOfEachConstituent[1][2]=2 ;
691 _numberOfNodeOfEachConstituent[1][3]=2 ;
692 _numberOfNodeOfEachConstituent[1][4]=2 ;
693 _numberOfNodeOfEachConstituent[1][5]=2 ;
694 _numberOfNodeOfEachConstituent[1][6]=2 ;
695 _numberOfNodeOfEachConstituent[1][7]=2 ;
696 _numberOfNodeOfEachConstituent[1][8]=2 ;
697 _numberOfNodeOfEachConstituent[1][9]=2 ;
698 _numberOfNodeOfEachConstituent[1][10]=2 ;
699 _numberOfNodeOfEachConstituent[1][11]=2 ;
701 int* _edge1=new int[2];
704 int* _edge2=new int[2];
707 int* _edge3=new int[2];
710 int* _edge4=new int[2];
713 int* _edge5=new int[2];
716 int* _edge6=new int[2];
719 int* _edge7=new int[2];
722 int* _edge8=new int[2];
725 int* _edge9=new int[2];
728 int* _edge10=new int[2];
731 int* _edge11=new int[2];
734 int* _edge12=new int[2];
737 // int _face1[]={1,2,3,4} ;
738 // int _face2[]={5,8,7,6} ;
739 // int _face3[]={1,5,6,2} ;
740 // int _face4[]={2,6,7,3} ;
741 // int _face5[]={3,7,8,4} ;
742 // int _face6[]={4,8,5,1} ;
743 // vector<int> face1(_face1,_face1+4) ;
744 // vector<int> face2(_face2,_face2+4) ;
745 // vector<int> face3(_face3,_face3+4) ;
746 // vector<int> face4(_face4,_face4+4) ;
747 // vector<int> face5(_face5,_face5+4) ;
748 // vector<int> face6(_face6,_face6+4) ;
749 // vector<int> _vector_face[] = {face1,face2,face3,face4,face5,face6} ;
750 // vector< vector<int> > vector_face(_vector_face,_vector_face+6) ;
751 // vector< vector<int> > __constituents__[]={vector_face,vector_edge};
752 // vector< vector< vector<int> > > _constituents_(__constituents__,__constituents__+2) ;
753 // _constituents = _constituents_ ;
754 int* _face1=new int[4];
759 int* _face2=new int[4];
764 int* _face3=new int[4];
769 int* _face4=new int[4];
774 int* _face5=new int[4];
779 int* _face6=new int[4];
784 int ** tmpConstituents1 = new (int*)[6];
785 tmpConstituents1[0]=_face1 ;
786 tmpConstituents1[1]=_face2 ;
787 tmpConstituents1[2]=_face3 ;
788 tmpConstituents1[3]=_face4 ;
789 tmpConstituents1[4]=_face5 ;
790 tmpConstituents1[5]=_face6 ;
791 int ** tmpConstituents2 = new (int*)[12];
792 tmpConstituents2[0]=_edge1 ;
793 tmpConstituents2[1]=_edge2 ;
794 tmpConstituents2[2]=_edge3 ;
795 tmpConstituents2[3]=_edge4 ;
796 tmpConstituents2[4]=_edge5 ;
797 tmpConstituents2[5]=_edge6 ;
798 tmpConstituents2[6]=_edge7 ;
799 tmpConstituents2[7]=_edge8 ;
800 tmpConstituents2[8]=_edge9 ;
801 tmpConstituents2[9]=_edge10;
802 tmpConstituents2[10]=_edge11;
803 tmpConstituents2[11]=_edge12;
804 _constituents = new int**[2] ;
805 _constituents[0]=tmpConstituents1 ;
806 _constituents[1]=tmpConstituents2 ;
807 // vector<medGeometryElement> vector_edge_type(12,MED_SEG2) ;
808 // vector<medGeometryElement> vector_face_type(6,MED_QUAD4) ;
809 // vector<medGeometryElement> __constituents_type[]={vector_face_type,vector_edge_type};
810 // vector< vector<medGeometryElement> > _constituents_type(__constituents_type,__constituents_type+2);
811 // _constituentsType = _constituents_type ;
812 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[6] ;
813 tmpConstituentsType1[0] = MED_QUAD4 ;
814 tmpConstituentsType1[1] = MED_QUAD4 ;
815 tmpConstituentsType1[2] = MED_QUAD4 ;
816 tmpConstituentsType1[3] = MED_QUAD4 ;
817 tmpConstituentsType1[4] = MED_QUAD4 ;
818 tmpConstituentsType1[5] = MED_QUAD4 ;
819 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[12] ;
820 tmpConstituentsType2[0] = MED_SEG2 ;
821 tmpConstituentsType2[1] = MED_SEG2 ;
822 tmpConstituentsType2[2] = MED_SEG2 ;
823 tmpConstituentsType2[3] = MED_SEG2 ;
824 tmpConstituentsType2[4] = MED_SEG2 ;
825 tmpConstituentsType2[5] = MED_SEG2 ;
826 tmpConstituentsType2[6] = MED_SEG2 ;
827 tmpConstituentsType2[7] = MED_SEG2 ;
828 tmpConstituentsType2[8] = MED_SEG2 ;
829 tmpConstituentsType2[9] = MED_SEG2 ;
830 tmpConstituentsType2[10] = MED_SEG2 ;
831 tmpConstituentsType2[11] = MED_SEG2 ;
832 _constituentsType = new medGeometryElement*[2] ;
833 _constituentsType[0]=tmpConstituentsType1 ;
834 _constituentsType[1]=tmpConstituentsType2 ;
844 // int _edge1[]={1,2,9} ;
845 // int _edge2[]={2,3,10} ;
846 // int _edge3[]={3,4,11} ;
847 // int _edge4[]={4,1,12} ;
848 // int _edge5[]={5,6,13} ;
849 // int _edge6[]={6,7,14};
850 // int _edge7[]={7,8,15} ;
851 // int _edge8[]={8,5,16} ;
852 // int _edge9[]={1,5,17} ;
853 // int _edge10[]={2,6,18} ;
854 // int _edge11[]={3,7,19} ;
855 // int _edge12[]={4,8,20} ;
857 // vector<int> edge1(_edge1,_edge1+3) ;
858 // vector<int> edge2(_edge2,_edge2+3) ;
859 // vector<int> edge3(_edge3,_edge3+3) ;
860 // vector<int> edge4(_edge4,_edge4+3) ;
861 // vector<int> edge5(_edge5,_edge5+3) ;
862 // vector<int> edge6(_edge6,_edge6+3) ;
863 // vector<int> edge7(_edge7,_edge7+3) ;
864 // vector<int> edge8(_edge8,_edge8+3) ;
865 // vector<int> edge9(_edge9,_edge9+3) ;
866 // vector<int> edge10(_edge10,_edge10+3) ;
867 // vector<int> edge11(_edge11,_edge11+3) ;
868 // vector<int> edge12(_edge12,_edge12+3) ;
869 // vector<int> _vector_edge[]={edge1,edge2,edge3,edge4,edge5,edge6,edge7,edge8,edge9,edge10, edge11,edge12};
870 // vector< vector<int> > vector_edge(_vector_edge,_vector_edge+12) ;
872 // int _face1[]={1,2,3,4,9,10,11,12} ;
873 // int _face2[]={5,8,7,6,16,15,14,13} ;
874 // int _face3[]={1,5,6,2,17,13,18,9} ;
875 // int _face4[]={2,6,7,3,18,14,19,10} ;
876 // int _face5[]={3,7,8,4,19,15,20,11} ;
877 // int _face6[]={4,8,5,1,20,16,17,12} ;
878 // vector<int> face1(_face1,_face1+8);
879 // vector<int> face2(_face2,_face2+8);
880 // vector<int> face3(_face3,_face3+8);
881 // vector<int> face4(_face4,_face4+8);
882 // vector<int> face5(_face5,_face5+8);
883 // vector<int> face6(_face6,_face6+8);
884 // vector<int> _vector_face[]= {face1,face2,face3,face4,face5,face6} ;
885 // vector< vector<int> > vector_face(_vector_face,_vector_face+6);
887 // vector< vector<int> > __constituents__[]={vector_face,vector_edge};
888 // vector< vector< vector<int> > > _constituents_(__constituents__,__constituents__+2) ;
889 // _constituents = _constituents_ ;
890 _numberOfConstituentsDimension=2 ;
891 _numberOfConstituents=new int[2] ;
892 _numberOfConstituents[0]=6 ;
893 _numberOfConstituents[1]=12 ;
894 _numberOfNodeOfEachConstituent=new (int*)[2] ;
895 _numberOfNodeOfEachConstituent[0]=new (int)[6] ;
896 _numberOfNodeOfEachConstituent[0][0]=8 ;
897 _numberOfNodeOfEachConstituent[0][1]=8 ;
898 _numberOfNodeOfEachConstituent[0][2]=8 ;
899 _numberOfNodeOfEachConstituent[0][3]=8 ;
900 _numberOfNodeOfEachConstituent[0][4]=8 ;
901 _numberOfNodeOfEachConstituent[0][5]=8 ;
902 _numberOfNodeOfEachConstituent[1]=new (int)[12] ;
903 _numberOfNodeOfEachConstituent[1][0]=3 ;
904 _numberOfNodeOfEachConstituent[1][1]=3 ;
905 _numberOfNodeOfEachConstituent[1][2]=3 ;
906 _numberOfNodeOfEachConstituent[1][3]=3 ;
907 _numberOfNodeOfEachConstituent[1][4]=3 ;
908 _numberOfNodeOfEachConstituent[1][5]=3 ;
909 _numberOfNodeOfEachConstituent[1][6]=3 ;
910 _numberOfNodeOfEachConstituent[1][7]=3 ;
911 _numberOfNodeOfEachConstituent[1][8]=3 ;
912 _numberOfNodeOfEachConstituent[1][9]=3 ;
913 _numberOfNodeOfEachConstituent[1][10]=3 ;
914 _numberOfNodeOfEachConstituent[1][11]=3 ;
916 int* _edge1=new int[3];
920 int* _edge2=new int[3];
924 int* _edge3=new int[3];
928 int* _edge4=new int[3];
932 int* _edge5=new int[3];
936 int* _edge6=new int[3];
940 int* _edge7=new int[3];
944 int* _edge8=new int[3];
948 int* _edge9=new int[3];
952 int* _edge10=new int[3];
956 int* _edge11=new int[3];
960 int* _edge12=new int[3];
964 int* _face1=new int[8];
973 int* _face2=new int[8];
982 int* _face3=new int[8];
991 int* _face4=new int[8];
1000 int* _face5=new int[8];
1009 int* _face6=new int[8];
1018 int ** tmpConstituents1 = new (int*)[6];
1019 tmpConstituents1[0]=_face1 ;
1020 tmpConstituents1[1]=_face2 ;
1021 tmpConstituents1[2]=_face3 ;
1022 tmpConstituents1[3]=_face4 ;
1023 tmpConstituents1[4]=_face5 ;
1024 tmpConstituents1[5]=_face6 ;
1025 int ** tmpConstituents2 = new (int*)[12];
1026 tmpConstituents2[0]=_edge1 ;
1027 tmpConstituents2[1]=_edge2 ;
1028 tmpConstituents2[2]=_edge3 ;
1029 tmpConstituents2[3]=_edge4 ;
1030 tmpConstituents2[4]=_edge5 ;
1031 tmpConstituents2[5]=_edge6 ;
1032 tmpConstituents2[6]=_edge7 ;
1033 tmpConstituents2[7]=_edge8 ;
1034 tmpConstituents2[8]=_edge9 ;
1035 tmpConstituents2[9]=_edge10;
1036 tmpConstituents2[10]=_edge11;
1037 tmpConstituents2[11]=_edge12;
1038 _constituents = new int**[2] ;
1039 _constituents[0]=tmpConstituents1 ;
1040 _constituents[1]=tmpConstituents2 ;
1041 // vector<medGeometryElement> vector_edge_type(12,MED_SEG3) ;
1042 // vector<medGeometryElement> vector_face_type(6,MED_QUAD8) ;
1043 // vector<medGeometryElement> __constituents_type[]={vector_face_type,vector_edge_type};
1044 // vector< vector<medGeometryElement> > _constituents_type(__constituents_type,__constituents_type+2) ;
1045 // _constituentsType = _constituents_type ;
1046 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[6] ;
1047 tmpConstituentsType1[0] = MED_QUAD8 ;
1048 tmpConstituentsType1[1] = MED_QUAD8 ;
1049 tmpConstituentsType1[2] = MED_QUAD8 ;
1050 tmpConstituentsType1[3] = MED_QUAD8 ;
1051 tmpConstituentsType1[4] = MED_QUAD8 ;
1052 tmpConstituentsType1[5] = MED_QUAD8 ;
1053 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[12] ;
1054 tmpConstituentsType2[0] = MED_SEG3 ;
1055 tmpConstituentsType2[1] = MED_SEG3 ;
1056 tmpConstituentsType2[2] = MED_SEG3 ;
1057 tmpConstituentsType2[3] = MED_SEG3 ;
1058 tmpConstituentsType2[4] = MED_SEG3 ;
1059 tmpConstituentsType2[5] = MED_SEG3 ;
1060 tmpConstituentsType2[6] = MED_SEG3 ;
1061 tmpConstituentsType2[7] = MED_SEG3 ;
1062 tmpConstituentsType2[8] = MED_SEG3 ;
1063 tmpConstituentsType2[9] = MED_SEG3 ;
1064 tmpConstituentsType2[10] = MED_SEG3 ;
1065 tmpConstituentsType2[11] = MED_SEG3 ;
1066 _constituentsType = new medGeometryElement*[2] ;
1067 _constituentsType[0]=tmpConstituentsType1 ;
1068 _constituentsType[1]=tmpConstituentsType2 ;
1072 _name="MED_PENTA6" ;
1075 _numberOfVertexes=6;
1078 // int _edge1[]= {1,2} ;
1079 // int _edge2[]= {2,3} ;
1080 // int _edge3[]= {3,1} ;
1081 // int _edge4[]= {4,5} ;
1082 // int _edge5[]= {5,6} ;
1083 // int _edge6[]= {6,4} ;
1084 // int _edge7[]= {1,4} ;
1085 // int _edge8[]= {2,5} ;
1086 // int _edge9[]= {3,6} ;
1088 // vector<int> edge1(_edge1,_edge1+2) ;
1089 // vector<int> edge2(_edge2,_edge2+2) ;
1090 // vector<int> edge3(_edge3,_edge3+2) ;
1091 // vector<int> edge4(_edge4,_edge4+2) ;
1092 // vector<int> edge5(_edge5,_edge5+2) ;
1093 // vector<int> edge6(_edge6,_edge6+2) ;
1094 // vector<int> edge7(_edge7,_edge7+2) ;
1095 // vector<int> edge8(_edge8,_edge8+2) ;
1096 // vector<int> edge9(_edge9,_edge9+2) ;
1097 // vector<int> _vector_edge[]={edge1,edge2,edge3,edge4,edge5,edge6,edge7,edge8,edge9};
1098 // vector< vector<int> > vector_edge(_vector_edge,_vector_edge+9) ;
1100 // int _face1[]={1,2,3};
1101 // int _face2[]={4,6,5};
1102 // int _face3[]={1,4,5,2};
1103 // int _face4[]={2,5,6,3};
1104 // int _face5[]={3,6,4,1};
1105 // vector<int> face1(_face1,_face1+3);
1106 // vector<int> face2(_face2,_face2+3);
1107 // vector<int> face3(_face3,_face3+4);
1108 // vector<int> face4(_face4,_face4+4);
1109 // vector<int> face5(_face5,_face5+4);
1110 // vector<int> _vector_face[]= {face1,face2,face3,face4,face5} ;
1111 // vector< vector<int> > vector_face(_vector_face,_vector_face+5);
1113 // vector< vector<int> > __constituents__[]={vector_face,vector_edge};
1114 // vector< vector< vector<int> > > _constituents_(__constituents__,__constituents__+2) ;
1115 // _constituents = _constituents_ ;
1116 _numberOfConstituentsDimension=2 ;
1117 _numberOfConstituents=new int[2] ;
1118 _numberOfConstituents[0]=5 ;
1119 _numberOfConstituents[1]=9 ;
1120 _numberOfNodeOfEachConstituent=new (int*)[2] ;
1121 _numberOfNodeOfEachConstituent[0]=new (int)[5] ;
1122 _numberOfNodeOfEachConstituent[0][0]=3 ;
1123 _numberOfNodeOfEachConstituent[0][1]=3 ;
1124 _numberOfNodeOfEachConstituent[0][2]=4 ;
1125 _numberOfNodeOfEachConstituent[0][3]=4 ;
1126 _numberOfNodeOfEachConstituent[0][4]=4 ;
1127 _numberOfNodeOfEachConstituent[1]=new (int)[9] ;
1128 _numberOfNodeOfEachConstituent[1][0]=2 ;
1129 _numberOfNodeOfEachConstituent[1][1]=2 ;
1130 _numberOfNodeOfEachConstituent[1][2]=2 ;
1131 _numberOfNodeOfEachConstituent[1][3]=2 ;
1132 _numberOfNodeOfEachConstituent[1][4]=2 ;
1133 _numberOfNodeOfEachConstituent[1][5]=2 ;
1134 _numberOfNodeOfEachConstituent[1][6]=2 ;
1135 _numberOfNodeOfEachConstituent[1][7]=2 ;
1136 _numberOfNodeOfEachConstituent[1][8]=2 ;
1138 int* _edge1=new int[2];
1141 int* _edge2=new int[2];
1144 int* _edge3=new int[2];
1147 int* _edge4=new int[2];
1150 int* _edge5=new int[2];
1153 int* _edge6=new int[2];
1156 int* _edge7=new int[2];
1159 int* _edge8=new int[2];
1162 int* _edge9=new int[2];
1165 int* _face1=new int[3];
1169 int* _face2=new int[3];
1173 int* _face3=new int[4];
1178 int* _face4=new int[4];
1183 int* _face5=new int[4];
1188 int ** tmpConstituents1 = new (int*)[5];
1189 tmpConstituents1[0]=_face1 ;
1190 tmpConstituents1[1]=_face2 ;
1191 tmpConstituents1[2]=_face3 ;
1192 tmpConstituents1[3]=_face4 ;
1193 tmpConstituents1[4]=_face5 ;
1194 int ** tmpConstituents2 = new (int*)[9];
1195 tmpConstituents2[0]=_edge1 ;
1196 tmpConstituents2[1]=_edge2 ;
1197 tmpConstituents2[2]=_edge3 ;
1198 tmpConstituents2[3]=_edge4 ;
1199 tmpConstituents2[4]=_edge5 ;
1200 tmpConstituents2[5]=_edge6 ;
1201 tmpConstituents2[6]=_edge7 ;
1202 tmpConstituents2[7]=_edge8 ;
1203 tmpConstituents2[8]=_edge9 ;
1204 _constituents = new int**[2] ;
1205 _constituents[0]=tmpConstituents1 ;
1206 _constituents[1]=tmpConstituents2 ;
1207 // vector<medGeometryElement> vector_edge_type(9,MED_SEG2) ;
1208 // vector<medGeometryElement> vector_face_type(5,MED_QUAD4) ;
1209 // vector_face_type[0]=MED_TRIA3 ;
1210 // vector_face_type[1]=MED_TRIA3 ;
1211 // vector<medGeometryElement> __constituents_type[]={vector_face_type,vector_edge_type};
1212 // vector< vector<medGeometryElement> > _constituents_type(__constituents_type,__constituents_type+2) ;
1213 // _constituentsType = _constituents_type ;
1214 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[5] ;
1215 tmpConstituentsType1[0] = MED_TRIA3 ;
1216 tmpConstituentsType1[1] = MED_TRIA3 ;
1217 tmpConstituentsType1[2] = MED_QUAD4 ;
1218 tmpConstituentsType1[3] = MED_QUAD4 ;
1219 tmpConstituentsType1[4] = MED_QUAD4 ;
1220 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[9] ;
1221 tmpConstituentsType2[0] = MED_SEG2 ;
1222 tmpConstituentsType2[1] = MED_SEG2 ;
1223 tmpConstituentsType2[2] = MED_SEG2 ;
1224 tmpConstituentsType2[3] = MED_SEG2 ;
1225 tmpConstituentsType2[4] = MED_SEG2 ;
1226 tmpConstituentsType2[5] = MED_SEG2 ;
1227 tmpConstituentsType2[6] = MED_SEG2 ;
1228 tmpConstituentsType2[7] = MED_SEG2 ;
1229 tmpConstituentsType2[8] = MED_SEG2 ;
1230 _constituentsType = new medGeometryElement*[2] ;
1231 _constituentsType[0]=tmpConstituentsType1 ;
1232 _constituentsType[1]=tmpConstituentsType2 ;
1235 case MED_PENTA15 : {
1236 _name="MED_PENTA15" ;
1239 _numberOfVertexes=6;
1241 // int _edge1[]={1,2,7} ;
1242 // int _edge2[]={2,3,8} ;
1243 // int _edge3[]={3,1,9} ;
1244 // int _edge4[]={4,5,10} ;
1245 // int _edge5[]={5,6,11} ;
1246 // int _edge6[]={6,4,12} ;
1247 // int _edge7[]={1,4,13} ;
1248 // int _edge8[]={2,5,14} ;
1249 // int _edge9[]={3,6,15} ;
1251 // vector<int> edge1(_edge1,_edge1+3) ;
1252 // vector<int> edge2(_edge2,_edge2+3) ;
1253 // vector<int> edge3(_edge3,_edge3+3) ;
1254 // vector<int> edge4(_edge4,_edge4+3) ;
1255 // vector<int> edge5(_edge5,_edge5+3) ;
1256 // vector<int> edge6(_edge6,_edge6+3) ;
1257 // vector<int> edge7(_edge7,_edge7+3) ;
1258 // vector<int> edge8(_edge8,_edge8+3) ;
1259 // vector<int> edge9(_edge9,_edge9+3) ;
1260 // vector<int> _vector_edge[]={edge1,edge2,edge3,edge4,edge5,edge6,edge7,edge8,edge9};
1261 // vector< vector<int> > vector_edge(_vector_edge,_vector_edge+9) ;
1263 // int _face1[]={1,2,3,7,8,9};
1264 // int _face2[]={4,6,5,12,11,10};
1265 // int _face3[]={1,4,5,2,13,10,14,7};
1266 // int _face4[]={2,5,6,3,14,11,15,8};
1267 // int _face5[]={3,6,4,1,15,12,13,9};
1268 // vector<int> face1(_face1,_face1+6);
1269 // vector<int> face2(_face2,_face2+6);
1270 // vector<int> face3(_face3,_face3+8);
1271 // vector<int> face4(_face4,_face4+8);
1272 // vector<int> face5(_face5,_face5+8);
1273 // vector<int> _vector_face[]= {face1,face2,face3,face4,face5} ;
1274 // vector< vector<int> > vector_face(_vector_face,_vector_face+5);
1276 // vector< vector<int> > __constituents__[]={vector_face,vector_edge};
1277 // vector< vector< vector<int> > > _constituents_(__constituents__,__constituents__+2) ;
1278 // _constituents = _constituents_ ;
1279 _numberOfConstituentsDimension=2 ;
1280 _numberOfConstituents=new int[2] ;
1281 _numberOfConstituents[0]=5 ;
1282 _numberOfConstituents[1]=9 ;
1283 _numberOfNodeOfEachConstituent=new (int*)[2] ;
1284 _numberOfNodeOfEachConstituent[0]=new (int)[5] ;
1285 _numberOfNodeOfEachConstituent[0][0]=6 ;
1286 _numberOfNodeOfEachConstituent[0][1]=6 ;
1287 _numberOfNodeOfEachConstituent[0][2]=8 ;
1288 _numberOfNodeOfEachConstituent[0][3]=8 ;
1289 _numberOfNodeOfEachConstituent[0][4]=8 ;
1290 _numberOfNodeOfEachConstituent[1]=new (int)[9] ;
1291 _numberOfNodeOfEachConstituent[1][0]=3 ;
1292 _numberOfNodeOfEachConstituent[1][1]=3 ;
1293 _numberOfNodeOfEachConstituent[1][2]=3 ;
1294 _numberOfNodeOfEachConstituent[1][3]=3 ;
1295 _numberOfNodeOfEachConstituent[1][4]=3 ;
1296 _numberOfNodeOfEachConstituent[1][5]=3 ;
1297 _numberOfNodeOfEachConstituent[1][6]=3 ;
1298 _numberOfNodeOfEachConstituent[1][7]=3 ;
1299 _numberOfNodeOfEachConstituent[1][8]=3 ;
1301 int* _edge1=new int[3];
1305 int* _edge2=new int[3];
1309 int* _edge3=new int[3];
1313 int* _edge4=new int[3];
1317 int* _edge5=new int[3];
1321 int* _edge6=new int[3];
1325 int* _edge7=new int[3];
1329 int* _edge8=new int[3];
1333 int* _edge9=new int[3];
1337 int* _face1=new int[6];
1344 int* _face2=new int[6];
1351 int* _face3=new int[8];
1360 int* _face4=new int[8];
1369 int* _face5=new int[8];
1378 int ** tmpConstituents1 = new (int*)[5];
1379 tmpConstituents1[0]=_face1 ;
1380 tmpConstituents1[1]=_face2 ;
1381 tmpConstituents1[2]=_face3 ;
1382 tmpConstituents1[3]=_face4 ;
1383 tmpConstituents1[4]=_face5 ;
1384 int ** tmpConstituents2 = new (int*)[9];
1385 tmpConstituents2[0]=_edge1 ;
1386 tmpConstituents2[1]=_edge2 ;
1387 tmpConstituents2[2]=_edge3 ;
1388 tmpConstituents2[3]=_edge4 ;
1389 tmpConstituents2[4]=_edge5 ;
1390 tmpConstituents2[5]=_edge6 ;
1391 tmpConstituents2[6]=_edge7 ;
1392 tmpConstituents2[7]=_edge8 ;
1393 tmpConstituents2[8]=_edge9 ;
1394 _constituents = new (int**)[2] ;
1395 _constituents[0]=tmpConstituents1 ;
1396 _constituents[1]=tmpConstituents2 ;
1397 // vector<medGeometryElement> vector_edge_type(9,MED_SEG3) ;
1398 // vector<medGeometryElement> vector_face_type(5,MED_QUAD8) ;
1399 // vector_face_type[0]=MED_TRIA6 ;
1400 // vector_face_type[1]=MED_TRIA6 ;
1401 // vector<medGeometryElement> __constituents_type[]={vector_face_type,vector_edge_type};
1402 // vector< vector<medGeometryElement> > _constituents_type(__constituents_type,__constituents_type+2) ;
1403 // _constituentsType = _constituents_type ;
1404 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[5] ;
1405 tmpConstituentsType1[0] = MED_TRIA6 ;
1406 tmpConstituentsType1[1] = MED_TRIA6 ;
1407 tmpConstituentsType1[2] = MED_QUAD8 ;
1408 tmpConstituentsType1[3] = MED_QUAD8 ;
1409 tmpConstituentsType1[4] = MED_QUAD8 ;
1410 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[9] ;
1411 tmpConstituentsType2[0] = MED_SEG3 ;
1412 tmpConstituentsType2[1] = MED_SEG3 ;
1413 tmpConstituentsType2[2] = MED_SEG3 ;
1414 tmpConstituentsType2[3] = MED_SEG3 ;
1415 tmpConstituentsType2[4] = MED_SEG3 ;
1416 tmpConstituentsType2[5] = MED_SEG3 ;
1417 tmpConstituentsType2[6] = MED_SEG3 ;
1418 tmpConstituentsType2[7] = MED_SEG3 ;
1419 tmpConstituentsType2[8] = MED_SEG3 ;
1420 _constituentsType = new (medGeometryElement*)[2] ;
1421 _constituentsType[0]=tmpConstituentsType1 ;
1422 _constituentsType[1]=tmpConstituentsType2 ;
1429 _numberOfVertexes=5;
1431 // int _edge1[]={1,2} ;
1432 // int _edge2[]={2,3} ;
1433 // int _edge3[]={3,4} ;
1434 // int _edge4[]={4,1} ;
1435 // int _edge5[]={1,5} ;
1436 // int _edge6[]={2,5} ;
1437 // int _edge7[]={3,5} ;
1438 // int _edge8[]={4,5} ;
1440 // vector<int> edge1(_edge1,_edge1+2) ;
1441 // vector<int> edge2(_edge2,_edge2+2) ;
1442 // vector<int> edge3(_edge3,_edge3+2) ;
1443 // vector<int> edge4(_edge4,_edge4+2) ;
1444 // vector<int> edge5(_edge5,_edge5+2) ;
1445 // vector<int> edge6(_edge6,_edge6+2) ;
1446 // vector<int> edge7(_edge7,_edge7+2) ;
1447 // vector<int> edge8(_edge8,_edge8+2) ;
1448 // vector<int> _vector_edge[]={edge1,edge2,edge3,edge4,edge5,edge6,edge7,edge8};
1449 // vector< vector<int> > vector_edge(_vector_edge,_vector_edge+8) ;
1451 // int _face1[]={1,2,3,4} ;
1452 // int _face2[]={1,5,2} ;
1453 // int _face3[]={2,5,3} ;
1454 // int _face4[]={3,5,4} ;
1455 // int _face5[]={4,5,1} ;
1456 // vector<int> face1(_face1,_face1+4);
1457 // vector<int> face2(_face2,_face2+3);
1458 // vector<int> face3(_face3,_face3+3);
1459 // vector<int> face4(_face4,_face4+3);
1460 // vector<int> face5(_face5,_face5+3);
1461 // vector<int> _vector_face[]= {face1,face2,face3,face4,face5} ;
1462 // vector< vector<int> > vector_face(_vector_face,_vector_face+5);
1464 // vector< vector<int> > __constituents__[]={vector_face,vector_edge};
1465 // vector< vector< vector<int> > > _constituents_(__constituents__,__constituents__+2) ;
1466 // _constituents = _constituents_ ;
1467 _numberOfConstituentsDimension=2 ;
1468 _numberOfConstituents=new int[2] ;
1469 _numberOfConstituents[0]=5 ;
1470 _numberOfConstituents[1]=8 ;
1471 _numberOfNodeOfEachConstituent=new (int*)[2] ;
1472 _numberOfNodeOfEachConstituent[0]=new (int)[5] ;
1473 _numberOfNodeOfEachConstituent[0][0]=4 ;
1474 _numberOfNodeOfEachConstituent[0][1]=3 ;
1475 _numberOfNodeOfEachConstituent[0][2]=3 ;
1476 _numberOfNodeOfEachConstituent[0][3]=3 ;
1477 _numberOfNodeOfEachConstituent[0][4]=3 ;
1478 _numberOfNodeOfEachConstituent[1]=new (int)[8] ;
1479 _numberOfNodeOfEachConstituent[1][0]=2 ;
1480 _numberOfNodeOfEachConstituent[1][1]=2 ;
1481 _numberOfNodeOfEachConstituent[1][2]=2 ;
1482 _numberOfNodeOfEachConstituent[1][3]=2 ;
1483 _numberOfNodeOfEachConstituent[1][4]=2 ;
1484 _numberOfNodeOfEachConstituent[1][5]=2 ;
1485 _numberOfNodeOfEachConstituent[1][6]=2 ;
1486 _numberOfNodeOfEachConstituent[1][7]=2 ;
1488 int* _edge1=new int[2];
1491 int* _edge2=new int[2];
1494 int* _edge3=new int[2];
1497 int* _edge4=new int[2];
1500 int* _edge5=new int[2];
1503 int* _edge6=new int[2];
1506 int* _edge7=new int[2];
1509 int* _edge8=new int[2];
1512 int* _face1=new int[4];
1517 int* _face2=new int[3];
1521 int* _face3=new int[3];
1525 int* _face4=new int[3];
1529 int* _face5=new int[3];
1533 int ** tmpConstituents1 = new (int*)[5];
1534 tmpConstituents1[0]=_face1 ;
1535 tmpConstituents1[1]=_face2 ;
1536 tmpConstituents1[2]=_face3 ;
1537 tmpConstituents1[3]=_face4 ;
1538 tmpConstituents1[4]=_face5 ;
1539 int ** tmpConstituents2 = new (int*)[8];
1540 tmpConstituents2[0]=_edge1 ;
1541 tmpConstituents2[1]=_edge2 ;
1542 tmpConstituents2[2]=_edge3 ;
1543 tmpConstituents2[3]=_edge4 ;
1544 tmpConstituents2[4]=_edge5 ;
1545 tmpConstituents2[5]=_edge6 ;
1546 tmpConstituents2[6]=_edge7 ;
1547 tmpConstituents2[7]=_edge8 ;
1548 _constituents = new int**[2] ;
1549 _constituents[0]=tmpConstituents1 ;
1550 _constituents[1]=tmpConstituents2 ;
1551 // vector<medGeometryElement> vector_edge_type(8,MED_SEG2) ;
1552 // vector<medGeometryElement> vector_face_type(5,MED_TRIA3) ;
1553 // vector_face_type[0]=MED_QUAD4 ;
1554 // vector<medGeometryElement> __constituents_type[]={vector_face_type,vector_edge_type};
1555 // vector< vector<medGeometryElement> > _constituents_type(__constituents_type,__constituents_type+2) ;
1556 // _constituentsType = _constituents_type ;
1557 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[5] ;
1558 tmpConstituentsType1[0] = MED_QUAD4 ;
1559 tmpConstituentsType1[1] = MED_TRIA3 ;
1560 tmpConstituentsType1[2] = MED_TRIA3 ;
1561 tmpConstituentsType1[3] = MED_TRIA3 ;
1562 tmpConstituentsType1[4] = MED_TRIA3 ;
1563 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[8] ;
1564 tmpConstituentsType2[0] = MED_SEG2 ;
1565 tmpConstituentsType2[1] = MED_SEG2 ;
1566 tmpConstituentsType2[2] = MED_SEG2 ;
1567 tmpConstituentsType2[3] = MED_SEG2 ;
1568 tmpConstituentsType2[4] = MED_SEG2 ;
1569 tmpConstituentsType2[5] = MED_SEG2 ;
1570 tmpConstituentsType2[6] = MED_SEG2 ;
1571 tmpConstituentsType2[7] = MED_SEG2 ;
1572 _constituentsType = new medGeometryElement*[2] ;
1573 _constituentsType[0]=tmpConstituentsType1 ;
1574 _constituentsType[1]=tmpConstituentsType2 ;
1578 _name="MED_PYRA13" ;
1581 _numberOfVertexes=5;
1583 // int _edge1[]={1,2,6} ;
1584 // int _edge2[]={2,3,7} ;
1585 // int _edge3[]={3,4,8} ;
1586 // int _edge4[]={4,1,9} ;
1587 // int _edge5[]={1,5,10} ;
1588 // int _edge6[]={2,5,11} ;
1589 // int _edge7[]={3,5,12} ;
1590 // int _edge8[]={4,5,13} ;
1592 // vector<int> edge1(_edge1,_edge1+3) ;
1593 // vector<int> edge2(_edge2,_edge2+3) ;
1594 // vector<int> edge3(_edge3,_edge3+3) ;
1595 // vector<int> edge4(_edge4,_edge4+3) ;
1596 // vector<int> edge5(_edge5,_edge5+3) ;
1597 // vector<int> edge6(_edge6,_edge6+3) ;
1598 // vector<int> edge7(_edge7,_edge7+3) ;
1599 // vector<int> edge8(_edge8,_edge8+3) ;
1602 // vector<int> _vector_edge[]={edge1,edge2,edge3,edge4,edge5,edge6,edge7,edge8};
1603 // vector< vector<int> > vector_edge(_vector_edge,_vector_edge+8) ;
1605 // int _face1[]={1,2,3,4,6,7,8,9} ;
1606 // int _face2[]={1,5,2,10,11,6} ;
1607 // int _face3[]={2,5,3,11,12,7} ;
1608 // int _face4[]={3,5,4,12,13,8} ;
1609 // int _face5[]={4,5,1,13,10,9} ;
1610 // vector<int> face1(_face1,_face1+8);
1611 // vector<int> face2(_face2,_face2+6);
1612 // vector<int> face3(_face3,_face3+6);
1613 // vector<int> face4(_face4,_face4+6);
1614 // vector<int> face5(_face5,_face5+6);
1615 // vector<int> _vector_face[]= {face1,face2,face3,face4,face5} ;
1616 // vector< vector<int> > vector_face(_vector_face,_vector_face+5);
1619 // vector< vector<int> > __constituents__[]={vector_face,vector_edge};
1620 // vector< vector< vector<int> > > _constituents_(__constituents__,__constituents__+2) ;
1621 // _constituents = _constituents_ ;
1622 _numberOfConstituentsDimension=2 ;
1623 _numberOfConstituents=new int[2] ;
1624 _numberOfConstituents[0]=5 ;
1625 _numberOfConstituents[1]=8 ;
1626 _numberOfNodeOfEachConstituent=new (int*)[2] ;
1627 _numberOfNodeOfEachConstituent[0]=new (int)[5] ;
1628 _numberOfNodeOfEachConstituent[0][0]=8 ;
1629 _numberOfNodeOfEachConstituent[0][1]=6 ;
1630 _numberOfNodeOfEachConstituent[0][2]=6 ;
1631 _numberOfNodeOfEachConstituent[0][3]=6 ;
1632 _numberOfNodeOfEachConstituent[0][4]=6 ;
1633 _numberOfNodeOfEachConstituent[1]=new (int)[8] ;
1634 _numberOfNodeOfEachConstituent[1][0]=3 ;
1635 _numberOfNodeOfEachConstituent[1][1]=3 ;
1636 _numberOfNodeOfEachConstituent[1][2]=3 ;
1637 _numberOfNodeOfEachConstituent[1][3]=3 ;
1638 _numberOfNodeOfEachConstituent[1][4]=3 ;
1639 _numberOfNodeOfEachConstituent[1][5]=3 ;
1640 _numberOfNodeOfEachConstituent[1][6]=3 ;
1641 _numberOfNodeOfEachConstituent[1][7]=3 ;
1643 int* _edge1=new int[3];
1647 int* _edge2=new int[3];
1651 int* _edge3=new int[3];
1655 int* _edge4=new int[3];
1659 int* _edge5=new int[3];
1663 int* _edge6=new int[3];
1667 int* _edge7=new int[3];
1671 int* _edge8=new int[3];
1675 int* _face1=new int[8];
1684 int* _face2=new int[6];
1691 int* _face3=new int[6];
1698 int* _face4=new int[6];
1705 int* _face5=new int[6];
1712 int ** tmpConstituents1 = new (int*)[5];
1713 tmpConstituents1[0]=_face1 ;
1714 tmpConstituents1[1]=_face2 ;
1715 tmpConstituents1[2]=_face3 ;
1716 tmpConstituents1[3]=_face4 ;
1717 tmpConstituents1[4]=_face5 ;
1718 int ** tmpConstituents2 = new (int*)[8];
1719 tmpConstituents2[0]=_edge1 ;
1720 tmpConstituents2[1]=_edge2 ;
1721 tmpConstituents2[2]=_edge3 ;
1722 tmpConstituents2[3]=_edge4 ;
1723 tmpConstituents2[4]=_edge5 ;
1724 tmpConstituents2[5]=_edge6 ;
1725 tmpConstituents2[6]=_edge7 ;
1726 tmpConstituents2[7]=_edge8 ;
1727 _constituents = new int**[2] ;
1728 _constituents[0]=tmpConstituents1 ;
1729 _constituents[1]=tmpConstituents2 ;
1730 // vector<medGeometryElement> vector_edge_type(8,MED_SEG3) ;
1731 // vector<medGeometryElement> vector_face_type(5,MED_TRIA6) ;
1732 // vector_face_type[0]=MED_QUAD8 ;
1733 // vector<medGeometryElement> __constituents_type[]={vector_face_type,vector_edge_type};
1734 // vector< vector<medGeometryElement> > _constituents_type(__constituents_type,__constituents_type+2) ;
1736 // _constituentsType = _constituents_type ;
1737 medGeometryElement * tmpConstituentsType1 = new medGeometryElement[5] ;
1738 tmpConstituentsType1[0] = MED_QUAD8 ;
1739 tmpConstituentsType1[1] = MED_TRIA6 ;
1740 tmpConstituentsType1[2] = MED_TRIA6 ;
1741 tmpConstituentsType1[3] = MED_TRIA6 ;
1742 tmpConstituentsType1[4] = MED_TRIA6 ;
1743 medGeometryElement * tmpConstituentsType2 = new medGeometryElement[8] ;
1744 tmpConstituentsType2[0] = MED_SEG3 ;
1745 tmpConstituentsType2[1] = MED_SEG3 ;
1746 tmpConstituentsType2[2] = MED_SEG3 ;
1747 tmpConstituentsType2[3] = MED_SEG3 ;
1748 tmpConstituentsType2[4] = MED_SEG3 ;
1749 tmpConstituentsType2[5] = MED_SEG3 ;
1750 tmpConstituentsType2[6] = MED_SEG3 ;
1751 tmpConstituentsType2[7] = MED_SEG3 ;
1752 _constituentsType = new medGeometryElement*[2] ;
1753 _constituentsType[0]=tmpConstituentsType1 ;
1754 _constituentsType[1]=tmpConstituentsType2 ;
1763 ostream & operator<<(ostream &os,const CELLMODEL &my)
1765 os << "Cell Model :" << endl ;
1766 os << " - name : " << my._name << endl;
1767 os << " - type : " << (int)my._type << endl;
1768 os << " - dimension : " << my._dimension << endl;
1769 os << " - number of nodes : " << my._numberOfNodes << endl ;
1770 os << " - number of vertexes : " << my._numberOfVertexes << endl ;
1772 os << " - number of Constituents Dimension : " << my._numberOfConstituentsDimension << endl ;
1774 for(int i=0;i<my._numberOfConstituentsDimension;i++)
1777 os << " - for dimension (-" << i+1 << ") : " << endl ;
1778 os << " - number of Constituents for this Dimension : " << my._numberOfConstituents[i] << endl ;
1780 for(int j=0;j<my._numberOfConstituents[i];j++)
1782 os << " - number of node for this constituent : " << my._numberOfNodeOfEachConstituent[i][j] << endl ;
1783 os << " - constituents " << j+1 << " of type "<< my._constituentsType[i][j] <<" : " ;
1784 for(int k=0;k<my._numberOfNodeOfEachConstituent[i][j];k++)
1785 os << my._constituents[i][j][k] << " " ;
1792 // Return number of constituents type (which dimension is _dimension-1).
1793 int CELLMODEL::getNumberOfConstituentsType() const
1795 set<medGeometryElement> constituentsTypes ;
1796 // if (_constituentsType.size() > 0 ) {
1797 // vector<medGeometryElement> constituentsType = _constituentsType[0] ;
1798 // vector<medGeometryElement>::iterator itvec ;
1799 // for(itvec=constituentsType.begin();itvec!=constituentsType.end();itvec++)
1800 // constituentsTypes.insert(*itvec);
1802 return constituentsTypes.size() ;
1805 // Return all types of constituents which dimension is (_dimension-1).
1806 set<medGeometryElement> CELLMODEL::getAllConstituentsType() const
1808 set<medGeometryElement> constituentsTypes ;
1809 // if (_constituentsType.size() > 0 ) {
1810 // vector<medGeometryElement> constituentsType = _constituentsType[0] ;
1811 // vector<medGeometryElement>::iterator itvec ;
1812 // for(itvec=constituentsType.begin();itvec!=constituentsType.end();itvec++)
1813 // constituentsTypes.insert(*itvec);
1815 return constituentsTypes ;
1818 // Return number of constituents foreach type (which dimension is _dimension-1).
1819 map<medGeometryElement,int> CELLMODEL::getNumberOfConstituentsForeachType() const
1821 map<medGeometryElement,int> numberOfConstituentsForeachType ;
1822 // map<medGeometryElement,int>::iterator itmap ;
1823 // if (_constituentsType.size() > 0 ) {
1824 // vector<medGeometryElement> constituentsType = _constituentsType[0] ;
1825 // vector<medGeometryElement>::iterator itvec ;
1826 // for(itvec=constituentsType.begin();itvec!=constituentsType.end();itvec++) {
1827 // itmap = numberOfConstituentsForeachType.find(*itvec);
1828 // if (itmap==numberOfConstituentsForeachType.end()) // new element
1829 // numberOfConstituentsForeachType[*itvec]=1 ;
1831 // numberOfConstituentsForeachType[*itvec]++ ;
1834 return numberOfConstituentsForeachType ;
1837 void CELLMODEL::init(const CELLMODEL &m)
1841 _dimension = m._dimension ;
1842 _numberOfNodes = m._numberOfNodes ;
1843 _numberOfVertexes = m._numberOfVertexes ;
1845 _numberOfConstituentsDimension = m._numberOfConstituentsDimension ;
1847 _numberOfConstituents = new int[_numberOfConstituentsDimension] ;
1848 for(int i=0; i<_numberOfConstituentsDimension; i++)
1849 _numberOfConstituents[i]=m._numberOfConstituents[i] ;
1851 _numberOfNodeOfEachConstituent = new (int*)[_numberOfConstituentsDimension] ;
1852 for(int i=0; i<_numberOfConstituentsDimension; i++) {
1853 int numberOf = _numberOfConstituents[i] ;
1854 int * newArray = new int[numberOf] ;
1855 int * oldArray = m._numberOfNodeOfEachConstituent[i] ;
1856 for(int j=0; j<numberOf; j++)
1857 newArray[j] = oldArray[j] ;
1858 _numberOfNodeOfEachConstituent[i] = newArray ;
1860 _constituents = new (int**)[_numberOfConstituentsDimension] ;
1861 _constituentsType = new (medGeometryElement*)[_numberOfConstituentsDimension] ;
1862 for(int i=0; i<_numberOfConstituentsDimension; i++) {
1863 int numberOf = _numberOfConstituents[i] ;
1864 int ** tmpArray = new (int*)[numberOf] ;
1865 medGeometryElement * newArrayType = new medGeometryElement[numberOf] ;
1866 medGeometryElement * oldArrayType = m._constituentsType[i] ;
1868 for(int j=0; j<numberOf; j++) {
1869 int numberOf2 = _numberOfNodeOfEachConstituent[i][j] ;
1870 int * newArray = new int[numberOf2] ;
1871 int * oldArray = m._constituents[i][j] ;
1872 for(int k=0; k<numberOf2; k++)
1873 newArray[k] = oldArray[k] ;
1874 tmpArray[j] = newArray ;
1875 newArrayType[j] = oldArrayType[j] ;
1877 _constituents[i] = tmpArray ;
1878 _constituentsType[i] = newArrayType ;
1882 void CELLMODEL::clean()
1884 for(int i=0; i<_numberOfConstituentsDimension; i++) {
1885 int numberOf = _numberOfConstituents[i] ;
1886 for(int j=0; j<numberOf; j++) {
1887 if (NULL!=_constituents[i][j])
1888 delete[] _constituents[i][j] ;
1890 if (NULL!=_constituentsType[i])
1891 delete[] _constituentsType[i] ;
1892 if (NULL!=_constituents[i])
1893 delete[] _constituents[i] ;
1894 if (NULL!=_numberOfNodeOfEachConstituent[i])
1895 delete[] _numberOfNodeOfEachConstituent[i] ;
1897 if (NULL!=_numberOfConstituents)
1898 delete[]_numberOfConstituents ;
1899 if (NULL!=_constituentsType)
1900 delete[] _constituentsType ;
1901 if (NULL!=_constituents)
1902 delete[] _constituents ;
1903 if (NULL!=_numberOfNodeOfEachConstituent)
1904 delete[] _numberOfNodeOfEachConstituent ;