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 <med_outils.h>
22
23 #include <string.h>
24 #include <stdlib.h>
25
26
_MEDnSubdomainJoint30(int dummy,...)27 void _MEDnSubdomainJoint30(int dummy, ...) {
28
29
30 char _path[MED_JOINT_GRP_SIZE+MED_NAME_SIZE+1]=MED_JOINT_GRP;
31 med_int _ret=-1,_err=-1;
32 med_size _tmpn=0;
33
34
35 MED_VARGS_DECL(const, med_idt , , fid );
36 MED_VARGS_DECL(const, char * , const , meshname );
37 MED_VARGS_DECL(, med_int * ,, fret );
38
39 va_list params;
40 va_start(params,dummy);
41
42 MED_VARGS_DEF(const, med_idt , , fid );
43 MED_VARGS_DEF(const, char * , const , meshname );
44 MED_VARGS_DEF(, med_int * ,, fret );
45
46 /*
47 * On inhibe le gestionnaire d'erreur HDF 5
48 */
49 _MEDmodeErreurVerrouiller();
50
51
52 strcat(_path,meshname);
53
54 /*
55 * nombre d'équivalence
56 */
57 if ((_err=_MEDnObjects(fid,_path,&_tmpn)) <0)
58 if ( _err == (MED_ERR_COUNT + MED_ERR_DATAGROUP) ) {
59 MED_ERR_(_ret,MED_ERR_COUNT,MED_ERR_SUBDOMAINJOINT,_path);
60 goto ERROR;
61 }
62
63 _ret = (med_int) _tmpn;
64 ERROR:
65 va_end(params);
66 *fret = _ret;
67 return;
68 }
69
70
71