Code_Saturne
CFD tool
ecs_elt_typ_liste.h
Go to the documentation of this file.
1 #ifndef _ECS_ELT_TYP_LISTE_H_
2 #define _ECS_ELT_TYP_LISTE_H_
3 
4 /*============================================================================
5  * Définition d'un tableau constant statique
6  * définissant les types des éléments reconnus par le code
7  *============================================================================*/
8 
9 /*
10  This file is part of Code_Saturne, a general-purpose CFD tool.
11 
12  Copyright (C) 1998-2012 EDF S.A.
13 
14  This program is free software; you can redistribute it and/or modify it under
15  the terms of the GNU General Public License as published by the Free Software
16  Foundation; either version 2 of the License, or (at your option) any later
17  version.
18 
19  This program is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
21  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
22  details.
23 
24  You should have received a copy of the GNU General Public License along with
25  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
26  Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 */
28 
29 /*----------------------------------------------------------------------------*/
30 
31 /*----------------------------------------------------------------------------
32  * Local headers
33  *----------------------------------------------------------------------------*/
34 
35 #include "ecs_def.h"
36 
38 
39 /*============================================================================
40  * Type definitions
41  *============================================================================*/
42 
43 typedef struct {
44 
45  int elt_typ;
46  int som[4]; /* 4 sommets max. pour les sous-éléments */
47 
49 
50 
51 typedef struct {
52 
53  char nom[11]; /* Nom le plus long: polyhedron */
54  int nbr_som;
56  ecs_sous_elt_t sous_elt[6]; /* 6 sous-éléments max. */
58 
59 /*============================================================================
60  * Global variable definitions
61  *============================================================================*/
62 
63 static const ecs_fic_elt_typ_t ecs_fic_elt_typ_liste_c[ECS_ELT_TYP_FIN] = {
64 
65  { /* ECS_ELT_TYP_NUL 0 */
66  "",
67  0,
68  0,
69  {
70  {0,{0}}
71  }
72  },
73 
74  { /* ECS_ELT_TYP_FAC_TRIA 1 */
75  "tria3", /* */
76  3, /* x 3 */
77  0, /* / \ */
78  { /* / \ */
79  {0, {0}} /* / \ */
80  } /* 1 x-------x 2 */
81  },
82 
83  { /* ECS_ELT_TYP_FAC_QUAD 2 */
84  "quad4", /* */
85  4, /* 4 x-------x 3 */
86  0, /* | | */
87  { /* | | */
88  {0, {0}} /* | | */
89  } /* 1 x-------x 2 */
90  },
91 
92  { /* ECS_ELT_TYP_CEL_TETRA 3 */
93  "tetra4", /* */
94  4, /* x 4 */
95  4, /* /|\ */
96  { /* / | \ */
97  {ECS_ELT_TYP_FAC_TRIA, { 1, 3, 2 }}, /* / | \ */
98  {ECS_ELT_TYP_FAC_TRIA, { 1, 2, 4 }}, /* 1 x- -|- -x 3 */
99  {ECS_ELT_TYP_FAC_TRIA, { 1, 4, 3 }}, /* \ | / */
100  {ECS_ELT_TYP_FAC_TRIA, { 2, 3, 4 }} /* \ | / */
101  } /* \|/ */
102  }, /* x 2 */
103 
104  { /* ECS_ELT_TYP_CEL_PYRAM 4 */
105  "pyramid5", /* */
106  5, /* 5 x */
107  5, /* /|\ */
108  { /* //| \ */
109  {ECS_ELT_TYP_FAC_TRIA, { 1, 2, 5 } }, /* // | \ */
110  {ECS_ELT_TYP_FAC_TRIA, { 1, 5, 4 } }, /* 4 x/--|---x 3 */
111  {ECS_ELT_TYP_FAC_TRIA, { 2, 3, 5 } }, /* // | / */
112  {ECS_ELT_TYP_FAC_TRIA, { 3, 4, 5 } }, /* // | / */
113  {ECS_ELT_TYP_FAC_QUAD, { 1, 4, 3, 2 }} /* 1 x-------x 2 */
114  }
115  },
116 
117  { /* ECS_ELT_TYP_CEL_PRISM 5 */
118  "penta6", /* */
119  6, /* 4 x-------x 6 */
120  5, /* |\ /| */
121  { /* | \ / | */
122  {ECS_ELT_TYP_FAC_TRIA, { 1, 3, 2 } }, /* 1 x- \-/ -x 3 */
123  {ECS_ELT_TYP_FAC_TRIA, { 4, 5, 6 } }, /* \ 5x / */
124  {ECS_ELT_TYP_FAC_QUAD, { 1, 2, 5, 4 }}, /* \ | / */
125  {ECS_ELT_TYP_FAC_QUAD, { 1, 4, 6, 3 }}, /* \|/ */
126  {ECS_ELT_TYP_FAC_QUAD, { 2, 3, 6, 5 }} /* x 2 */
127  }
128  },
129 
130  { /* ECS_ELT_TYP_CEL_HEXA 6 */
131  "hexa8", /* */
132  8, /* */
133  6, /* 8 x-------x 7 */
134  { /* /| /| */
135  {ECS_ELT_TYP_FAC_QUAD, { 1, 4, 3, 2 }}, /* / | / | */
136  {ECS_ELT_TYP_FAC_QUAD, { 1, 2, 6, 5 }}, /* 5 x-------x6 | */
137  {ECS_ELT_TYP_FAC_QUAD, { 1, 5, 8, 4 }}, /* | 4x----|--x 3 */
138  {ECS_ELT_TYP_FAC_QUAD, { 2, 3, 7, 6 }}, /* | / | / */
139  {ECS_ELT_TYP_FAC_QUAD, { 3, 4, 8, 7 }}, /* |/ |/ */
140  {ECS_ELT_TYP_FAC_QUAD, { 5, 6, 7, 8 }} /* 1 x-------x 2 */
141  }
142  },
143 
144  { /* ECS_ELT_TYP_FAC_POLY 7 */
145  "polygon", /* */
146  0,
147  0,
148  {
149  {0,{0}}
150  }
151  },
152 
153  { /* ECS_ELT_TYP_CEL_POLY 8 */
154  "polyhedron", /* */
155  0,
156  0,
157  {
158  {0,{0}}
159  }
160  }
161 
162 };
163 
164 /*----------------------------------------------------------------------------*/
165 
167 
168 #endif /* _ECS_ELT_TYP_LISTE_H_ */
int elt_typ
Definition: ecs_elt_typ_liste.h:45
#define BEGIN_C_DECLS
Definition: ecs_def.h:234
Definition: ecs_def.h:164
Definition: ecs_def.h:153
int nbr_som
Definition: ecs_elt_typ_liste.h:54
Definition: ecs_def.h:154
int nbr_sous_elt
Definition: ecs_elt_typ_liste.h:55
#define END_C_DECLS
Definition: ecs_def.h:235
Definition: ecs_elt_typ_liste.h:43
Definition: ecs_elt_typ_liste.h:51