# MEDelementsEcr.c

Aller à la documentation de ce fichier.

    00001 /*  This file is part of MED.
    00002  *
    00003  *  COPYRIGHT (C) 1999 - 2011  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
    00022 med_err
    00023 MEDelementsEcr(med_idt fid,char *maa,med_int mdim,med_int *connectivite,med_mode_switch mode_switch,
    00024                char *nom,med_booleen inom,med_int *num,med_booleen inum,
    00025                med_int *fam,med_int nele,med_entite_maillage type_ent,
    00026                med_geometrie_element typ_geo,med_connectivite typ_conn)
    00027 {
    00028   med_err ret;
    00029   med_entite_maillage _type_ent=type_ent;
    00030
    00031   if ( type_ent == MED_NOEUD_MAILLE ) _type_ent=MED_NOEUD ;
    00032
    00033   /* Ecriture de la connectivite */
    00034   if ((ret = MEDconnEcr(fid,maa,mdim,connectivite,mode_switch,nele,_type_ent,typ_geo,
    00035                         typ_conn)) < 0)
    00036     return -1;
    00037
    00038   /* Ecriture des noms */
    00039   if (inom == MED_VRAI)
    00040     if ((ret = MEDnomEcr(fid,maa,nom,nele,_type_ent,typ_geo)) < 0)
    00041       return -1;
    00042
    00043   /* Ecriture des numeros */
    00044   if (inum == MED_VRAI)
    00045     if ((ret = MEDnumEcr(fid,maa,num,nele,_type_ent,typ_geo)) < 0)
    00046       return -1;
    00047
    00048   /* Ecriture des numeros de familles */
    00049   if ((ret = MEDfamEcr(fid,maa,fam,nele,_type_ent,typ_geo)) < 0)
    00050     return -1;
    00051
    00052   return 0;
    00053 }