00001 /* This file is part of MED. 00002 * 00003 * COPYRIGHT (C) 1999 - 2015 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 <med_outils.h> 00022 #include <string.h> 00023 00024 /* 00025 * - Nom de la fonction : _MEDnomEntite 00026 * - Description : fournit le nom associe a un type d'entite MED 00027 * - Parametres : 00028 * - nom_ent (OUT) : le nom de l'entite 00029 * - type_ent (IN) : le type de l'entite 00030 * - Resultat : 0 en cas de succes, -1 sinon 00031 */ 00032 med_err _MEDnomEntite(char *nom_ent,med_entite_maillage type_ent) 00033 { 00034 switch(type_ent) 00035 { 00036 case MED_NOEUD : 00037 strcpy(nom_ent,MED_NOM_NOE); 00038 break; 00039 00040 /* MED_NOEUD_...ne devrait pas intervenir à ce niveau, 00041 mais évite une modification sélective 00042 dans les API de gestion des champs */ 00043 case MED_NOEUD_MAILLE : 00044 strcpy(nom_ent,MED_NOM_NOE); 00045 break; 00046 00047 case MED_MAILLE : 00048 strcpy(nom_ent,MED_NOM_MAI); 00049 break; 00050 00051 case MED_FACE : 00052 strcpy(nom_ent,MED_NOM_FAC); 00053 break; 00054 00055 case MED_ARETE : 00056 strcpy(nom_ent,MED_NOM_ARE); 00057 break; 00058 00059 default : 00060 return -1; 00061 } 00062 return 0; 00063 }