Code_Saturne
CFD tool
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
ecs_med_priv.h
Go to the documentation of this file.
1 #ifndef _ECS_MED_PRIV_H_
2 #define _ECS_MED_PRIV_H_
3 
4 /*============================================================================
5  * Définition de la structure `_ecs_med_t' pour les entrées ou sorties
6  * au format MED
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 /*============================================================================
33  * Visibilité
34  *============================================================================*/
35 
36 #include "cs_config.h"
37 
38 #if defined(HAVE_MED)
39 
40 
41 /*----------------------------------------------------------------------------
42  * Fichiers `include' librairie standard C
43  *----------------------------------------------------------------------------*/
44 
45 
46 /*----------------------------------------------------------------------------
47  * Fichiers `include' publics du paquetage global "Utilitaire"
48  *----------------------------------------------------------------------------*/
49 
50 #include "ecs_def.h"
51 
52 
53 /*----------------------------------------------------------------------------
54  * Fichiers `include' visibles du paquetage global "MED"
55  *----------------------------------------------------------------------------*/
56 
57 #if defined(HAVE_MED)
58 
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62 
63 #undef PACKAGE
64 #undef PACKAGE_BUGREPORT
65 #undef PACKAGE_NAME
66 #undef PACKAGE_STRING
67 #undef PACKAGE_TARNAME
68 #undef PACKAGE_VERSION
69 #undef VERSION
70 
71 #undef HAVE_MPI /* For MED 2.9 */
72 
73 #include <med.h>
74 
75 #undef PACKAGE
76 #undef PACKAGE_BUGREPORT
77 #undef PACKAGE_NAME
78 #undef PACKAGE_STRING
79 #undef PACKAGE_TARNAME
80 #undef PACKAGE_VERSION
81 #undef VERSION
82 
83 #ifdef __cplusplus
84 }
85 #endif
86 
87 #endif /* HAVE_MED */
88 
89 
90 /*----------------------------------------------------------------------------
91  * Fichiers `include' publics des paquetages visibles
92  *----------------------------------------------------------------------------*/
93 
94 
95 /*----------------------------------------------------------------------------
96  * Fichiers `include' publics du paquetage courant
97  *----------------------------------------------------------------------------*/
98 
99 #include "ecs_med.h"
100 
101 
102 /*============================================================================
103  * Définition de macros
104  *============================================================================*/
105 
106 /* Med version */
107 
108 #if !defined(MED_NUM_MAJEUR)
109 #define MED_NUM_MAJEUR 2
110 #define MED_NUM_MINEUR 3
111 #endif
112 
113 #if !defined(MED_MAJOR_NUM)
114 #define MED_MAJOR_NUM MED_NUM_MAJEUR
115 #define MED_MINOR_NUM MED_NUM_MINEUR
116 #endif
117 
118 /* Definition des éléments */
119 /*=========================*/
120 
121 /* Tableau donnant la liste des éléments `paraboliques' ou `cubiques'
122  qui sont transformés en leur equivalent `lineaire' */
123 
124 #define ECS_MED_ORDER_LINEAR 1
125 #define ECS_MED_ORDER_PARABOLIC 2
126 
127 #define ECS_MED_NBR_TYP_ELT 14
128 #define ECS_MED_NBR_MAX_SOM 8
129 
130 /*============================================================================
131  * Définitions d'énumerations
132  *============================================================================*/
133 
134 
135 /*============================================================================
136  * Définitions de types
137  *============================================================================*/
138 
139 /* Structure d'information sur les maillages pour le post traitement */
140 
141 typedef struct {
142 
143  char *nom_maillage; /* Nom du maillage MED */
144  char nom_maillage_med[MED_NAME_SIZE + 1]; /* Nom MED */
145 
147 
148 /* Structure définissant un cas MED */
149 
150 struct _ecs_med_t {
151 
152  char *nom_cas; /* Nom du cas */
153  char *nom_fic; /* Nom du fichier MED */
154 
155  med_idt fid; /* Identificateur de fichier MED */
156  med_int version[3]; /* MED version used to write file */
157 
158  ecs_int_t nbr_maillages; /* Nombre de maillages */
159  ecs_med_maillage_t **tab_maillages; /* Descripteurs des maillages */
160 
161 };
162 
163 
164 typedef struct {
165 
166  med_geometry_type med_typ; /* Type MED de l'element */
167  ecs_elt_typ_t ecs_typ; /* Type ECS de l'element */
168  ecs_int_t order; /* Ordre de l'element */
169  /* Liste des numeros de sommet ECS */
171 
173 
174 /*============================================================================
175  * Définitions de variables globales statiques
176  *============================================================================*/
177 
178 extern const ecs_fic_med_init_elt_t
180 
181 
182 #endif /* HAVE_MED */
183 
184 /*----------------------------------------------------------------------------*/
185 
186 #endif /* _ECS_MED_PRIV_H_ */
187 
int ecs_int_t
Definition: ecs_def.h:131
med_int version[3]
Definition: ecs_med_priv.h:156
#define ECS_MED_NBR_TYP_ELT
Definition: ecs_med_priv.h:127
#define ECS_MED_NBR_MAX_SOM
Definition: ecs_med_priv.h:128
Definition: ecs_med_priv.h:141
ecs_med_maillage_t ** tab_maillages
Definition: ecs_med_priv.h:159
med_idt fid
Definition: ecs_med_priv.h:155
char * nom_fic
Definition: ecs_med_priv.h:153
ecs_int_t nbr_maillages
Definition: ecs_med_priv.h:158
Definition: ecs_med_priv.h:164
char * nom_cas
Definition: ecs_med_priv.h:152
med_geometry_type med_typ
Definition: ecs_med_priv.h:166
char * nom_maillage
Definition: ecs_med_priv.h:143
ecs_int_t order
Definition: ecs_med_priv.h:168
ecs_elt_typ_t
Definition: ecs_def.h:149
const ecs_fic_med_init_elt_t ecs_fic_med_init_elt_liste_c[ECS_MED_NBR_TYP_ELT]
Definition: ecs_med.c:83
Definition: ecs_med_priv.h:150
ecs_elt_typ_t ecs_typ
Definition: ecs_med_priv.h:167