MEDmeshElementConnectivityAdvancedWr.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 #include <string.h>
00023 #include <stdlib.h>
00024 
00041 med_err MEDmeshElementConnectivityAdvancedWr(const med_idt               fid,
00042                                              const char*  const          meshname,
00043                                              const med_int               numdt,
00044                                              const med_int               numit,
00045                                              const med_float             dt,
00046                                              const med_entity_type       entitype,
00047                                              const med_geometry_type     geotype,
00048                                              const med_connectivity_mode cmode,
00049                                              const med_filter * const    filter,
00050                                              const med_int* const  connectivity)
00051 {
00052   med_err _ret=-1;
00053   char            _geotypename[MED_NAME_SIZE+1] = "";
00054 
00055 if (_MEDcheckVersion30(fid) < 0) goto ERROR;
00056 
00057   if ( entitype == MED_STRUCT_ELEMENT ) {
00058 
00059     /*Dans le cas particulier des particules,
00060       la connectivité est vide et l'utilisation de profils est interdite.*/
00061     if ( MEDstructElementName(fid, geotype,_geotypename) < 0 ) {
00062       MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDstructElementName");
00063       ISCRUTE_int(geotype);goto ERROR;
00064     }
00065 
00066     if ( !strcmp(_geotypename,"MED_PARTICLE") )
00067       if ( strlen((*filter).profilename ) ){
00068         MED_ERR_(_ret,MED_ERR_USE,MED_ERR_PROFILE,(*filter).profilename);
00069         goto ERROR;
00070       }
00071   }
00072 
00073   _ret = _MEDmeshAdvancedWr(fid,
00074                             meshname,
00075                             MED_CONNECTIVITY,
00076                             MED_NO_NAME,
00077                             MED_INTERNAL_UNDEF,
00078                             numdt,
00079                             numit,
00080                             dt,
00081                             entitype,
00082                             geotype,
00083                             cmode,
00084                             MED_UNDEF_PFLMODE,
00085                             MED_NO_PROFILE,
00086                             MED_UNDEF_INTERLACE,
00087                             MED_ALL_CONSTITUENT,
00088                             filter,
00089                             MED_UNDEF_SIZE,
00090                             connectivity);
00091 
00092  ERROR:
00093  return _ret;
00094 }

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