MEDGeometrieElement.c

Aller à la documentation de ce fichier.
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 
00023 med_err _MEDGeometrieElement(med_geometrie_element typ_geo[],med_entite_maillage typ_ent)
00024 {
00025   int i;
00026   med_geometrie_element typ_mai[MED_NBR_GEOMETRIE_MAILLE] = {MED_POINT1,MED_SEG2, 
00027                                                          MED_SEG3,MED_TRIA3,
00028                                                          MED_TRIA6,MED_QUAD4,
00029                                                          MED_QUAD8,MED_TETRA4,
00030                                                          MED_TETRA10,MED_HEXA8,
00031                                                          MED_HEXA20,MED_PENTA6,
00032                                                          MED_PENTA15,MED_PYRA5,
00033                                                          MED_PYRA13};
00034   med_geometrie_element typ_fac[MED_NBR_GEOMETRIE_FACE] = {MED_TRIA3,MED_TRIA6,
00035                                                        MED_QUAD4,MED_QUAD8};
00036   med_geometrie_element typ_are[MED_NBR_GEOMETRIE_ARETE] = {MED_SEG2,MED_SEG3};  
00037 
00038   switch(typ_ent)
00039     {
00040     case MED_MAILLE :
00041       for (i=0;i<MED_NBR_GEOMETRIE_MAILLE;i++)
00042         typ_geo[i] = typ_mai[i];
00043       break;
00044 
00045     case MED_FACE :
00046       for (i=0;i<MED_NBR_GEOMETRIE_FACE;i++)
00047         typ_geo[i] = typ_fac[i];
00048       break;
00049       
00050     case MED_ARETE :
00051       for (i=0;i<MED_NBR_GEOMETRIE_ARETE;i++)
00052         typ_geo[i] = typ_are[i];
00053       break;
00054 
00055     default :
00056       return -1;
00057     }
00058   return 0;
00059 }

Généré le Thu Oct 8 14:26:16 2015 pour MED fichier par  doxygen 1.6.1