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

« back to all changes in this revision

Viewing changes to preprocessor/pre-post/ecs_med_priv.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_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-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
/*============================================================================
 
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
#if MED_MAJOR_NUM == 2 && MED_MINOR_NUM < 9
 
119
#define ECS_MED_VERSION 2
 
120
#else
 
121
#define ECS_MED_VERSION 3
 
122
#endif
 
123
 
 
124
/* Map MED 2 to MED3 names */
 
125
 
 
126
#if ECS_MED_VERSION == 2
 
127
 
 
128
#define MED_NAME_SIZE MED_TAILLE_NOM
 
129
#define MED_SNAME_SIZE MED_TAILLE_PNOM
 
130
#define MED_LNAME_SIZE MED_TAILLE_LNOM
 
131
#define MED_COMMENT_SIZE MED_TAILLE_DESC
 
132
 
 
133
#define MED_CELL MED_MAILLE
 
134
#define MED_POLYGON MED_POLYGONE
 
135
#define MED_POLYHEDRON MED_POLYEDRE
 
136
#define MED_DESCENDING_EDGE MED_ARETE
 
137
#define MED_DESCENDING_FACE MED_FACE
 
138
 
 
139
#define med_axis_type med_repere
 
140
#define med_bool med_booleen
 
141
#define med_mesh_type med_maillage
 
142
#define med_geometry_type med_geometrie_element
 
143
#define med_entity_type med_entite_maillage
 
144
#define med_field_type med_type_champ
 
145
#endif
 
146
 
 
147
/* Definition des éléments */
 
148
/*=========================*/
 
149
 
 
150
/* Tableau donnant la liste des éléments `paraboliques' ou `cubiques'
 
151
   qui sont transformés en leur equivalent `lineaire' */
 
152
 
 
153
#define ECS_MED_ORDER_LINEAR                               1
 
154
#define ECS_MED_ORDER_PARABOLIC                            2
 
155
 
 
156
#define ECS_MED_NBR_TYP_ELT                               14
 
157
#define ECS_MED_NBR_MAX_SOM                                8
 
158
 
 
159
/*============================================================================
 
160
 *                         Définitions d'énumerations
 
161
 *============================================================================*/
 
162
 
 
163
 
 
164
/*============================================================================
 
165
 *                          Définitions de types
 
166
 *============================================================================*/
 
167
 
 
168
/* Structure d'information sur les maillages pour le post traitement */
 
169
 
 
170
typedef struct {
 
171
 
 
172
  char               *nom_maillage;      /* Nom du maillage MED */
 
173
  char                nom_maillage_med[MED_NAME_SIZE + 1];  /* Nom MED */
 
174
 
 
175
} ecs_med_maillage_t;
 
176
 
 
177
/* Structure définissant un cas MED */
 
178
 
 
179
struct _ecs_med_t {
 
180
 
 
181
  char                  *nom_cas;         /* Nom du cas */
 
182
  char                  *nom_fic;         /* Nom du fichier MED */
 
183
 
 
184
  med_idt                fid;             /* Identificateur de fichier MED */
 
185
  med_int                version[3];      /* MED version used to write file */
 
186
 
 
187
  ecs_int_t              nbr_maillages;   /* Nombre de maillages */
 
188
  ecs_med_maillage_t   **tab_maillages;   /* Descripteurs des maillages */
 
189
 
 
190
};
 
191
 
 
192
 
 
193
typedef struct {
 
194
 
 
195
  med_geometry_type   med_typ;     /* Type MED de l'element */
 
196
  ecs_elt_typ_t       ecs_typ;     /* Type ECS de l'element */
 
197
  ecs_int_t           order;       /* Ordre    de l'element */
 
198
                                   /* Liste des numeros de sommet ECS */
 
199
  ecs_int_t           num_som[ECS_MED_NBR_MAX_SOM];
 
200
 
 
201
} ecs_fic_med_init_elt_t;
 
202
 
 
203
/*============================================================================
 
204
 *                Définitions de variables globales statiques
 
205
 *============================================================================*/
 
206
 
 
207
extern const ecs_fic_med_init_elt_t
 
208
ecs_fic_med_init_elt_liste_c[ECS_MED_NBR_TYP_ELT];
 
209
 
 
210
 
 
211
#endif /* HAVE_MED */
 
212
 
 
213
/*----------------------------------------------------------------------------*/
 
214
 
 
215
#endif /* _ECS_MED_PRIV_H_ */
 
216