1 /*  This file is part of MED.
2  *
3  *  COPYRIGHT (C) 1999 - 2019  EDF R&D, CEA/DEN
4  *  MED is free software: you can redistribute it and/or modify
5  *  it under the terms of the GNU Lesser General Public License as published by
6  *  the Free Software Foundation, either version 3 of the License, or
7  *  (at your option) any later version.
8  *
9  *  MED is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU Lesser General Public License for more details.
13  *
14  *  You should have received a copy of the GNU Lesser General Public License
15  *  along with MED.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 
19 #include <med.h>
20 #include <med_config.h>
21 #include <string.h>
22 #include <stdlib.h>
23 #include <med_outils.h>
24 
25 /**\ingroup MEDmesh
26   \brief \MEDmeshnEntityBrief
27   \param fid \fid
28   \param meshname \meshname
29   \param numdt \numdt
30   \param numit \numit
31   \param entitype \entitype
32   \param geotype \geotype
33   \param datatype \datatype
34   \param cmode \cmode
35   \param changement \changement
36   \param transformation \transformation
37   \retval med_int \nent
38   \details \MEDmeshnEntityDetails
39   \remarks
40   \htmlinclude MEDmeshnEntity.html
41  */
42 
43 med_int
MEDmeshnEntity(const med_idt fid,const char * const meshname,const med_int numdt,const med_int numit,const med_entity_type entitype,const med_geometry_type geotype,const med_data_type datatype,const med_connectivity_mode cmode,med_bool * const changement,med_bool * const transformation)44 MEDmeshnEntity(const med_idt fid,
45 	       const char * const meshname,
46 	       const med_int numdt,
47 	       const med_int numit,
48 	       const med_entity_type entitype,
49 	       const med_geometry_type geotype,
50 	       const med_data_type datatype,
51 	       const med_connectivity_mode cmode,
52 	       med_bool * const changement,
53 	       med_bool * const transformation )
54 {
55 
56   char                   _profilename[MED_NAME_SIZE+1]="";
57   med_int                _profilesize=0;
58   med_int                _ret=-1;
59 
60 
61   _ret = _MEDmeshnEntity(fid,  meshname, numdt, numit,entitype,  geotype,
62 		       datatype, cmode, MED_GLOBAL_STMODE,_profilename, &_profilesize,
63 		       changement, transformation );
64 
65   if ( strlen(_profilename) || (_profilesize > 0) ) {
66     MED_ERR_(_ret,MED_ERR_EXIST,MED_ERR_PROFILE,_profilename);
67     goto ERROR;
68   }
69 
70  ERROR:
71   return _ret;
72 }
73