# MEDlocalizationInfo.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
    00038 #include <med.h>
    00039 #include <med_config.h>
    00040 #include <med_outils.h>
    00041
    00042 #include <string.h>
    00043 #include <stdlib.h>
    00044
    00045 med_err
    00046 MEDlocalizationInfo(const med_idt             fid,
    00047                     const int                 localizationit,
    00048                     char              * const localizationname,
    00049                     med_geometry_type * const geotype,
    00050                     med_int           * const spacedimension,
    00051                     med_int           * const nipoint,
    00052                     char *              const geointerpname,
    00053                     char *              const sectionmeshname,
    00054                     med_int           * const nsectionmeshcell,
    00055                     med_geometry_type * const sectiongeotype)
    00056 {
    00057   med_err _ret=-1;
    00058   char    _path[MED_TAILLE_GAUSS+MED_NAME_SIZE+1]=MED_GAUSS;
    00059   int     _num=localizationit-1;
    00060
    00061   /*
    00062    * On inhibe le gestionnaire d'erreur HDF 5
    00063    */
    00064   _MEDmodeErreurVerrouiller();
    00065
    00066   /*
    00067    * ouverture du groupe /GAUSS/"nom"
    00068    */
    00069   if ( _MEDobjectGetName(fid, _path ,_num, localizationname) < 0 ) {
    00070     MED_ERR_(_ret,MED_ERR_ACCESS,MED_ERR_DATAGROUP,_path);
    00071     ISCRUTE_int(localizationit);
    00072     goto ERROR;
    00073   }
    00074
    00075   if ( MEDlocalizationInfoByName(fid, localizationname, geotype, spacedimension,
    00076                                  nipoint,geointerpname,
    00077                                  sectionmeshname, nsectionmeshcell,sectiongeotype ) < 0) {
    00078     MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDlocalizationInfoByName");
    00079     SSCRUTE(localizationname);
    00080     goto ERROR;
    00081   }
    00082
    00083   _ret = 0;
    00084  ERROR:
    00085
    00086   return _ret;
    00087 }