MED fichier
MEDfieldnValue.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 <string.h>
22#include <stdlib.h>
23#include <med_outils.h>
24
39 const char * const fieldname,
40 const med_int numdt,
41 const med_int numit,
42 const med_entity_type entitype,
43 const med_geometry_type geotype)
44{
45 med_int _ret=-1;
46 med_int _profilesize=0,_nintegrationpoint=0;
47 char _localizationname[MED_NAME_SIZE+1]="";
48
49 if ( (_ret = _MEDfieldnValue(fid, fieldname, numdt, numit,
50 entitype, geotype,
51 "",-1,
53 &_profilesize, _localizationname, &_nintegrationpoint)) < 0) {
55 SSCRUTE(fieldname);ISCRUTE(numdt);ISCRUTE(numit);
56 ISCRUTE_int(entitype);ISCRUTE_int(geotype);
57 SSCRUTE("_MEDfieldnValue");
58 goto ERROR;
59 }
60
61 if ( strlen(_localizationname) ) {
63 SSCRUTE(fieldname);ISCRUTE(numdt);ISCRUTE(numit);
64 ISCRUTE_int(entitype);ISCRUTE_int(geotype);SSCRUTE(_localizationname);
65 goto ERROR;
66 }
67
68 ERROR:
69
70 return _ret;
71}
72
73
74
75
#define MED_NAME_SIZE
#define MED_ERR_(rt, r1, r2, r3)
#define SSCRUTE(chaine)
#define ISCRUTE(entier)
#define ISCRUTE_int(entier)
med_int MEDfieldnValue(const med_idt fid, const char *const fieldname, const med_int numdt, const med_int numit, const med_entity_type entitype, const med_geometry_type geotype)
Cette fonction permet de lire le nombre de valeurs dans un champ pour une étape de calcul,...
#define MED_ERR_CALL
Definition med_err.h:48
#define MED_ERR_NULL
Definition med_err.h:35
#define MED_ERR_API
Definition med_err.h:111
#define MED_ERR_FIELD_MSG
Definition med_err.h:141
#define MED_ERR_LOCALIZATION
Definition med_err.h:89
MEDC_EXPORT med_int _MEDfieldnValue(const med_idt fid, const char *const fieldname, const med_int numdt, const med_int numit, const med_entity_type entitype, const med_geometry_type geotype, char *const profilename, const int profileit, const med_storage_mode storagemode, med_int *const profilesize, char *const localizationname, med_int *const nintegrationpoint)