MED fichier: Fichier source de MEDmeshElementWr.c

MED fichier

- Documentation MED
- Guides d'utilisation
- Guides de référence

MEDmeshElementWr.c
Aller à la documentation de ce fichier.
1 /* This file is part of MED.
2 *
3 * COPYRIGHT (C) 1999 - 2019 EDF R&D, CEA/DEN
4 * MED is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * MED is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with MED. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18
19 #include <med.h>
20 #include <med_config.h>
21 #include <med_outils.h>
22 #include <string.h>
23 #include <stdlib.h>
24
48 med_err MEDmeshElementWr(const med_idt fid,
49 const char * const meshname,
50 const med_int numdt,
51 const med_int numit,
52 const med_float dt,
53 const med_entity_type entitype,
54 const med_geometry_type geotype,
55 const med_connectivity_mode cmode,
56 const med_switch_mode switchmode,
57 const med_int nentity,
58 const med_int * const connectivity,
59 const med_bool withelementname,
60 const char * const elementname,
61 const med_bool withelementnumber,
62 const med_int * const elementnumber,
63 const med_bool withfamnumber,
64 const med_int * const famnumber) {
65
66 med_err _ret = -1;
67
68 if ( (_ret = MEDmeshElementConnectivityWr(fid,
69 meshname,
70 numdt,
71 numit,
72 dt,
73 entitype,
74 geotype,
75 cmode,
76 switchmode,
77 nentity,
78 connectivity) ) < 0 ) {
79 MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDmeshElementConnectivityWr");
80 goto ERROR;
81 }
82
83 if ( withelementname )
84 if ( (_ret = MEDmeshEntityNameWr(fid,
85 meshname,
86 numdt,
87 numit,
88 entitype,
89 geotype,
90 nentity,
91 elementname) ) < 0 ) {
92 MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDmeshEntityNameWr");
93 goto ERROR;
94 }
95
96 if ( withelementnumber )
97 if ( (_ret = MEDmeshEntityNumberWr(fid,
98 meshname,
99 numdt,
100 numit,
101 entitype,
102 geotype,
103 nentity,
104 elementnumber) ) < 0 ) {
105 MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDmeshEntityNumberWr");
106 goto ERROR;
107 }
108
109 if (withfamnumber)
110 if ( (_ret = MEDmeshEntityFamilyNumberWr(fid,
111 meshname,
112 numdt,
113 numit,
114 entitype,
115 geotype,
116 nentity,
117 famnumber) ) < 0 ) {
118 MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDmeshEntityFamilyNumberWr");
119 goto ERROR;
120 }
121
122 _ret = 0;
123 ERROR:
124 return _ret;
125 }
med_connectivity_mode
med_connectivity_mode
Definition: med.h:252
med_err
herr_t med_err
Definition: med.h:327
MED_ERR_
#define MED_ERR_(rt, r1, r2, r3)
Definition: med_utils.h:158
MEDmeshEntityNameWr
MEDC_EXPORT med_err MEDmeshEntityNameWr(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_entity_type entitype, const med_geometry_type geotype, const med_int nentity, const char *const name)
Cette routine permet d'écrire les noms d'un type d'entité d'un maillage.
Definition: MEDmeshEntityNameWr.c:39
med_switch_mode
med_switch_mode
Definition: med.h:94
med_float
double med_float
Definition: med.h:331
MEDmeshElementConnectivityWr
MEDC_EXPORT med_err MEDmeshElementConnectivityWr(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_float dt, const med_entity_type entitype, const med_geometry_type geotype, const med_connectivity_mode cmode, const med_switch_mode switchmode, const med_int nentity, const med_int *const connectivity)
Cette routine permet d'écrire dans un maillage le tableau des connectivités pour un type géométrique ...
Definition: MEDmeshElementConnectivityWr.c:42
med_entity_type
med_entity_type
Definition: med.h:141
MED_ERR_CALL
#define MED_ERR_CALL
Definition: med_err.h:45
med_int
int med_int
Definition: med.h:337
med_config.h
MEDmeshEntityNumberWr
MEDC_EXPORT med_err MEDmeshEntityNumberWr(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_entity_type entitype, const med_geometry_type geotype, const med_int nentity, const med_int *const number)
Cette routine permet d'écrire les numéros d'un type d'entité d'un maillage.
Definition: MEDmeshEntityNumberWr.c:39
med_idt
hid_t med_idt
Definition: med.h:326
med_outils.h
med.h
med_bool
med_bool
Definition: med.h:257
MEDmeshElementWr
med_err MEDmeshElementWr(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_float dt, const med_entity_type entitype, const med_geometry_type geotype, const med_connectivity_mode cmode, const med_switch_mode switchmode, const med_int nentity, const med_int *const connectivity, const med_bool withelementname, const char *const elementname, const med_bool withelementnumber, const med_int *const elementnumber, const med_bool withfamnumber, const med_int *const famnumber)
Cette routine permet l'écriture d'un type d'élément d'un maillage non structuré pour une séquence de ...
Definition: MEDmeshElementWr.c:48
med_geometry_type
int med_geometry_type
Definition: med.h:191
MED_ERR_API
#define MED_ERR_API
Definition: med_err.h:108
MEDmeshEntityFamilyNumberWr
MEDC_EXPORT med_err MEDmeshEntityFamilyNumberWr(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_entity_type entitype, const med_geometry_type geotype, const med_int nentity, const med_int *const number)
Cette routine permet l'écriture des numéros de famille d'un type d'entité d'un maillage.
Definition: MEDmeshEntityFamilyNumberWr.c:39