MEDfieldnValue.c
Aller à la documentation de ce fichier.
/* This file is part of MED.
*
* COPYRIGHT (C) 1999 - 2021 EDF R&D, CEA/DEN
* MED is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MED is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with MED. If not, see <http://www.gnu.org/licenses/>.
*/
#include <med.h>
#include <med_config.h>
#include <string.h>
#include <stdlib.h>
#include <med_outils.h>
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)
{
med_int _ret=-1;
med_int _profilesize=0,_nintegrationpoint=0;
char _localizationname[MED_NAME_SIZE+1]="";
if ( (_ret = _MEDfieldnValue(fid, fieldname, numdt, numit,
entitype, geotype,
"",-1,
MED_GLOBAL_STMODE,
&_profilesize, _localizationname, &_nintegrationpoint)) < 0) {
MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,MED_ERR_FIELD_MSG);
SSCRUTE(fieldname);ISCRUTE(numdt);ISCRUTE(numit);
ISCRUTE_int(entitype);ISCRUTE_int(geotype);
SSCRUTE("_MEDfieldnValue");
goto ERROR;
}
if ( strlen(_localizationname) ) {
MED_ERR_(_ret,MED_ERR_NULL,MED_ERR_LOCALIZATION,MED_ERR_FIELD_MSG);
SSCRUTE(fieldname);ISCRUTE(numdt);ISCRUTE(numit);
ISCRUTE_int(entitype);ISCRUTE_int(geotype);SSCRUTE(_localizationname);
goto ERROR;
}
ERROR:
return _ret;
}
MED_ERR_API
#define MED_ERR_API
Definition: med_err.h:111
MED_ERR_LOCALIZATION
#define MED_ERR_LOCALIZATION
Definition: med_err.h:89
med_geometry_type
int med_geometry_type
Definition: med.h:194
ISCRUTE_int
#define ISCRUTE_int(entier)
Definition: med_utils.h:314
med_idt
hid_t med_idt
Definition: med.h:331
MED_ERR_
#define MED_ERR_(rt, r1, r2, r3)
Definition: med_utils.h:160
med_entity_type
med_entity_type
Definition: med.h:143
med_int
int med_int
Definition: med.h:342
MED_ERR_CALL
#define MED_ERR_CALL
Definition: med_err.h:48
med.h
ISCRUTE
#define ISCRUTE(entier)
Definition: med_utils.h:313
_MEDfieldnValue
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)
SSCRUTE
#define SSCRUTE(chaine)
Definition: med_utils.h:323
MEDfieldnValue
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,...
Definition: MEDfieldnValue.c:38
MED_GLOBAL_STMODE
Definition: med.h:109
MED_NAME_SIZE
#define MED_NAME_SIZE
Definition: med.h:81
med_outils.h
med_config.h
MED_ERR_FIELD_MSG
#define MED_ERR_FIELD_MSG
Definition: med_err.h:141
MED_ERR_NULL
#define MED_ERR_NULL
Definition: med_err.h:35