med_int nmlcflni(med_int *fid, char *lname, med_int *lnamelen, med_int *gtype, med_int *sdim, med_int *nip,char * giname, char * isname, med_int *nsmc, med_int *sgtype) #endif { med_int _ret; char *_fn1; char _fs2[MED_NAME_SIZE+1]=""; char _fs3[MED_NAME_SIZE+1]=""; med_geometry_type _gtype,_sgtype; _fn1 = _MED2cstring((char *) lname, (int) *lnamelen); if (!_fn1) return(-1); _ret = (med_int) MEDlocalizationInfoByName((med_idt) *fid, _fn1, &_gtype, (med_int *) sdim, (med_int *) nip, _fs2, _fs3, (med_int *) nsmc, &_sgtype); _MEDcstringFree(_fn1); _MEDc2fString(_fs2,giname,MED_NAME_SIZE); _MEDc2fString(_fs3,isname,MED_NAME_SIZE); *gtype = (med_int) _gtype; *sgtype = (med_int) _sgtype; return _ret; }
med_int nmfdfnpf(med_int *fid, char*fname, med_int *fnamelen, med_int *numdt, med_int *numit, med_int *etype, med_int *gtype, char *dpname, char *dlname) #endif { med_int _ret; char *_fn1; char _fs2[MED_NAME_SIZE+1]=""; char _fs3[MED_NAME_SIZE+1]=""; med_geometry_type _gtype = (med_geometry_type) *gtype; med_entity_type _etype = (med_entity_type) *etype; _fn1 = _MED2cstring((char *) fname, (int) *fnamelen); if (!_fn1) return(-1); _ret = (med_int) MEDfieldnProfile((const med_idt) *fid, _fn1, (med_int) *numdt, (med_int) *numit, _etype, _gtype, _fs2, _fs3); _MEDc2fString(_fs2,dpname,MED_NAME_SIZE); _MEDc2fString(_fs3,dlname,MED_NAME_SIZE); _MEDcstringFree(_fn1); return(_ret); }
med_int nmlcflci(med_int *fid, med_int *it, char *lname, med_int *gtype, med_int *sdim, med_int *nip,char * giname, char * isname, med_int *nsmc, med_int *sgtype) #endif { med_int _ret; char _fs1[MED_NAME_SIZE+1]=""; char _fs2[MED_NAME_SIZE+1]=""; char _fs3[MED_NAME_SIZE+1]=""; med_geometry_type _gtype,_sgtype; _ret = (med_int) MEDlocalizationInfo((med_idt) *fid, (med_int) *it, _fs1, &_gtype, (med_int *) sdim, (med_int *) nip, _fs2, _fs3, (med_int *) nsmc, &_sgtype); _MEDc2fString(_fs1,lname,MED_NAME_SIZE); _MEDc2fString(_fs2,giname,MED_NAME_SIZE); _MEDc2fString(_fs3,isname,MED_NAME_SIZE); *gtype = (med_int) _gtype; *sgtype = (med_int) _sgtype; return _ret; }
med_int nmfdffin(med_int *fid, char *fname, med_int *fnamelen, char*mname, med_int *localmesh, med_int *type, char *cname, char *cunit, char *dtunit, med_int *nc) #endif { med_int _ret; char *_fn1; char _fs2[MED_NAME_SIZE+1]=""; char _fs3[MED_SNAME_SIZE+1]=""; char *_fs4, *_fs5; med_field_type _type; med_int _nc; med_bool _lmesh; _fn1 = _MED2cstring((char *) fname, (int) *fnamelen); if (!_fn1) return(-1); _nc = MEDfieldnComponentByName((const med_idt)*fid, _fn1); if (_nc < 0) return (-1); _fs4 = (char *) malloc(sizeof(char)*MED_SNAME_SIZE*(_nc)+1);*_fs4='\0'; _fs5 = (char *) malloc(sizeof(char)*MED_SNAME_SIZE*(_nc)+1);*_fs5='\0'; if (!(_fs4&&_fs5)) return (-1); _ret = (med_int) MEDfieldInfoByName((const med_idt)*fid, _fn1, _fs2, &_lmesh, &_type, _fs4, _fs5, _fs3, (med_int *) nc); *type = (med_int) _type; *localmesh = (med_int) _lmesh; _MEDc2fString(_fs2,mname,MED_NAME_SIZE); _MEDc2fString(_fs3,dtunit,MED_SNAME_SIZE); _MEDc2fString(_fs4,cname,MED_SNAME_SIZE*_nc); _MEDc2fString(_fs5,cunit,MED_SNAME_SIZE*_nc); free(_fs4); free(_fs5); _MEDcstringFree(_fn1); return _ret; }
med_int nmsefvai(med_int *fid, char *mname, med_int *mnamelen, med_int *it, char *aname, med_int *atype, med_int *anc) #endif { med_int _ret; char *_fn1; char _fs1[MED_NAME_SIZE+1]=""; med_attribute_type _atype; _fn1 = _MED2cstring((char *) mname, (int) *mnamelen); if (!_fn1) return(-1); _ret = (med_int) MEDstructElementVarAttInfo((const med_idt) *fid, _fn1, (med_int) *it, _fs1, &_atype, (med_int *) anc); *atype = (med_int) _atype; _MEDc2fString(_fs1,aname,MED_NAME_SIZE); _MEDcstringFree(_fn1); return _ret; }
med_int nmipfipi(med_int *fid, med_int *it, char *name, med_int *gtype, med_int *cnode, med_int *nbf, med_int *nvar, med_int *mdeg, med_int *nmaxc) #endif { med_int _ret; char _fs1[MED_NAME_SIZE+1]; med_geometry_type _gtype; med_bool _cnode; _ret = (med_int) MEDinterpInfo((med_idt) *fid, (med_int) *it, _fs1, &_gtype, &_cnode, (med_int *) nbf, (med_int *) nvar, (med_int *) mdeg, (med_int *) nmaxc ); _MEDc2fString(_fs1,name,MED_NAME_SIZE); *gtype = (med_int) _gtype; *cnode = (med_int) _cnode; return(_ret); }
med_int nmfdfoci(med_int *fid, char* fname,med_int *fnamelen, med_int *it, med_int *numdt, med_int *numit, med_float *dt, med_int *nmesh, char *mname, med_int *lmesh, med_int *mnumdt, med_int *mnumit) #endif { med_int _ret; char *_fn1; char _fs1[MED_NAME_SIZE+1]=""; med_bool _lmesh; _fn1 = _MED2cstring((char *) fname, (int) *fnamelen); if (!_fn1) return(-1); _ret = (med_int) MEDfield23ComputingStepMeshInfo((med_idt)*fid, _fn1, (med_int) *it, (med_int *) numdt, (med_int *) numit, (med_float *) dt, (med_int *) nmesh, _fs1, &_lmesh, (med_int *) mnumdt, (med_int *) mnumit); *lmesh = (med_int) _lmesh; _MEDc2fString(_fs1,mname,MED_NAME_SIZE); _MEDcstringFree(_fn1); return _ret; }
med_int nmfifnam(med_idt *fid, char const *filename, /* const med_int const *filenamesize, */ const med_int const *filenamelen) #endif { char *_fn=NULL; med_int _ret=-1; /* ISCRUTE(*filenamesize); */ /* ISCRUTE(*filenamelen); */ /* ISCRUTE_id(*fid); */ _ret = MEDfileName(*fid, NULL, 0); /* ISCRUTE(_ret); */ /* if ( (_ret<0) || ( (*filenamesize) == 0) ) return _ret; */ if ( (_ret<0) || ( (*filenamelen) == 0) ) return _ret; if ( (*filenamelen != 0) && ( (_ret) > (*filenamelen) ) ) return -1; char *_fs1=(char *) malloc(_ret*sizeof(char)+1); _ret = (med_int) MEDfileName(*fid,_fs1, *filenamelen); /* SSCRUTE(_fs1); */ /* ISCRUTE(*filenamesize); */ /* ISCRUTE_id(*fid); */ _MEDc2fString(_fs1,(char*)filename,*filenamelen); free(_fs1); return(_ret); }
med_int nmfdfonv(med_int *fid, char*fname, med_int *fnamelen, med_int *numdt, med_int *numit, med_int *etype, med_int *gtype, char* mname, med_int *mnamelen, med_int *pit, med_int *stm, char *pname, med_int *psize, char *lname, med_int *nip) #endif { med_int _ret; char *_fn1, *_fn2; char _fs2[MED_NAME_SIZE+1]=""; char _fs3[MED_NAME_SIZE+1]=""; med_geometry_type _gtype = (med_geometry_type) *gtype; med_entity_type _etype = (med_entity_type) *etype; med_storage_mode _stm = (med_storage_mode) *stm; _fn1 = _MED2cstring((char *) fname, (int) *fnamelen); if (!_fn1) return(-1); _fn2= _MED2cstring((char *) mname, (int) *mnamelen); if (!_fn2) return(-1); _ret = (med_int) MEDfield23nValueWithProfile((med_idt) *fid, _fn1, (med_int) *numdt, (med_int) *numit, _etype, _gtype, _fn2, (med_int) *pit, _stm, _fs2, (med_int *) psize, _fs3, (med_int *) nip); _MEDc2fString(_fs2,pname,MED_NAME_SIZE); _MEDc2fString(_fs3,lname,MED_NAME_SIZE); _MEDcstringFree(_fn1); _MEDcstringFree(_fn2); return(_ret); }
med_int nmsefsei(med_int *fid, med_int *it, char *mname, med_int *mgtype, med_int * mdim, char *smname, med_int *setype, med_int *snnode, med_int *sncell, med_int *sgtype, med_int *ncatt, med_int *ap, med_int *nvatt) #endif { med_int _ret; char _fs1[MED_NAME_SIZE+1]=""; char _fs2[MED_NAME_SIZE+1]=""; med_entity_type _setype; med_geometry_type _mgeotype; med_geometry_type _sgtype; med_bool _ap; _ret = (med_int) MEDstructElementInfo((const med_idt) *fid, (med_int) *it, _fs1, &_mgeotype, (med_int *) mdim, _fs2, &_setype, (med_int *) snnode, (med_int *) sncell, &_sgtype, (med_int *) ncatt, &_ap, (med_int *) nvatt); _MEDc2fString(_fs1,mname,MED_NAME_SIZE); _MEDc2fString(_fs2,smname,MED_NAME_SIZE); *mgtype = (med_int) _mgeotype; *setype = (med_int) _setype; *sgtype = (med_int) _sgtype; *ap = (med_int) _ap; return _ret; }
med_int nmsefcai(med_int *fid, char *mname, med_int *mnamelen, med_int *it, char *aname, med_int *atype, med_int *anc, med_int *setype, char *pname, med_int *psize) #endif { med_int _ret; char *_fn1; med_attribute_type _atype; med_entity_type _setype; char _fs1[MED_NAME_SIZE+1]=""; char _fs2[MED_NAME_SIZE+1]=""; _fn1 = _MED2cstring((char *) mname, (int) *mnamelen); if (!_fn1) return(-1); _ret = (med_int) MEDstructElementConstAttInfo((const med_idt) *fid, _fn1, (med_int) *it, _fs1, &_atype, (med_int *) anc, &_setype, _fs2, (med_int *) psize); *atype = (med_int) _atype; *setype = (med_int) _setype; _MEDc2fString(_fs1,aname,MED_NAME_SIZE); _MEDc2fString(_fs2,pname,MED_NAME_SIZE); _MEDcstringFree(_fn1); return _ret; }
med_int nmfifsvr(const med_idt const *fid, char* const medversion, const med_int const *len) #endif { med_int _ret; char _fs1[20]=""; _ret = (med_int) MEDfileStrVersionRd(*fid, _fs1); _MEDc2fString(_fs1,medversion,*len); return(_ret); }
med_int nmfifcor(const med_idt const *fid, char const *comment, const med_int *commentlen) #endif { med_int _ret; char _fs1[MED_COMMENT_SIZE+1]=""; _ret = (med_int) MEDfileCommentRd(*fid,_fs1); _MEDc2fString(_fs1,(char*)comment,*commentlen); return(_ret); }
med_int nmsefsen(med_int *fid, med_int *mgtype, char *mname) #endif { med_int _ret; char _fs1[MED_NAME_SIZE+1]=""; med_geometry_type _mgtype = (med_geometry_type) *mgtype; _ret = (med_int) MEDstructElementName((const med_idt) *fid, _mgtype, _fs1); _MEDc2fString(_fs1,mname,MED_NAME_SIZE); return _ret; }
med_int nmsefsin(med_int *fid, char *mname, med_int *mnamelen, med_int *mgtype, med_int * mdim, char *smname, med_int *setype, med_int *snnode, med_int *sncell, med_int *sgtype, med_int *ncatt, med_int *ap, med_int *nvatt) #endif { med_int _ret; char *_fn1; char _fs2[MED_NAME_SIZE+1]=""; med_entity_type _setype; med_geometry_type _mgeotype; med_geometry_type _sgtype; med_bool _ap; _fn1 = _MED2cstring((char *) mname, (int) *mnamelen); if (!_fn1) return(-1); _ret = (med_int) MEDstructElementInfoByName((const med_idt) *fid, _fn1, &_mgeotype, (med_int *) mdim, _fs2, &_setype, (med_int *) snnode, (med_int *) sncell, &_sgtype, (med_int *) ncatt, &_ap, (med_int *) nvatt); _MEDc2fString(_fs2,smname,MED_NAME_SIZE); *mgtype = (med_int) _mgeotype; *setype = (med_int) _setype; *sgtype = (med_int) _sgtype; *ap = (med_int) _ap; _MEDcstringFree(_fn1); return _ret; }
med_int nmfdfini(med_int *fid, char *fname, med_int *fnamelen, med_int *it, char *iname) #endif { med_err _ret=0; char *_fn1; char _fs1[MED_NAME_SIZE+1]=""; _fn1 = _MED2cstring((char *) fname, (int) *fnamelen); if (!_fn1) return(-1); _ret = (med_int) MEDfieldInterpInfo((med_idt) *fid, _fn1, (med_int) *it, _fs1); _MEDc2fString(_fs1,iname,MED_NAME_SIZE); _MEDcstringFree(_fn1); return (_ret); }
med_int nmsefsar(med_int *fid, char *mname, med_int *mnamelen, char *aname, med_int *anamelen, char *val) #endif { med_int _ret; char *_fn1, *_fn2; char *_fs1; med_entity_type _setype; med_geometry_type _mgeotype, _gctype; med_geometry_type _sgtype; med_int _mdim, _nnode, _ncell; char _meshname[MED_NAME_SIZE+1]=""; char _pname[MED_NAME_SIZE+1]=""; med_entity_type _etype; med_int _ncatt, _nvatt, _ncomp, _psize; med_bool _ap; med_attribute_type _type; int _size=0; _fn1 = _MED2cstring((char *) mname, (int) *mnamelen); if (!_fn1) return(-1); _fn2 = _MED2cstring((char *) aname, (int) *anamelen); if (!_fn2) return(-1); if (MEDstructElementInfoByName((med_idt) *fid, _fn1, &_mgeotype, &_mdim, _meshname, &_etype, &_nnode, &_ncell, &_gctype, &_ncatt, &_ap, &_nvatt) < 0) return -1; if (MEDstructElementConstAttInfoByName((med_idt) *fid, _fn1, _fn2, &_type, &_ncomp, &_setype, _pname, &_psize) < 0) return -1; if (_psize != 0) _size = _psize*_ncomp*MED_NAME_SIZE*sizeof(char); else if (_etype == MED_NODE) _size = _nnode*_ncomp*MED_NAME_SIZE*sizeof(char); else _size = _ncell*_ncomp*MED_NAME_SIZE*sizeof(char); _fs1 = (char *) malloc(_size+1); *_fs1='\0'; _ret = (med_int) MEDstructElementConstAttRd((const med_idt) *fid, _fn1, _fn2, (void *) _fs1); _MEDc2fString(_fs1,val,_size); free(_fs1); _MEDcstringFree(_fn1); _MEDcstringFree(_fn2); return _ret; }