MED fichier
MEDmeshNodeWr.c
Aller à la documentation de ce fichier.
1/* This file is part of MED.
2 *
3 * COPYRIGHT (C) 1999 - 2020 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
46 const char * const meshname,
47 const med_int numdt,
48 const med_int numit,
49 const med_float dt,
50 const med_switch_mode switchmode,
51 const med_int nentity,
52 const med_float * const coordinate,
53 const med_bool withnodename,
54 const char * const nodename,
55 const med_bool withnodenumber,
56 const med_int * const nodenumber,
57 const med_bool withfamnumber,
58 const med_int * const famnumber) {
59
60 med_err _ret = -1;
61 med_entity_type _entitype = MED_NODE;
62 med_geometry_type _geotype = MED_NONE;
63
64 if ( (_ret = MEDmeshNodeCoordinateWr(fid,
65 meshname,
66 numdt,
67 numit,
68 dt,
69 switchmode,
70 nentity,
71 coordinate) ) < 0 ) {
72 MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDmeshNodeCoordinateWr");
73 goto ERROR;
74 }
75
76 if ( withnodename )
77 if ( (_ret = MEDmeshEntityNameWr(fid,
78 meshname,
79 numdt,
80 numit,
81 _entitype,
82 _geotype,
83 nentity,
84 nodename) ) < 0 ) {
85 MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDmeshEntityNameWr");
86 goto ERROR;
87 }
88
89 if ( withnodenumber )
90 if ( (_ret = MEDmeshEntityNumberWr(fid,
91 meshname,
92 numdt,
93 numit,
94 _entitype,
95 _geotype,
96 nentity,
97 nodenumber) ) < 0 ) {
98 MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDmeshEntityNumberWr");
99 goto ERROR;
100 }
101
102 if (withfamnumber)
103 if ( (_ret = MEDmeshEntityFamilyNumberWr(fid,
104 meshname,
105 numdt,
106 numit,
107 _entitype,
108 _geotype,
109 nentity,
110 famnumber) ) < 0 ) {
111 MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDmeshEntityFamilyNumberWr");
112 goto ERROR;
113 }
114
115 _ret = 0;
116 ERROR:
117 return _ret;
118}
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.
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.
MEDC_EXPORT med_err MEDmeshNodeCoordinateWr(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_float dt, const med_switch_mode switchmode, const med_int nentity, const med_float *const coordinates)
Cette routine permet d'écrire dans un maillage le tableau des coordonnées des noeuds,...
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.
med_err MEDmeshNodeWr(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_float dt, const med_switch_mode switchmode, const med_int nentity, const med_float *const coordinate, const med_bool withnodename, const char *const nodename, const med_bool withnodenumber, const med_int *const nodenumber, const med_bool withfamnumber, const med_int *const famnumber)
Cette routine permet l'écriture des noeuds d'un maillage non structuré pour une étape de calcul donné...
Definition: MEDmeshNodeWr.c:45
med_switch_mode
Definition: med.h:96
int med_geometry_type
Definition: med.h:194
med_bool
Definition: med.h:260
int med_int
Definition: med.h:333
#define MED_NONE
Definition: med.h:231
med_entity_type
Definition: med.h:143
@ MED_NODE
Definition: med.h:143
double med_float
Definition: med.h:327
herr_t med_err
Definition: med.h:323
hid_t med_idt
Definition: med.h:322
#define MED_ERR_CALL
Definition: med_err.h:48
#define MED_ERR_API
Definition: med_err.h:111
#define MED_ERR_(rt, r1, r2, r3)
Definition: med_utils.h:160