~ubuntu-branches/ubuntu/precise/code-saturne/precise

« back to all changes in this revision

Viewing changes to preprocessor/util/ecs_elt_typ_liste.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2011-11-24 00:00:08 UTC
  • mfrom: (6.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20111124000008-2vo99e38267942q5
Tags: 2.1.0-3
Install a missing file

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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-2011 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
 *                                 Visibilité
 
33
 *============================================================================*/
 
34
 
 
35
/*----------------------------------------------------------------------------
 
36
 *  Fichiers `include' librairie standard C
 
37
 *----------------------------------------------------------------------------*/
 
38
 
 
39
 
 
40
/*----------------------------------------------------------------------------
 
41
 *  Fichiers `include' publics  du  paquetage global "Utilitaire"
 
42
 *----------------------------------------------------------------------------*/
 
43
 
 
44
#include "ecs_def.h"
 
45
 
 
46
 
 
47
/*============================================================================
 
48
 *                       Définition du tableau constant statique
 
49
 *============================================================================*/
 
50
 
 
51
typedef struct {
 
52
 
 
53
  int  elt_typ ;
 
54
  int  som[4] ; /* 4 sommets max. pour les sous-éléments */
 
55
 
 
56
} ecs_sous_elt_t ;
 
57
 
 
58
 
 
59
typedef struct {
 
60
 
 
61
  char            nom[11] ; /* Nom le plus long: polyhedron */
 
62
  int             nbr_som ;
 
63
  int             nbr_sous_elt ;
 
64
  ecs_sous_elt_t  sous_elt[6] ; /* 6 sous-éléments max. */
 
65
} ecs_fic_elt_typ_t ;
 
66
 
 
67
 
 
68
static const ecs_fic_elt_typ_t ecs_fic_elt_typ_liste_c[ECS_ELT_TYP_FIN] = {
 
69
 
 
70
  {                                                /* ECS_ELT_TYP_NUL       0 */
 
71
    "",
 
72
    0 ,
 
73
    0 ,
 
74
    {
 
75
      {0,{0}}
 
76
    }
 
77
  } ,
 
78
 
 
79
  {                                                /* ECS_ELT_TYP_FAC_TRIA  1 */
 
80
    "tria3",                                       /*                         */
 
81
    3 ,                                            /*        x 3              */
 
82
    0 ,                                            /*       / \               */
 
83
    {                                              /*      /   \              */
 
84
      {0, {0}}                                     /*     /     \             */
 
85
    }                                              /*  1 x-------x 2          */
 
86
  } ,
 
87
 
 
88
  {                                                /* ECS_ELT_TYP_FAC_QUAD  2 */
 
89
    "quad4",                                       /*                         */
 
90
    4 ,                                            /*  4 x-------x 3          */
 
91
    0 ,                                            /*    |       |            */
 
92
    {                                              /*    |       |            */
 
93
      {0, {0}}                                     /*    |       |            */
 
94
    }                                              /*  1 x-------x 2          */
 
95
  } ,
 
96
 
 
97
  {                                                /* ECS_ELT_TYP_CEL_TETRA 3 */
 
98
    "tetra4",                                      /*                         */
 
99
    4 ,                                            /*        x 4              */
 
100
    4 ,                                            /*       /|\               */
 
101
    {                                              /*      / | \              */
 
102
      {ECS_ELT_TYP_FAC_TRIA, { 1 , 3 , 2 }} ,      /*     /  |  \             */
 
103
      {ECS_ELT_TYP_FAC_TRIA, { 1 , 2 , 4 }} ,      /*  1 x- -|- -x 3          */
 
104
      {ECS_ELT_TYP_FAC_TRIA, { 1 , 4 , 3 }} ,      /*     \  |  /             */
 
105
      {ECS_ELT_TYP_FAC_TRIA, { 2 , 3 , 4 }}        /*      \ | /              */
 
106
    }                                              /*       \|/               */
 
107
  } ,                                              /*        x 2              */
 
108
 
 
109
  {                                                /* ECS_ELT_TYP_CEL_PYRAM 4 */
 
110
    "pyramid5",                                    /*                         */
 
111
    5 ,                                            /*         5 x             */
 
112
    5 ,                                            /*          /|\            */
 
113
    {                                              /*         //| \           */
 
114
      {ECS_ELT_TYP_FAC_TRIA, { 1 , 2 , 5 }    } ,  /*        // |  \          */
 
115
      {ECS_ELT_TYP_FAC_TRIA, { 1 , 5 , 4 }    } ,  /*     4 x/--|---x 3       */
 
116
      {ECS_ELT_TYP_FAC_TRIA, { 2 , 3 , 5 }    } ,  /*      //   |  /          */
 
117
      {ECS_ELT_TYP_FAC_TRIA, { 3 , 4 , 5 }    } ,  /*     //    | /           */
 
118
      {ECS_ELT_TYP_FAC_QUAD, { 1 , 4 , 3 , 2 }}    /*  1 x-------x 2          */
 
119
    }
 
120
  } ,
 
121
 
 
122
  {                                                /* ECS_ELT_TYP_CEL_PRISM 5 */
 
123
    "penta6",                                      /*                         */
 
124
    6 ,                                            /*  4 x-------x 6          */
 
125
    5 ,                                            /*    |\     /|            */
 
126
    {                                              /*    | \   / |            */
 
127
      {ECS_ELT_TYP_FAC_TRIA, { 1 , 3 , 2 }    } ,  /*  1 x- \-/ -x 3          */
 
128
      {ECS_ELT_TYP_FAC_TRIA, { 4 , 5 , 6 }    } ,  /*     \ 5x  /             */
 
129
      {ECS_ELT_TYP_FAC_QUAD, { 1 , 2 , 5 , 4 }} ,  /*      \ | /              */
 
130
      {ECS_ELT_TYP_FAC_QUAD, { 1 , 4 , 6 , 3 }} ,  /*       \|/               */
 
131
      {ECS_ELT_TYP_FAC_QUAD, { 2 , 3 , 6 , 5 }}    /*        x 2              */
 
132
    }
 
133
  } ,
 
134
 
 
135
  {                                                /* ECS_ELT_TYP_CEL_HEXA  6 */
 
136
    "hexa8",                                       /*                         */
 
137
    8 ,                                            /*                         */
 
138
    6 ,                                            /*     8 x-------x 7       */
 
139
    {                                              /*      /|      /|         */
 
140
      {ECS_ELT_TYP_FAC_QUAD, { 1 , 4 , 3 , 2 }} ,  /*     / |     / |         */
 
141
      {ECS_ELT_TYP_FAC_QUAD, { 1 , 2 , 6 , 5 }} ,  /*  5 x-------x6 |         */
 
142
      {ECS_ELT_TYP_FAC_QUAD, { 1 , 5 , 8 , 4 }} ,  /*    | 4x----|--x 3       */
 
143
      {ECS_ELT_TYP_FAC_QUAD, { 2 , 3 , 7 , 6 }} ,  /*    | /     | /          */
 
144
      {ECS_ELT_TYP_FAC_QUAD, { 3 , 4 , 8 , 7 }} ,  /*    |/      |/           */
 
145
      {ECS_ELT_TYP_FAC_QUAD, { 5 , 6 , 7 , 8 }}    /*  1 x-------x 2          */
 
146
    }
 
147
  } ,
 
148
 
 
149
  {                                                /* ECS_ELT_TYP_FAC_POLY  7 */
 
150
    "polygon",                                     /*                         */
 
151
    0 ,
 
152
    0 ,
 
153
    {
 
154
      {0,{0}}
 
155
    }
 
156
  } ,
 
157
 
 
158
  {                                                /* ECS_ELT_TYP_CEL_POLY  8 */
 
159
    "polyhedron",                                  /*                         */
 
160
    0 ,
 
161
    0 ,
 
162
    {
 
163
      {0,{0}}
 
164
    }
 
165
  }
 
166
 
 
167
} ;
 
168
 
 
169
/*----------------------------------------------------------------------------*/
 
170
 
 
171
#endif /* _ECS_ELT_TYP_LISTE_H_ */