| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 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 |
|
| 26 |
#include <2.3.6/med23v30.h> |
| 27 |
#include <2.3.6/med23v30_proto.h> |
| 28 |
#include "2.3.6/med23v30_misc.h" |
| 29 |
|
| 30 |
void _MEDequivalenceCorrespondenceSizeInfo236( int dummy, ...) { |
| 31 |
|
| 32 |
|
| 33 |
med_err _ret=-1,_err=-1; |
| 34 |
char _path[MED_MESH_GRP_SIZE+MED_EQUIVALENCE_GRP_SIZE+2*MED_TAILLE_NOM+1+ |
| 35 |
2*MED_TAILLE_NOM_ENTITE+1+1]=MED_MESH_GRP; |
| 36 |
char _entgeoname[2*MED_TAILLE_NOM_ENTITE+2]=""; |
| 37 |
med_size _nocstpncorrespondence=0; |
| 38 |
med_int _intentitytype; |
| 39 |
med_int _intgeotype; |
| 40 |
int _num; |
| 41 |
|
| 42 |
MED_VARGS_DECL(const, med_idt , , fid ); |
| 43 |
MED_VARGS_DECL(const, char * , const , meshname ); |
| 44 |
MED_VARGS_DECL(const, char * , const , equivname); |
| 45 |
MED_VARGS_DECL(const, med_int , , numdt ); |
| 46 |
MED_VARGS_DECL(const, med_int , , numit ); |
| 47 |
MED_VARGS_DECL(const, int , , corit ); |
| 48 |
MED_VARGS_DECL(, med_entity_type *, const , entitype ); |
| 49 |
MED_VARGS_DECL(, med_geometry_type*, const , geotype ); |
| 50 |
MED_VARGS_DECL(, med_int *, const , nentity ); |
| 51 |
MED_VARGS_DECL(, med_err * ,, fret ); |
| 52 |
|
| 53 |
va_list params; |
| 54 |
va_start(params,dummy); |
| 55 |
|
| 56 |
MED_VARGS_DEF(const, med_idt , , fid ); |
| 57 |
MED_VARGS_DEF(const, char * , const , meshname ); |
| 58 |
MED_VARGS_DEF(const, char * , const , equivname); |
| 59 |
MED_VARGS_DEF(const, med_int , , numdt ); |
| 60 |
MED_VARGS_DEF(const, med_int , , numit ); |
| 61 |
MED_VARGS_DEF(const, int , , corit ); |
| 62 |
MED_VARGS_DEF(, med_entity_type *, const , entitype ); |
| 63 |
MED_VARGS_DEF(, med_geometry_type*, const , geotype ); |
| 64 |
MED_VARGS_DEF(, med_int *, const , nentity ); |
| 65 |
MED_VARGS_DEF(, med_err * ,, fret ); |
| 66 |
|
| 67 |
_num = corit -1; |
| 68 |
|
| 69 |
if ( (numdt != MED_NO_DT) || (numit != MED_NO_IT) ) { |
| 70 |
MED_ERR_(_ret,MED_ERR_INVALID,MED_ERR_PARAMETER,""); |
| 71 |
ISCRUTE(numdt);ISCRUTE(numit); goto ERROR; |
| 72 |
} |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
_MEDmodeErreurVerrouiller(); |
| 78 |
|
| 79 |
strcat(_path,meshname); |
| 80 |
strcat(_path,MED_EQUIVALENCE_GRP); |
| 81 |
strcat(_path,equivname); |
| 82 |
strcat(_path,"/"); |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
if ( _MEDobjectGetName(fid, _path ,_num, &_path[strlen(_path)]) < 0 ) { |
| 89 |
MED_ERR_(_ret,MED_ERR_ACCESS,MED_ERR_DATAGROUP,_path);ISCRUTE_int(corit); |
| 90 |
goto ERROR; |
| 91 |
} |
| 92 |
|
| 93 |
if ( _MEDattributeNumRdByName(fid, _path, MED_NOM_ENT,MED_INTERNAL_INT,(unsigned char *)&_intentitytype) < 0 ) { |
| 94 |
MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_NOM_ENT); |
| 95 |
SSCRUTE(_path);ISCRUTE(_intentitytype);goto ERROR; |
| 96 |
} |
| 97 |
*entitype = (med_entity_type) _intentitytype; |
| 98 |
|
| 99 |
if ( _MEDattributeNumRdByName(fid, _path,MED_NOM_GEO,MED_INTERNAL_INT,(unsigned char *)&_intgeotype) < 0) { |
| 100 |
MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_NOM_GEO); |
| 101 |
SSCRUTE(_path);ISCRUTE(_intgeotype);goto ERROR; |
| 102 |
} |
| 103 |
*geotype = (med_geometry_type) _intgeotype; |
| 104 |
|
| 105 |
|
| 106 |
if ( _MEDattributeNumRdByName(fid, _path, MED_NOM_NBR,MED_INTERNAL_INT, (unsigned char *) nentity) < 0) { |
| 107 |
MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_ERR_EQUIVALENCE_MSG); |
| 108 |
SSCRUTE(_path);SSCRUTE(MED_NOM_NBR);ISCRUTE(*nentity); |
| 109 |
goto ERROR; |
| 110 |
} |
| 111 |
|
| 112 |
_ret = 0; |
| 113 |
ERROR: |
| 114 |
|
| 115 |
va_end(params); |
| 116 |
*fret = _ret; |
| 117 |
|
| 118 |
return; |
| 119 |
} |