1 #ifndef WRAPPERS_CELLS_HXX
2 #define WRAPPERS_CELLS_HXX
24 #include "MEDMEM_define.hxx"
26 //////////////////////////////////////////////////////////////////
30 //////////////////////////////////////////////////////////////////
32 /*********************************************************/
34 /* Fonction Comparaison_Informe(...) */
36 /*********************************************************/
38 int Comparaison_Informe(const vector<int> &v1,const vector<int> &v2);
41 /*********************************************************/
43 /* Classe Wrapper_Maille */
45 /*********************************************************/
47 // REMARQUE : A REFAIRE COMPLETEMENT !
54 Wrapper_Maille():sommets(NULL) {}
56 inline const Wrapper_Maille & positionne(int * pos){sommets=pos;return *this;}
57 inline int operator[](int i) const {return sommets[i];}
58 virtual int DONNE_NBR_NOEUDS() const {cerr<<"APPEL D'UNE FONCTION VIRTUELLE DE LA CLASSE MERE WRAPPER_MAILLE => EXIT"<<endl;exit(-1);}
59 virtual int DONNE_NBR_FACES() const {cerr<<"APPEL D'UNE FONCTION VIRTUELLE DE LA CLASSE MERE WRAPPER_MAILLE => EXIT"<<endl;exit(-1);}
60 virtual vector<int> DONNE_SIMPLEXE_BASE(int num_face) const {cerr<<"APPEL D'UNE FONCTION VIRTUELLE DE LA CLASSE MERE WRAPPER_MAILLE => EXIT"<<endl;exit(-1);}
61 virtual vector<int> DONNE_FACE(int num_face) const {cerr<<"APPEL D'UNE FONCTION VIRTUELLE DE LA CLASSE MERE WRAPPER_MAILLE => EXIT"<<endl;exit(-1);}
62 virtual int DONNE_PREMIER_NOEUD_DE_FACE(int num_face) const {cerr<<"APPEL D'UNE FONCTION VIRTUELLE DE LA CLASSE MERE WRAPPER_MAILLE => EXIT"<<endl;exit(-1);}
65 /*********************************************************/
67 /* Dérivées de Wrapper_Maille */
69 /*********************************************************/
71 // class Wrapper_Maille_Seg2 ; // public Wrapper_Maille;
72 // class Wrapper_Maille_Seg3 ; // public Wrapper_Maille;
73 class Wrapper_Maille_Tria3 ; // public Wrapper_Maille;
74 class Wrapper_Maille_Tria6 ; // public Wrapper_Maille;
75 class Wrapper_Maille_Quad4 ; // public Wrapper_Maille;
76 class Wrapper_Maille_Quad8 ; // public Wrapper_Maille;
77 class Wrapper_Maille_Tetra4 ; // public Wrapper_Maille;
78 class Wrapper_Maille_Tetra10 ; // public Wrapper_Maille;
79 class Wrapper_Maille_Hexa8 ; // public Wrapper_Maille;
80 class Wrapper_Maille_Hexa20 ; // public Wrapper_Maille;
81 class Wrapper_Maille_Pyra5 ; // public Wrapper_Maille;
82 class Wrapper_Maille_Pyra13 ; // public Wrapper_Maille;
83 class Wrapper_Maille_Penta6 ; // public Wrapper_Maille;
84 class Wrapper_Maille_Penta15 ; // public Wrapper_Maille;
86 /*********************************************************/
88 /* Classe Type_Wrapper_Maille */
90 /*********************************************************/
92 // Permet de switcher en fonction du type de maille
94 class Type_Wrapper_Maille
97 map<int,Wrapper_Maille *> contenu;
99 ~Type_Wrapper_Maille();
100 Type_Wrapper_Maille();
101 inline Wrapper_Maille * operator[] (int i) {return contenu[i];}
104 /*********************************************************/
106 /* Classe Wrapper_Nuage_Maille */
108 /*********************************************************/
110 template <class FORME_SKYLINE> class Wrapper_Nuage_Maille
113 FORME_SKYLINE * mailles;
114 Type_Wrapper_Maille show;
117 vector< int* > premier_pointeur;
119 Wrapper_Nuage_Maille():mailles(NULL) {}
120 Wrapper_Nuage_Maille(FORME_SKYLINE * fs);
121 ~Wrapper_Nuage_Maille() {}
122 // Méthodes de la politique
123 inline const Wrapper_Maille & operator[](int i);
124 inline int SIZE() {return nbr_mailles;}
125 inline int DONNE_NBR_FACES(int num_maille);
126 inline int DONNE_NBR_NOEUDS(int num_maille);
127 inline vector<int> DONNE_SIMPLEXE_BASE(int num_maille,int num_face);
128 inline int DONNE_PREMIER_NOEUD_DE_FACE(int num_maille,int num_face_loc);
129 inline vector<int> DONNE_FACE(int num_maille,int num_local_formant);
130 inline int DONNE_NUM_LOC_FACE_EGALE_A_FORMANT(int num_maille_sec,const vector<int> &sommets_face);
131 inline int DONNE_SOMMET_MAILLE(int num_maille,int num_som);
132 inline int DONNE_TYPE_MAILLE(int num_maille) {return mailles->DONNE_TYPE_MAILLE(num_maille);}
135 //////////////////////////////////////////////////////////////////
139 //////////////////////////////////////////////////////////////////
141 /*********************************************************/
143 /* Fonction Comparaison_Informe(...) */
145 /*********************************************************/
147 int Comparaison_Informe(const vector<int> &v1,const vector<int> &v2)
151 if (s1!=s2) return FAUX;
154 for (i1=0;i1<s1;i1++)
157 for (i2=0;(i2<s2)&&(test);i2++)
159 if (v1[i1]==v2[i2]) test=0;
161 if (test) return FAUX;
166 /*********************************************************/
168 /* Classe Wrapper_Nuage_Maille */
170 /*********************************************************/
172 template <class FORME_SKYLINE> Wrapper_Nuage_Maille<FORME_SKYLINE>::Wrapper_Nuage_Maille(FORME_SKYLINE * fs):mailles(fs)
175 nbr_mailles=mailles->SIZE();
176 types.resize(nbr_mailles);
177 premier_pointeur.resize(nbr_mailles);
178 for (i=0;i<nbr_mailles;i++)
180 types[i]=mailles->DONNE_TYPE_MAILLE(i);
181 premier_pointeur[i]=mailles->DONNE_PREMIER_POINTEUR(i);
183 show[types[0]]->positionne(premier_pointeur[0]);
185 template <class FORME_SKYLINE> const Wrapper_Maille & Wrapper_Nuage_Maille<FORME_SKYLINE>::operator[](int i)
187 return show[types[i]]->positionne(premier_pointeur[i]);
189 template <class FORME_SKYLINE> inline int Wrapper_Nuage_Maille<FORME_SKYLINE>::DONNE_SOMMET_MAILLE(int num_maille,int num_som)
191 return (*this)[num_maille][num_som];
194 template <class FORME_SKYLINE> inline int Wrapper_Nuage_Maille<FORME_SKYLINE>::DONNE_NUM_LOC_FACE_EGALE_A_FORMANT(int num_maille,const vector<int> &sommets_face)
196 vector<int> face_loc;
199 for (num_face=0;num_face<DONNE_NBR_FACES(num_maille);num_face++)
201 face_loc=DONNE_FACE(num_maille,num_face);
202 if (Comparaison_Informe(face_loc,sommets_face)) return num_face;
206 template <class FORME_SKYLINE> int Wrapper_Nuage_Maille<FORME_SKYLINE>::DONNE_NBR_NOEUDS(int num_maille)
208 return (*this)[num_maille].DONNE_NBR_NOEUDS();
210 template <class FORME_SKYLINE> int Wrapper_Nuage_Maille<FORME_SKYLINE>::DONNE_NBR_FACES(int num_maille)
212 return (*this)[num_maille].DONNE_NBR_FACES();
214 template <class FORME_SKYLINE> vector<int> Wrapper_Nuage_Maille<FORME_SKYLINE>::DONNE_SIMPLEXE_BASE(int num_maille,int num_face)
216 return (*this)[num_maille].DONNE_SIMPLEXE_BASE(num_face);
218 template <class FORME_SKYLINE> vector<int> Wrapper_Nuage_Maille<FORME_SKYLINE>::DONNE_FACE(int num_maille,int num_face)
220 return (*this)[num_maille].DONNE_FACE(num_face);
222 template <class FORME_SKYLINE> int Wrapper_Nuage_Maille<FORME_SKYLINE>::DONNE_PREMIER_NOEUD_DE_FACE(int num_maille,int num_face)
224 return (*this)[num_maille].DONNE_PREMIER_NOEUD_DE_FACE(num_face);
227 /*********************************************************/
229 /* Classe Wrapper_Maille_Seg2 */
231 /*********************************************************/
234 class Wrapper_Maille_Seg2 : public Wrapper_Maille
237 inline int DONNE_NBR_FACES() const {return 2;}
238 inline int DONNE_NBR_NOEUDS() const {return 2;}
242 /*********************************************************/
244 /* Classe Wrapper_Maille_Seg3 */
246 /*********************************************************/
249 class Wrapper_Maille_Seg3 : public Wrapper_Maille
252 inline int DONNE_NBR_FACES() const {return 2;}
253 inline int DONNE_NBR_NOEUDS() const {return 3;}
257 /*********************************************************/
259 /* Classe Wrapper_Maille_Tria3 */
261 /*********************************************************/
263 class Wrapper_Maille_Tria3 : public Wrapper_Maille
266 inline int DONNE_NBR_FACES() const {return 3;}
267 inline int DONNE_NBR_NOEUDS() const {return 3;}
268 inline int DONNE_PREMIER_NOEUD_DE_FACE(int num_face) const
272 case 0 : return sommets[0];
273 case 1 : return sommets[1];
274 case 2 : return sommets[2];
277 inline vector<int> DONNE_FACE(int num_face) const
279 vector<int> retour(2);
282 case 0 : retour[0]=sommets[0];retour[1]=sommets[1];break;
283 case 1 : retour[0]=sommets[1];retour[1]=sommets[2];break;
284 case 2 : retour[0]=sommets[2];retour[1]=sommets[0];break;
288 inline vector<int> DONNE_SIMPLEXE_BASE(int num_face) const
290 vector<int> retour(3);
293 case 0 : retour[0]=sommets[2];retour[1]=sommets[0];retour[2]=sommets[1];break;
294 case 1 : retour[0]=sommets[0];retour[1]=sommets[1];retour[2]=sommets[2];break;
295 case 2 : retour[0]=sommets[1];retour[1]=sommets[2];retour[2]=sommets[0];break;
301 /*********************************************************/
303 /* Classe Wrapper_Maille_Tria6 */
305 /*********************************************************/
307 class Wrapper_Maille_Tria6 : public Wrapper_Maille
310 inline int DONNE_NBR_FACES() const {return 3;}
311 inline int DONNE_NBR_NOEUDS() const {return 6;}
312 inline int DONNE_PREMIER_NOEUD_DE_FACE(int num_face) const
316 case 0 : return sommets[0];
317 case 1 : return sommets[1];
318 case 2 : return sommets[2];
321 inline vector<int> DONNE_FACE(int num_face) const
323 vector<int> retour(2);
326 case 0 : retour[0]=sommets[0];retour[1]=sommets[1];break;
327 case 1 : retour[0]=sommets[1];retour[1]=sommets[2];break;
328 case 2 : retour[0]=sommets[2];retour[1]=sommets[0];break;
332 inline vector<int> DONNE_SIMPLEXE_BASE(int num_face) const
334 vector<int> retour(3);
337 case 0 : retour[0]=sommets[2];retour[1]=sommets[0];retour[2]=sommets[1];break;
338 case 1 : retour[0]=sommets[0];retour[1]=sommets[1];retour[2]=sommets[2];break;
339 case 2 : retour[0]=sommets[1];retour[1]=sommets[2];retour[2]=sommets[0];break;
345 /*********************************************************/
347 /* Classe Wrapper_Maille_Quad4 */
349 /*********************************************************/
351 class Wrapper_Maille_Quad4 : public Wrapper_Maille
354 inline int DONNE_NBR_FACES() const {return 4;}
355 inline int DONNE_NBR_NOEUDS() const {return 4;}
356 inline int DONNE_PREMIER_NOEUD_DE_FACE(int num_face) const
360 case 0 : return sommets[0];
361 case 1 : return sommets[1];
362 case 2 : return sommets[2];
363 case 3 : return sommets[3];
366 inline vector<int> DONNE_FACE(int num_face) const
368 vector<int> retour(2);
371 case 0 : retour[0]=sommets[0];retour[1]=sommets[1];break;
372 case 1 : retour[0]=sommets[1];retour[1]=sommets[2];break;
373 case 2 : retour[0]=sommets[2];retour[1]=sommets[3];break;
374 case 3 : retour[0]=sommets[3];retour[1]=sommets[0];break;
378 inline vector<int> DONNE_SIMPLEXE_BASE(int num_face) const
380 vector<int> retour(3);
383 case 0 : retour[0]=sommets[2];retour[1]=sommets[0];retour[2]=sommets[1];break;
384 case 1 : retour[0]=sommets[3];retour[1]=sommets[1];retour[2]=sommets[2];break;
385 case 2 : retour[0]=sommets[0];retour[1]=sommets[2];retour[2]=sommets[3];break;
386 case 3 : retour[0]=sommets[1];retour[1]=sommets[0];retour[3]=sommets[0];break;
393 /*********************************************************/
395 /* Classe Wrapper_Maille_Quad8 */
397 /*********************************************************/
399 class Wrapper_Maille_Quad8 : public Wrapper_Maille
402 inline int DONNE_NBR_FACES() const {return 4;}
403 inline int DONNE_NBR_NOEUDS() const {return 8;}
404 inline int DONNE_PREMIER_NOEUD_DE_FACE(int num_face) const
408 case 0 : return sommets[0];
409 case 1 : return sommets[1];
410 case 2 : return sommets[2];
411 case 3 : return sommets[3];
414 inline vector<int> DONNE_FACE(int num_face) const
416 vector<int> retour(2);
419 case 0 : retour[0]=sommets[0];retour[1]=sommets[1];break;
420 case 1 : retour[0]=sommets[1];retour[1]=sommets[2];break;
421 case 2 : retour[0]=sommets[2];retour[1]=sommets[3];break;
422 case 3 : retour[0]=sommets[3];retour[1]=sommets[0];break;
426 inline vector<int> DONNE_SIMPLEXE_BASE(int num_face) const
428 vector<int> retour(3);
431 case 0 : retour[0]=sommets[2];retour[1]=sommets[0];retour[2]=sommets[1];break;
432 case 1 : retour[0]=sommets[3];retour[1]=sommets[1];retour[2]=sommets[2];break;
433 case 2 : retour[0]=sommets[0];retour[1]=sommets[2];retour[2]=sommets[3];break;
434 case 3 : retour[0]=sommets[1];retour[1]=sommets[0];retour[3]=sommets[0];break;
440 /*********************************************************/
442 /* Classe Wrapper_Maille_Tetra4 */
444 /*********************************************************/
446 class Wrapper_Maille_Tetra4 : public Wrapper_Maille
449 inline int DONNE_NBR_FACES() const {return 4;}
450 inline int DONNE_NBR_NOEUDS() const {return 4;}
451 inline int DONNE_PREMIER_NOEUD_DE_FACE(int num_face) const
455 case 0 : return sommets[0];
456 case 1 : return sommets[0];
457 case 2 : return sommets[1];
458 case 3 : return sommets[2];
461 inline vector<int> DONNE_FACE(int num_face) const
463 vector<int> retour(3);
466 case 0 : retour[0]=sommets[0];retour[1]=sommets[1];retour[2]=sommets[2];break;
467 case 1 : retour[0]=sommets[0];retour[1]=sommets[3];retour[2]=sommets[1];break;
468 case 2 : retour[0]=sommets[1];retour[1]=sommets[3];retour[2]=sommets[2];break;
469 case 3 : retour[0]=sommets[2];retour[1]=sommets[3];retour[2]=sommets[0];break;
473 inline vector<int> DONNE_SIMPLEXE_BASE(int num_face) const
475 vector<int> retour(4);
478 case 0 : retour[0]=sommets[3];retour[1]=sommets[0];retour[2]=sommets[1];retour[3]=sommets[2];break;
479 case 1 : retour[0]=sommets[2];retour[1]=sommets[0];retour[2]=sommets[3];retour[3]=sommets[1];break;
480 case 2 : retour[0]=sommets[0];retour[1]=sommets[1];retour[2]=sommets[3];retour[3]=sommets[2];break;
481 case 3 : retour[0]=sommets[1];retour[1]=sommets[2];retour[2]=sommets[3];retour[3]=sommets[0];break;
487 /*********************************************************/
489 /* Classe Wrapper_Maille_Tetra10 */
491 /*********************************************************/
493 class Wrapper_Maille_Tetra10 : public Wrapper_Maille
496 inline int DONNE_NBR_FACES() const {return 4;}
497 inline int DONNE_NBR_NOEUDS() const {return 10;}
498 inline int DONNE_PREMIER_NOEUD_DE_FACE(int num_face) const
502 case 0 : return sommets[0];
503 case 1 : return sommets[0];
504 case 2 : return sommets[1];
505 case 3 : return sommets[2];
508 inline vector<int> DONNE_FACE(int num_face) const
510 vector<int> retour(3);
513 case 0 : retour[0]=sommets[0];retour[1]=sommets[1];retour[2]=sommets[2];break;
514 case 1 : retour[0]=sommets[0];retour[1]=sommets[3];retour[2]=sommets[1];break;
515 case 2 : retour[0]=sommets[1];retour[1]=sommets[3];retour[2]=sommets[2];break;
516 case 3 : retour[0]=sommets[2];retour[1]=sommets[3];retour[2]=sommets[0];break;
520 inline vector<int> DONNE_SIMPLEXE_BASE(int num_face) const
522 vector<int> retour(4);
525 case 0 : retour[0]=sommets[3];retour[1]=sommets[0];retour[2]=sommets[1];retour[3]=sommets[2];break;
526 case 1 : retour[0]=sommets[2];retour[1]=sommets[0];retour[2]=sommets[3];retour[3]=sommets[1];break;
527 case 2 : retour[0]=sommets[0];retour[1]=sommets[1];retour[2]=sommets[3];retour[3]=sommets[2];break;
528 case 3 : retour[0]=sommets[1];retour[1]=sommets[2];retour[2]=sommets[3];retour[3]=sommets[0];break;
534 /*********************************************************/
536 /* Classe Wrapper_Maille_Hexa8 */
538 /*********************************************************/
540 class Wrapper_Maille_Hexa8 : public Wrapper_Maille
543 inline int DONNE_NBR_FACES() const {return 6;}
544 inline int DONNE_NBR_NOEUDS() const {return 8;}
545 inline int DONNE_PREMIER_NOEUD_DE_FACE(int num_face) const
549 case 0 : return sommets[0];
550 case 1 : return sommets[4];
551 case 2 : return sommets[0];
552 case 3 : return sommets[1];
553 case 4 : return sommets[2];
554 case 5 : return sommets[3];
557 inline vector<int> DONNE_FACE(int num_face) const
559 vector<int> retour(4);
562 case 0 : retour[0]=sommets[0];retour[1]=sommets[1];retour[2]=sommets[2];retour[3]=sommets[3];break;
563 case 1 : retour[0]=sommets[4];retour[1]=sommets[5];retour[2]=sommets[6];retour[3]=sommets[7];break;
564 case 2 : retour[0]=sommets[0];retour[1]=sommets[4];retour[2]=sommets[5];retour[3]=sommets[1];break;
565 case 3 : retour[0]=sommets[1];retour[1]=sommets[5];retour[2]=sommets[6];retour[3]=sommets[2];break;
566 case 4 : retour[0]=sommets[2];retour[1]=sommets[6];retour[2]=sommets[7];retour[3]=sommets[3];break;
567 case 5 : retour[0]=sommets[3];retour[1]=sommets[7];retour[2]=sommets[4];retour[3]=sommets[0];break;
572 inline vector<int> DONNE_SIMPLEXE_BASE(int num_face) const
574 vector<int> retour(4);
577 case 0 : retour[0]=sommets[5];retour[1]=sommets[0];retour[2]=sommets[1];retour[3]=sommets[2];break;
578 case 1 : retour[0]=sommets[0];retour[1]=sommets[7];retour[2]=sommets[6];retour[3]=sommets[5];break;
579 case 2 : retour[0]=sommets[3];retour[1]=sommets[0];retour[2]=sommets[4];retour[3]=sommets[5];break;
580 case 3 : retour[0]=sommets[4];retour[1]=sommets[1];retour[2]=sommets[5];retour[3]=sommets[6];break;
581 case 4 : retour[0]=sommets[1];retour[1]=sommets[2];retour[2]=sommets[6];retour[3]=sommets[3];break;
582 case 5 : retour[0]=sommets[2];retour[1]=sommets[3];retour[2]=sommets[7];retour[3]=sommets[0];break;
589 /*********************************************************/
591 /* Classe Wrapper_Maille_Hexa20 */
593 /*********************************************************/
595 class Wrapper_Maille_Hexa20 : public Wrapper_Maille
598 inline int DONNE_NBR_FACES() const {return 6;}
599 inline int DONNE_NBR_NOEUDS() const {return 20;}
600 inline int DONNE_PREMIER_NOEUD_DE_FACE(int num_face) const
604 case 0 : return sommets[0];
605 case 1 : return sommets[4];
606 case 2 : return sommets[0];
607 case 3 : return sommets[1];
608 case 4 : return sommets[2];
609 case 5 : return sommets[3];
612 inline vector<int> DONNE_FACE(int num_face) const
614 vector<int> retour(4);
617 case 0 : retour[0]=sommets[0];retour[1]=sommets[1];retour[2]=sommets[2];retour[3]=sommets[3];break;
618 case 1 : retour[0]=sommets[4];retour[1]=sommets[5];retour[2]=sommets[6];retour[3]=sommets[7];break;
619 case 2 : retour[0]=sommets[0];retour[1]=sommets[4];retour[2]=sommets[5];retour[3]=sommets[1];break;
620 case 3 : retour[0]=sommets[1];retour[1]=sommets[5];retour[2]=sommets[6];retour[3]=sommets[2];break;
621 case 4 : retour[0]=sommets[2];retour[1]=sommets[6];retour[2]=sommets[7];retour[3]=sommets[3];break;
622 case 5 : retour[0]=sommets[3];retour[1]=sommets[7];retour[2]=sommets[4];retour[3]=sommets[0];break;
626 inline vector<int> DONNE_SIMPLEXE_BASE(int num_face) const
628 vector<int> retour(4);
631 case 0 : retour[0]=sommets[5];retour[1]=sommets[0];retour[2]=sommets[1];retour[3]=sommets[2];break;
632 case 1 : retour[0]=sommets[0];retour[1]=sommets[7];retour[2]=sommets[6];retour[3]=sommets[5];break;
633 case 2 : retour[0]=sommets[3];retour[1]=sommets[0];retour[2]=sommets[4];retour[3]=sommets[5];break;
634 case 3 : retour[0]=sommets[4];retour[1]=sommets[1];retour[2]=sommets[5];retour[3]=sommets[6];break;
635 case 4 : retour[0]=sommets[1];retour[1]=sommets[2];retour[2]=sommets[6];retour[3]=sommets[3];break;
636 case 5 : retour[0]=sommets[2];retour[1]=sommets[3];retour[2]=sommets[7];retour[3]=sommets[0];break;
642 /*********************************************************/
644 /* Classe Wrapper_Maille_Pyra5 */
646 /*********************************************************/
648 class Wrapper_Maille_Pyra5 : public Wrapper_Maille
651 inline int DONNE_NBR_FACES() const {return 5;}
652 inline int DONNE_NBR_NOEUDS() const {return 5;}
653 inline int DONNE_PREMIER_NOEUD_DE_FACE(int num_face) const
657 case 0 : return sommets[0];
658 case 1 : return sommets[0];
659 case 2 : return sommets[1];
660 case 3 : return sommets[2];
661 case 4 : return sommets[3];
664 inline vector<int> DONNE_FACE(int num_face) const
669 case 0 : retour.resize(4);retour[0]=sommets[0];retour[1]=sommets[1];retour[2]=sommets[2];retour[3]=sommets[3];break;
670 case 1 : retour.resize(3);retour[0]=sommets[0];retour[1]=sommets[4];retour[2]=sommets[1];break;
671 case 2 : retour.resize(3);retour[0]=sommets[1];retour[1]=sommets[4];retour[2]=sommets[2];break;
672 case 3 : retour.resize(3);retour[0]=sommets[2];retour[1]=sommets[4];retour[2]=sommets[3];break;
673 case 4 : retour.resize(3);retour[0]=sommets[3];retour[1]=sommets[4];retour[2]=sommets[0];break;
678 inline vector<int> DONNE_SIMPLEXE_BASE(int num_face) const
680 vector<int> retour(4);
683 case 0 : retour[0]=sommets[4];retour[1]=sommets[0];retour[2]=sommets[1];retour[3]=sommets[2];break;
684 case 1 : retour[0]=sommets[3];retour[1]=sommets[0];retour[2]=sommets[4];retour[3]=sommets[1];break;
685 case 2 : retour[0]=sommets[0];retour[1]=sommets[1];retour[2]=sommets[4];retour[3]=sommets[2];break;
686 case 3 : retour[0]=sommets[1];retour[1]=sommets[2];retour[2]=sommets[4];retour[3]=sommets[3];break;
687 case 4 : retour[0]=sommets[2];retour[1]=sommets[0];retour[2]=sommets[3];retour[3]=sommets[4];break;
693 /*********************************************************/
695 /* Classe Wrapper_Maille_Pyra13 */
697 /*********************************************************/
699 class Wrapper_Maille_Pyra13 : public Wrapper_Maille
702 inline int DONNE_NBR_FACES() const {return 5;}
703 inline int DONNE_NBR_NOEUDS() const {return 13;}
704 inline int DONNE_PREMIER_NOEUD_DE_FACE(int num_face) const
708 case 0 : return sommets[0];
709 case 1 : return sommets[0];
710 case 2 : return sommets[1];
711 case 3 : return sommets[2];
712 case 4 : return sommets[3];
715 inline vector<int> DONNE_FACE(int num_face) const
720 case 0 : retour.resize(4);retour[0]=sommets[0];retour[1]=sommets[1];retour[2]=sommets[2];retour[3]=sommets[3];break;
721 case 1 : retour.resize(3);retour[0]=sommets[0];retour[1]=sommets[4];retour[2]=sommets[1];break;
722 case 2 : retour.resize(3);retour[0]=sommets[1];retour[1]=sommets[4];retour[2]=sommets[2];break;
723 case 3 : retour.resize(3);retour[0]=sommets[2];retour[1]=sommets[4];retour[2]=sommets[3];break;
724 case 4 : retour.resize(3);retour[0]=sommets[3];retour[1]=sommets[4];retour[2]=sommets[0];break;
728 inline vector<int> DONNE_SIMPLEXE_BASE(int num_face) const
730 vector<int> retour(4);
733 case 0 : retour[0]=sommets[4];retour[1]=sommets[0];retour[2]=sommets[1];retour[3]=sommets[2];break;
734 case 1 : retour[0]=sommets[3];retour[1]=sommets[0];retour[2]=sommets[4];retour[3]=sommets[1];break;
735 case 2 : retour[0]=sommets[0];retour[1]=sommets[1];retour[2]=sommets[4];retour[3]=sommets[2];break;
736 case 3 : retour[0]=sommets[1];retour[1]=sommets[2];retour[2]=sommets[4];retour[3]=sommets[3];break;
737 case 4 : retour[0]=sommets[2];retour[1]=sommets[0];retour[2]=sommets[3];retour[3]=sommets[4];break;
742 /*********************************************************/
744 /* Classe Wrapper_Maille_Penta6 */
746 /*********************************************************/
748 class Wrapper_Maille_Penta6 : public Wrapper_Maille
751 inline int DONNE_NBR_FACES() const {return 5;}
752 inline int DONNE_NBR_NOEUDS() const {return 6;}
753 inline int DONNE_PREMIER_NOEUD_DE_FACE(int num_face) const
757 case 0 : return sommets[0];
758 case 1 : return sommets[3];
759 case 2 : return sommets[0];
760 case 3 : return sommets[1];
761 case 4 : return sommets[2];
764 inline vector<int> DONNE_FACE(int num_face) const
769 case 0 : retour.resize(3);retour[0]=sommets[0];retour[1]=sommets[1];retour[2]=sommets[2];break;
770 case 1 : retour.resize(3);retour[0]=sommets[3];retour[1]=sommets[4];retour[2]=sommets[5];break;
771 case 2 : retour.resize(4);retour[0]=sommets[0];retour[1]=sommets[3];retour[2]=sommets[4];retour[3]=sommets[1];break;
772 case 3 : retour.resize(4);retour[0]=sommets[1];retour[1]=sommets[4];retour[2]=sommets[5];retour[3]=sommets[2];break;
773 case 4 : retour.resize(4);retour[0]=sommets[2];retour[1]=sommets[5];retour[2]=sommets[3];retour[3]=sommets[1];break;
778 inline vector<int> DONNE_SIMPLEXE_BASE(int num_face) const
780 vector<int> retour(4);
783 case 0 : retour[0]=sommets[3];retour[1]=sommets[0];retour[2]=sommets[1];retour[3]=sommets[2];break;
784 case 1 : retour[0]=sommets[2];retour[1]=sommets[3];retour[2]=sommets[4];retour[3]=sommets[5];break;
785 case 2 : retour[0]=sommets[5];retour[1]=sommets[0];retour[2]=sommets[3];retour[3]=sommets[1];break;
786 case 3 : retour[0]=sommets[0];retour[1]=sommets[1];retour[2]=sommets[4];retour[3]=sommets[2];break;
787 case 4 : retour[0]=sommets[1];retour[1]=sommets[2];retour[2]=sommets[5];retour[3]=sommets[0];break;
793 /*********************************************************/
795 /* Classe Wrapper_Maille_Penta15 */
797 /*********************************************************/
799 class Wrapper_Maille_Penta15 : public Wrapper_Maille
802 inline int DONNE_NBR_FACES() const {return 5;}
803 inline int DONNE_NBR_NOEUDS() const {return 15;}
804 inline int DONNE_PREMIER_NOEUD_DE_FACE(int num_face) const
808 case 0 : return sommets[0];
809 case 1 : return sommets[3];
810 case 2 : return sommets[0];
811 case 3 : return sommets[1];
812 case 4 : return sommets[2];
815 inline vector<int> DONNE_FACE(int num_face) const
820 case 0 : retour.resize(3);retour[0]=sommets[0];retour[1]=sommets[1];retour[2]=sommets[2];break;
821 case 1 : retour.resize(3);retour[0]=sommets[3];retour[1]=sommets[4];retour[2]=sommets[5];break;
822 case 2 : retour.resize(4);retour[0]=sommets[0];retour[1]=sommets[3];retour[2]=sommets[4];retour[3]=sommets[1];break;
823 case 3 : retour.resize(4);retour[0]=sommets[1];retour[1]=sommets[4];retour[2]=sommets[5];retour[3]=sommets[2];break;
824 case 4 : retour.resize(4);retour[0]=sommets[2];retour[1]=sommets[5];retour[2]=sommets[3];retour[3]=sommets[1];break;
829 inline vector<int> DONNE_SIMPLEXE_BASE(int num_face) const
831 vector<int> retour(4);
834 case 0 : retour[0]=sommets[3];retour[1]=sommets[0];retour[2]=sommets[1];retour[3]=sommets[2];break;
835 case 1 : retour[0]=sommets[2];retour[1]=sommets[3];retour[2]=sommets[4];retour[3]=sommets[5];break;
836 case 2 : retour[0]=sommets[5];retour[1]=sommets[0];retour[2]=sommets[3];retour[3]=sommets[1];break;
837 case 3 : retour[0]=sommets[0];retour[1]=sommets[1];retour[2]=sommets[4];retour[3]=sommets[2];break;
838 case 4 : retour[0]=sommets[1];retour[1]=sommets[2];retour[2]=sommets[5];retour[3]=sommets[0];break;
844 /*********************************************************/
846 /* Classe Type_Wrapper_Maille */
848 /*********************************************************/
850 Type_Wrapper_Maille::~Type_Wrapper_Maille()
852 // delete contenu[MED_SEG2 ];
853 // delete contenu[MED_SEG3 ];
854 delete contenu[MED_TRIA3 ];
855 delete contenu[MED_TRIA6 ];
856 delete contenu[MED_QUAD4 ];
857 delete contenu[MED_QUAD8 ];
858 delete contenu[MED_TETRA4 ];
859 delete contenu[MED_TETRA10];
860 delete contenu[MED_HEXA8 ];
861 delete contenu[MED_HEXA20 ];
862 delete contenu[MED_PYRA5 ];
863 delete contenu[MED_PYRA13 ];
864 delete contenu[MED_PENTA6 ];
865 delete contenu[MED_PENTA15];
868 Type_Wrapper_Maille::Type_Wrapper_Maille()
870 // contenu[MED_SEG2 ]= new Wrapper_Maille_Seg2 ();
871 // contenu[MED_SEG3 ]= new Wrapper_Maille_Seg3 ();
872 contenu[MED_TRIA3 ]= new Wrapper_Maille_Tria3 ();
873 contenu[MED_TRIA6 ]= new Wrapper_Maille_Tria6 ();
874 contenu[MED_QUAD4 ]= new Wrapper_Maille_Quad4 ();
875 contenu[MED_QUAD8 ]= new Wrapper_Maille_Quad8 ();
876 contenu[MED_TETRA4 ]= new Wrapper_Maille_Tetra4 ();
877 contenu[MED_TETRA10]= new Wrapper_Maille_Tetra10 ();
878 contenu[MED_HEXA8 ]= new Wrapper_Maille_Hexa8 ();
879 contenu[MED_HEXA20 ]= new Wrapper_Maille_Hexa20 ();
880 contenu[MED_PYRA5 ]= new Wrapper_Maille_Pyra5 ();
881 contenu[MED_PYRA13 ]= new Wrapper_Maille_Pyra13 ();
882 contenu[MED_PENTA6 ]= new Wrapper_Maille_Penta6 ();
883 contenu[MED_PENTA15]= new Wrapper_Maille_Penta15 ();