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 #include <string.h>
23 #include <stdlib.h>
24 
25 #include <2.3.6/med23v30.h>
26 #include <2.3.6/med23v30_proto.h>
27 #include "2.3.6/med23v30_misc.h"
28 
_MEDequivalenceComputingStepInfo236(int dummy,...)29 void _MEDequivalenceComputingStepInfo236(int dummy, ...) {
30 
31 
32   med_err  _ret=-1,_err=-1;
33   int      _dummy =0;
34   med_err  _fret=-1;
35   char     _path[MED_MESH_GRP_SIZE+MED_EQUIVALENCE_GRP_SIZE+2*MED_TAILLE_NOM+1]=MED_MESH_GRP;
36   med_size _nocstpncorrespondence=0;
37 
38   MED_VARGS_DECL(const, med_idt      , , fid                    );
39   MED_VARGS_DECL(const, char * , const , meshname               );
40   MED_VARGS_DECL(const, char * , const , equivname              );
41   MED_VARGS_DECL(const, int          , , csit                   );
42   MED_VARGS_DECL(, med_int *, const    , numdt                  );
43   MED_VARGS_DECL(, med_int *, const    , numit                  );
44   MED_VARGS_DECL(, med_int *, const    , nocstpncorrespondence  );
45   MED_VARGS_DECL(, med_err *                  ,, fret          );
46 
47   va_list params;
48   va_start(params,dummy);
49 
50   MED_VARGS_DEF(const, med_idt      , , fid                    );
51   MED_VARGS_DEF(const, char * , const , meshname               );
52   MED_VARGS_DEF(const, char * , const , equivname              );
53   MED_VARGS_DEF(const, int          , , csit                   );
54   MED_VARGS_DEF(, med_int *, const    , numdt                  );
55   MED_VARGS_DEF(, med_int *, const    , numit                  );
56   MED_VARGS_DEF(, med_int *, const    , nocstpncorrespondence  );
57   MED_VARGS_DEF(, med_err *                  ,, fret          );
58 
59 
60   if ( csit != 1 ) {
61     MED_ERR_(_ret,MED_ERR_INVALID,MED_ERR_PARAMETER,"");
62     ISCRUTE_int(csit); goto ERROR;
63   }
64 
65   /*
66    * On inhibe le gestionnaire d'erreur HDF 5
67    */
68   _MEDmodeErreurVerrouiller();
69 
70   strcat(_path,meshname);
71   strcat(_path,MED_EQUIVALENCE_GRP);
72   strcat(_path,equivname);
73 
74   if ((_err=_MEDnObjects(fid,_path,&_nocstpncorrespondence)) <0)
75     if ( _err == (MED_ERR_COUNT + MED_ERR_DATAGROUP) ) {
76       MED_ERR_(_ret,MED_ERR_COUNT,MED_ERR_CORRESPONDENCE,_path);
77       goto ERROR;
78     }
79 
80   *nocstpncorrespondence = (med_int) _nocstpncorrespondence;
81   *numdt= MED_NO_DT;
82   *numit= MED_NO_IT;
83 
84  _ret = 0;
85 
86 
87   _ret = 0;
88  ERROR:
89 
90   va_end(params);
91   *fret = _ret;
92   return;
93 }
94