# MEDfieldnValue.c

Aller à la documentation de ce fichier.

    00001 /*  This file is part of MED.
    00002  *
    00003  *  COPYRIGHT (C) 1999 - 2012  EDF R&D, CEA/DEN
    00004  *  MED is free software: you can redistribute it and/or modify
    00005  *  it under the terms of the GNU Lesser General Public License as published by
    00006  *  the Free Software Foundation, either version 3 of the License, or
    00007  *  (at your option) any later version.
    00008  *
    00009  *  MED is distributed in the hope that it will be useful,
    00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00012  *  GNU Lesser General Public License for more details.
    00013  *
    00014  *  You should have received a copy of the GNU Lesser General Public License
    00015  *  along with MED.  If not, see <http://www.gnu.org/licenses/>.
    00016  */
    00017
    00018
    00019 #include <med.h>
    00020 #include <med_config.h>
    00021 #include <string.h>
    00022 #include <stdlib.h>
    00023 #include <med_outils.h>
    00024
    00037 med_int
    00038 MEDfieldnValue(const med_idt fid,
    00039                const char * const fieldname,
    00040                const med_int numdt,
    00041                const med_int numit,
    00042                const med_entity_type entitype,
    00043                const med_geometry_type geotype)
    00044 {
    00045   med_int  _ret=-1;
    00046   med_int  _profilesize=0,_nintegrationpoint=0;
    00047   char     _localizationname[MED_NAME_SIZE+1]="";
    00048
    00049   if ( (_ret = _MEDfieldnValue(fid,  fieldname, numdt, numit,
    00050                                entitype,  geotype,
    00051                                "",-1,
    00052                                MED_GLOBAL_PFLMODE,
    00053                                &_profilesize, _localizationname, &_nintegrationpoint)) < 0) {
    00054     MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,MED_ERR_FIELD_MSG);
    00055     SSCRUTE(fieldname);ISCRUTE(numdt);ISCRUTE(numit);
    00056     ISCRUTE_int(entitype);ISCRUTE_int(geotype);
    00057     SSCRUTE("_MEDfieldnValue");
    00058     goto ERROR;
    00059   }
    00060
    00061   if ( strlen(_localizationname) ) {
    00062     MED_ERR_(_ret,MED_ERR_NULL,MED_ERR_LOCALIZATION,MED_ERR_FIELD_MSG);
    00063     SSCRUTE(fieldname);ISCRUTE(numdt);ISCRUTE(numit);
    00064     ISCRUTE_int(entitype);ISCRUTE_int(geotype);SSCRUTE(_localizationname);
    00065     goto ERROR;
    00066   }
    00067
    00068  ERROR:
    00069
    00070   return _ret;
    00071 }
    00072
    00073
    00074
    00075