• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ MED_ERR_函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中MED_ERR_函数的典型用法代码示例。如果您正苦于以下问题:C++ MED_ERR_函数的具体用法?C++ MED_ERR_怎么用?C++ MED_ERR_使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了MED_ERR_函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: MEDfieldnComponent

med_int
MEDfieldnComponent(const med_idt fid, 
		   const int ind)
{
  med_err _ret       = -1;
  char    _fieldname[MED_NAME_SIZE+1]="";
  int     _num       = ind-1;
  char    _path        [MED_TAILLE_CHA+MED_NAME_SIZE+1]=MED_CHA;
  /*
   * On inhibe le gestionnaire d'erreur HDF
   */
  _MEDmodeErreurVerrouiller();


  /*
   * On recupere le nom du champ
   */
  if ( _MEDobjectGetName(fid, _path ,_num, _fieldname) < 0 ) {
    MED_ERR_(_ret,MED_ERR_ACCESS,MED_ERR_DATAGROUP,_path);ISCRUTE_int(_num);
    goto ERROR;
  }

  if ( (_ret=MEDfieldnComponentByName( fid, _fieldname )) < 0) {
    MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,MED_ERR_FIELD_MSG);
    SSCRUTE(_fieldname);SSCRUTE(_path);SSCRUTE("MEDfieldnComponentbyName");
    goto ERROR;
  }

 ERROR:
  return _ret;
}
开发者ID:vejmarie,项目名称:libMED,代码行数:31,代码来源:MEDfieldnComponent.c


示例2: MEDfileCommentWr

med_err
MEDfileCommentWr(const med_idt fid,
		 const char* const comment)
{
  med_idt _rootId=0;
  med_err _ret=-1;

  _MEDmodeErreurVerrouiller();
 if (_MEDcheckVersion30(fid) < 0) goto ERROR;

  /* the root data group is open */
  if ((_rootId = _MEDdatagroupOuvrir(fid,"/")) < 0) {
    MED_ERR_(_ret,MED_ERR_OPEN,MED_ERR_DATAGROUP," : '/'");
    goto ERROR;
  }

  /* The comment is stored in a HDF attribute */
  if (_MEDattributeStringWr(_rootId,MED_COMMENT_NAME,MED_COMMENT_SIZE,(char*)comment) < 0) {
    MED_ERR_(_ret,MED_ERR_WRITE,MED_ERR_ATTRIBUTE,MED_COMMENT_NAME);
    SSCRUTE(comment);
    goto ERROR;
  }

  _ret = 0;
 ERROR:

  /* the "/" group has to be closed */
  if (_rootId > 0)
    if (_MEDdatagroupFermer(_rootId) < 0) {
      MED_ERR_(_ret,MED_ERR_CLOSE,MED_ERR_DATAGROUP," : '/'");
    }
  return _ret;
}
开发者ID:vejmarie,项目名称:libMED,代码行数:33,代码来源:MEDfileCommentWr.c


示例3: _MEDsoftlinkDel

med_err _MEDsoftlinkDel(const med_idt               id,
			const char * const          softlinkname,
			med_bool                    linkmustexist
			) {

  med_err         _ret=-1;
  H5L_info_t      _linkinfo;


  if ( H5Lget_info( id, softlinkname,  &_linkinfo, H5P_DEFAULT ) >= 0 ) {
    if ( _linkinfo.type == H5L_TYPE_SOFT ) {
      if ( H5Ldelete(id,softlinkname,H5P_DEFAULT) < 0 ) {
	MED_ERR_(_ret,MED_ERR_DELETE,MED_ERR_LINK,softlinkname);
	goto ERROR;
      }
    } else if (linkmustexist) {
      MED_ERR_(_ret,MED_ERR_UNRECOGNIZED,MED_ERR_LINK,softlinkname);
      goto ERROR;
    }
  } else if (linkmustexist) {
    MED_ERR_(_ret,MED_ERR_OPEN,MED_ERR_LINK,softlinkname);
    goto ERROR;
  }

  _ret=0;
 ERROR:
  return _ret;
}
开发者ID:mndjinga,项目名称:CDMATH,代码行数:28,代码来源:_MEDsoftlinkDel.c


示例4: MEDstructElementInfo

med_err
MEDstructElementInfo(const med_idt             fid,
		     const int                 mit,
		     char *              const modelname,
		     med_geometry_type * const mgeotype,
		     med_int*            const modeldim,
		     char*               const supportmeshname,
		     med_entity_type*    const sentitytype,
		     med_int*            const snnode,
		     med_int*            const sncell,
		     med_geometry_type*  const sgeotype,
		     med_int*            const nconstantattribute,
		     med_bool*           const anyprofile,
		     med_int*            const nvariableattribute
			   )
{

  med_err  _ret=-1;
  char     _path[MED_TAILLE_STRCT+MED_NAME_SIZE+1]=MED_STRCT;
  int      _num = mit -1;

  /*
   * On inhibe le gestionnaire d'erreur HDF 5
   */
  _MEDmodeErreurVerrouiller();

  /*
   * On recupere le nom de l'élément de structure
   */
  if ( _MEDobjectGetName(fid, _path ,_num, modelname) < 0 ) {
    MED_ERR_(_ret,MED_ERR_ACCESS,MED_ERR_DATAGROUP,_path);ISCRUTE_int(mit);
    goto ERROR;
  }
  strcat(_path,modelname);

  if (
      MEDstructElementInfoByName(fid,
				 modelname,
				 mgeotype,
				 modeldim,
				 supportmeshname,
				 sentitytype,
				 snnode,
				 sncell,
				 sgeotype,
				 nconstantattribute,
				 anyprofile,
				 nvariableattribute
				 ) < 0 ) {
    MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,MED_ERR_STRUCT_MSG);
    SSCRUTE(modelname);SSCRUTE(_path);SSCRUTE("MEDstructElementInfoByName");
    goto ERROR;
  }

  _ret = 0;

 ERROR:

  return _ret;
}
开发者ID:vejmarie,项目名称:libMED,代码行数:60,代码来源:MEDstructElementInfo.c


示例5: _MEDdatagroupExist

med_err _MEDdatagroupExist(const med_idt        gid,
			   const char * const   datagroupname,
			   med_bool *   const   datagroupexist,
			   med_bool *   const   isasoftlink )
/*Pour l'instant, dans le modèle interne les liens sont uniquement des liens vers
  des datasets*/

{
  med_err        _ret=-1;
  H5L_info_t     _linkinfo;
  H5O_info_t     _oinfo;

  if ( H5Lget_info( gid, datagroupname,  &_linkinfo, H5P_DEFAULT ) >= 0 ) {

    switch ( _linkinfo.type ) {

    case H5L_TYPE_SOFT:
      *isasoftlink=MED_TRUE;
      _oinfo.type=H5G_LINK;
      break;

    case H5L_TYPE_HARD:
      *isasoftlink  = MED_FALSE;
      if ( H5Oget_info_by_name( gid, datagroupname, &_oinfo, H5P_DEFAULT ) <0) {
	MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"H5Oget_info_by_name");
	SSCRUTE( datagroupname);
      }
      break;

    case H5L_TYPE_EXTERNAL:
    case H5L_TYPE_ERROR:
    default:
      MED_ERR_(_ret,MED_ERR_UNRECOGNIZED,MED_ERR_HDFTYPE, datagroupname);
      ISCRUTE( _linkinfo.type);
      goto ERROR;
      break;
    }

    /*TODO : A vérifier sur un lien de datagroup, à mon avis ne fonctionne pas */
    switch ( _oinfo.type ) {
    case H5G_GROUP:
    case H5G_LINK:
      *datagroupexist = MED_TRUE;
      break;
    default:
      *datagroupexist = MED_FALSE;
    }

  } else {
      *datagroupexist = MED_FALSE;
      *isasoftlink    = MED_FALSE;
  }

  _ret = 0;
 ERROR:

  return _ret;
}
开发者ID:PROJECT-CDMATH,项目名称:CDMATH,代码行数:58,代码来源:_MEDdatagroupExist.c


示例6: MEDfileObjectExist

/**\ingroup MEDfile
  \brief \MEDfileObjectExistBrief
  \param fid \fid
  \param medclass \medclass
  \param objectname \objectname
  \param objectexist \objectexist
  \retval med_err  \error
  \details \MEDfileObjectExistDetails
  \par Remarques
*/
med_err
MEDfileObjectExist(const med_idt           fid,
		   const med_class         medclass,
		   const char      * const objectname,
		         med_bool  * const objectexist )
{
  med_idt _fid = 0;
  med_err _ret = -1;
  char    _link[2*MED_NAME_SIZE+1]="";
  med_bool _datagroupexist=MED_FALSE,_isasoftlink=MED_FALSE;
  int _objsize = 0;

  /* 
   * On inhibe le gestionnaire d'erreur HDF
   */
  _MEDmodeErreurVerrouiller();

  *objectexist = MED_FALSE;
  /*
   * Give access to the class object in the local file
   */
  switch(medclass) {

    MY_CASE(MESH);
    MY_CASE(MESH_SUPPORT);
    MY_CASE(ELSTRUCT);
    MY_CASE(FAMILY);
    MY_CASE(EQUIVALENCE);
    MY_CASE(JOINT);
    MY_CASE(FIELD);
    MY_CASE(LOCALIZATION);
    MY_CASE(PROFILE);
    MY_CASE(INTERPOLATION);
    MY_CASE(NUMERICAL_DATA);

  default :
    MED_ERR_(_ret,MED_ERR_RANGE,MED_ERR_CLASS,_link);
   goto ERROR;
  }

  strncpy(_link+_objsize,objectname,MED_NAME_SIZE+1);
  _link[2*MED_NAME_SIZE]='\0';
	 
  if( _MEDdatagroupExist(fid,_link,&_datagroupexist,&_isasoftlink) < 0 ) {
    MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"_MEDdatagroupExist");
    SSCRUTE(_link);goto ERROR;
  }

  if ( _datagroupexist ) *objectexist = MED_TRUE;

  _ret=0;
 ERROR:

  return _ret;
}
开发者ID:mndjinga,项目名称:CDMATH,代码行数:65,代码来源:MEDfileObjectExist.c


示例7: _MEDmeshUniversalNameRd30

void
_MEDmeshUniversalNameRd30(int dummy, ...)
{


  med_err _ret=-1;
  med_idt _meshid;
  char    _path [MED_TAILLE_MAA+MED_NAME_SIZE+1]=MED_MAA;


  MED_VARGS_DECL(const, med_idt      , , fid       );
  MED_VARGS_DECL(const, char * , const , meshname  );
  MED_VARGS_DECL(, char *, const , univname        );
  MED_VARGS_DECL(, med_err *    ,, fret            );

  va_list params;
  va_start(params,dummy);

  MED_VARGS_DEF(const, med_idt      , , fid       );
  MED_VARGS_DEF(const, char * , const , meshname  );
  MED_VARGS_DEF(, char *, const , univname        );
  MED_VARGS_DEF(, med_err *    ,, fret            );

  /*
   * On inhibe le gestionnaire d'erreur
   */
  _MEDmodeErreurVerrouiller();


  /*
   * Si le maillage n'existe pas => erreur
   */
  strcat(_path,meshname);
  if ((_meshid = _MEDdatagroupOuvrir(fid,_path)) < 0) {
    MED_ERR_(_ret,MED_ERR_OPEN,MED_ERR_DATAGROUP,_path);
    ISCRUTE_id(_meshid);goto ERROR;
  }

  if ( _MEDattrStringLire(_meshid,MED_NOM_UNV,MED_LNAME_SIZE,univname) < 0) {
    _ret = MED_ERR_READ + MED_ERR_ATTRIBUTE;
    goto ERROR;
  }

  _ret = 0;
 ERROR:

  if (_meshid>0)            if (_MEDdatagroupFermer(_meshid) < 0) {
    MED_ERR_(_ret,MED_ERR_CLOSE,MED_ERR_DATAGROUP,_path);
    ISCRUTE_id(_meshid);
  }
  va_end(params);
  *fret = _ret;
  return;
}
开发者ID:vejmarie,项目名称:libMED,代码行数:54,代码来源:_MEDmeshUniversalNameRd30.c


示例8: MEDinterpInfo

/**\ingroup MEDinterp
  \brief \MEDinterpInfoBrief
  \param fid           \fid
  \param interpit      \interpit
  \param interpname    \interpname
  \param geotype       \geotype
  \param cellnode      \cellnode
  \param nbasisfunc \nbasisfunc
  \param nvariable  \nvariable
  \param maxdegree     \maxdegree
  \param nmaxcoef      \nmaxcoef

  \return \error
  \details \MEDinterpInfoDetails
  \see     MEDinterpInfoByName

 */
med_err
MEDinterpInfo(const med_idt                 fid,
	      const int                      interpit,
	            char*              const interpname,
	            med_geometry_type* const geotype,
	            med_bool*          const cellnode,
	            med_int*           const nbasisfunc,
	            med_int*           const nvariable,
	            med_int*           const maxdegree,
	            med_int*           const nmaxcoef
	      )
{
  med_err  _ret=-1;
  char     _interppath[MED_TAILLE_INTERP+MED_NAME_SIZE+1]=MED_INTERP;
  int      _num = interpit -1;

  /*
   * On inhibe le gestionnaire d'erreur HDF 5
   */
  _MEDmodeErreurVerrouiller();

  /*
   * On recupere le nom de l'interpolation
   */
  if ( _MEDobjectGetName(fid, _interppath ,_num, interpname) < 0 ) {
    MED_ERR_(_ret,MED_ERR_ACCESS,MED_ERR_DATAGROUP,_interppath);ISCRUTE_int(interpit);
    goto ERROR;
  }
  strcat(_interppath,interpname);

  if (  MEDinterpInfoByName(fid,
			    interpname,
			    geotype,
			    cellnode,
			    nbasisfunc,
			    nvariable,
			    maxdegree,
			    nmaxcoef
			    )    < 0 ) {
    MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,MED_ERR_INTERP_MSG);
    SSCRUTE(interpname);SSCRUTE(_interppath);SSCRUTE("MEDinterpInfoByName");
    goto ERROR;
  }

  _ret = 0;

 ERROR:

  return _ret;
}
开发者ID:vejmarie,项目名称:libMED,代码行数:67,代码来源:MEDinterpInfo.c


示例9: MEDnInterp

med_int
MEDnInterp(const med_idt fid) {

  med_int        _ret=-1,_err=-1;
  char           _path[MED_INTERPOLATION_GRP_SIZE+1]=MED_INTERPOLATION_GRP;
  med_size       _tmpn=0;

  /*
   * On inhibe le gestionnaire d'erreur HDF 5
   */
  _MEDmodeErreurVerrouiller();

  /*
   *  nombre de link
   */
  if ((_err=_MEDnObjects(fid,_path,&_tmpn)) <0)
    if ( _err == (MED_ERR_COUNT + MED_ERR_DATAGROUP) ) {
      MED_ERR_(_ret,MED_ERR_COUNT,MED_ERR_INTERP,_path);
      goto ERROR;
    }

  _ret = (med_int) _tmpn;
 ERROR:
  return _ret;

}
开发者ID:mndjinga,项目名称:CDMATH,代码行数:26,代码来源:MEDnInterp.c


示例10: MEDfieldnValueWithProfileByName

med_int
MEDfieldnValueWithProfileByName(const med_idt fid,
				const char * const fieldname,
				const med_int numdt,
				const med_int numit,
				const med_entity_type entitype, 
				const med_geometry_type geotype,
				const char * const profilename,
				const med_storage_mode storagemode,
				med_int * const profilesize,
				char * const localizationname, 
				med_int * const nintegrationpoint)
{
  med_int  _ret=-1;

  if ( (_ret = _MEDfieldnValue(fid,  fieldname, numdt, numit,
			      entitype,  geotype,
			      (char * const) profilename,-1,
			      storagemode, profilesize,
			      localizationname, nintegrationpoint)) < 0) {
    MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,MED_ERR_FIELD_MSG);
    SSCRUTE(fieldname);SSCRUTE("_MEDfieldnValue");
    goto ERROR;
  }

 ERROR:

  return _ret;
}
开发者ID:mndjinga,项目名称:CDMATH,代码行数:29,代码来源:MEDfieldnValueWithProfileByName.c


示例11: _MEDgetComputationStepName

med_err
_MEDgetComputationStepName(const med_sorting_type sortingtype, const med_int numdt,
			   const med_int numit, char * const datagroupname)
{

  med_err    _ret=-1;
  long _numdt = numdt;
  long _numit = numit;

  switch (sortingtype) {
  case MED_SORT_DTIT:
    sprintf(datagroupname,"%0*li%0*li",MED_MAX_PARA, _numdt,MED_MAX_PARA, _numit);
    break;
  case MED_SORT_ITDT:
    sprintf(datagroupname,"%0*li%0*li",MED_MAX_PARA, _numit,MED_MAX_PARA, _numdt);
    break;
  default:
    MED_ERR_(_ret,MED_ERR_UNRECOGNIZED,MED_ERR_PARAMETER,"");
    ISCRUTE_int(sortingtype);
    goto ERROR;
  }
  _ret=0;
 ERROR:
  return _ret;

}
开发者ID:PROJECT-CDMATH,项目名称:CDMATH,代码行数:26,代码来源:_MEDgetComputationStepName.c


示例12: MEDnSupportMesh

med_int
MEDnSupportMesh(const med_idt fid)
{
  med_size _n=0;
  med_int  _ret=-1,_err=-1;

  /*
   * On inhibe le gestionnaire d'erreur HDF
   */
  _MEDmodeErreurVerrouiller();


  /*
   *  nombre de champs
   */
  if ((_err=_MEDnObjects(fid,MED_SUP_MAA,&_n)) <0)
    if ( _err == (MED_ERR_COUNT + MED_ERR_DATAGROUP) ) {
      MED_ERR_(_ret,MED_ERR_COUNT,MED_ERR_MESH,MED_MAA);
      goto ERROR;
    }


  _ret = (med_int) _n;
 ERROR:
  return _ret;
}
开发者ID:PROJECT-CDMATH,项目名称:CDMATH,代码行数:26,代码来源:MEDnSupportMesh.c


示例13: fprintf

/*
 * - Nom de la fonction : _MED1cstring
 * - Description : convertit une chaine de caracteres FORTRAN
 *                 en une nouvelle chaine de caracteres C
 *                 dont la longueur est passee en parametre.
 *                 Les caracteres completes sont des blancs
 * Cette routine est utile au les paramètres chaînes f77 au format chaînes de taille fixe de l'API C.
 * - Parametres :
 *     - chaine (IN)          : la chaine FORTRAN
 *     - longueur_reelle (IN) : la longueur de la chaine FORTRAN
 *     - longueur_fixee (IN)  : longueur de la chaine C a construire
 * - Resultat : la nouvelle chaine C en cas de succes, NULL sinon
 */
char *_MED1cstring(char *chaine,int longueur_reelle,int longueur_fixee)
{
  char *nouvelle;
  int i;
  med_err _ret = 0;

  if (longueur_reelle > longueur_fixee) {
    fprintf(stderr,"Erreur n°1 ds _MED1cstring\n");
    return NULL;
  }
  if ((nouvelle = (char *) malloc(sizeof(char)*(longueur_fixee+1))) == NULL) {
    fprintf(stderr,"Erreur n°2 ds _MED1cstring : longueur_reelle %d, longueur_fixee %d\n",longueur_reelle,longueur_fixee);
    MED_ERR_(_ret,MED_ERR_NOTNULL,MED_ERR_API,MED_ERR_NAME_MSG"malloc");
    return NULL;
  }

  for (i=0;i<longueur_reelle;i++)
    *(nouvelle+i) = *(chaine+i);

  for (i=longueur_reelle;i<longueur_fixee;i++)
    *(nouvelle+i) = ' ';

  *(nouvelle+longueur_fixee) = '\0';

  return nouvelle;
}
开发者ID:mndjinga,项目名称:CDMATH,代码行数:39,代码来源:MED1cstring.c


示例14: MEDmeshnEntity

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 )
{

  char                   _profilename[MED_NAME_SIZE+1]="";
  med_int                _profilesize=0;
  med_int                _ret=-1;


  _ret = _MEDmeshnEntity(fid,  meshname, numdt, numit,entitype,  geotype,
		       datatype, cmode, MED_GLOBAL_PFLMODE,_profilename, &_profilesize,
		       changement, transformation );

  if ( strlen(_profilename) || (_profilesize > 0) ) {
    MED_ERR_(_ret,MED_ERR_EXIST,MED_ERR_PROFILE,_profilename);
    goto ERROR;
  }

 ERROR:
  return _ret;
}
开发者ID:PROJECT-CDMATH,项目名称:CDMATH,代码行数:30,代码来源:MEDmeshnEntity.c


示例15: _MEDnFamily236

void _MEDnFamily236(int dummy, ...)
{


  med_int       _ret=-1;
  med_int       _n=0;
  
  MED_VARGS_DECL(const, med_idt      , , fid      );
  MED_VARGS_DECL(const, char * , const , meshname );
  MED_VARGS_DECL(, med_int *          ,, fret     );

  va_list params;
  va_start(params,dummy);

  MED_VARGS_DEF(const, med_idt      , , fid      );
  MED_VARGS_DEF(const, char * , const , meshname );
  MED_VARGS_DEF(, med_int *          ,, fret     );


  if ( ( _n = MEDnFam(fid,(char *) meshname) ) < 0) {
    MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDnFam");
    SSCRUTE(meshname);
    goto ERROR;
  }

  _ret =  _n;
 ERROR:
  va_end(params);
  *fret = _ret;

  return;
}
开发者ID:mndjinga,项目名称:CDMATH,代码行数:32,代码来源:_MEDnFamily236.c


示例16: MEDlocalizationInfo

med_err
MEDlocalizationInfo(const med_idt             fid,
		    const int                 localizationit,
		    char              * const localizationname,
		    med_geometry_type * const geotype,
		    med_int           * const spacedimension,
		    med_int           * const nipoint,
		    char *              const geointerpname,
		    char *              const sectionmeshname,
		    med_int           * const nsectionmeshcell,
		    med_geometry_type * const sectiongeotype)
{
  med_err _ret=-1;
  char    _path[MED_TAILLE_GAUSS+MED_NAME_SIZE+1]=MED_GAUSS;
  int     _num=localizationit-1;

  /*
   * On inhibe le gestionnaire d'erreur HDF 5
   */
  _MEDmodeErreurVerrouiller();

  /*
   * ouverture du groupe /GAUSS/"nom"
   */
  if ( _MEDobjectGetName(fid, _path ,_num, localizationname) < 0 ) {
    MED_ERR_(_ret,MED_ERR_ACCESS,MED_ERR_DATAGROUP,_path);
    ISCRUTE_int(localizationit);
    goto ERROR;
  }

  if ( MEDlocalizationInfoByName(fid, localizationname, geotype, spacedimension,
				 nipoint,geointerpname, 
				 sectionmeshname, nsectionmeshcell,sectiongeotype ) < 0) {
    MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDlocalizationInfoByName");
    SSCRUTE(localizationname);
    goto ERROR;
  }

  _ret = 0;
 ERROR:

  return _ret;
}
开发者ID:vejmarie,项目名称:libMED,代码行数:43,代码来源:MEDlocalizationInfo.c


示例17: MEDparameterComputationStepInfo

med_err
MEDparameterComputationStepInfo(const med_idt      fid,
				const char * const paramname,
				const int          csit,
				med_int * const    numdt,
				med_int * const    numit,
				med_float * const  dt )
{
  med_err _ret = -1, _err = -1;
  med_idt _cpstidt = 0;
  char    _path[(MED_TAILLE_NUM_DATA+MED_NAME_SIZE+1)+2*MED_MAX_PARA+1]=MED_NUM_DATA;
  int     _num=csit-1;
  char    _cstpname[2*MED_MAX_PARA+1]="";

  _MEDmodeErreurVerrouiller();
  
  /* On recupere le nom du pas de temps */
  strcat(_path, paramname);
  if ( _MEDobjectGetName(fid, _path ,_num, _cstpname) < 0 ) {
    MED_ERR_(_ret,MED_ERR_ACCESS,MED_ERR_DATAGROUP,_path);ISCRUTE_int(_num);
    goto ERROR;
  }

  /* on ouvre le groupe HDF correspondant */
  strcat(_path,"/");
  strcat(_path,_cstpname);
  if ((_cpstidt = _MEDdatagroupOuvrir(fid,_path)) < 0) {
    MED_ERR_(_ret,MED_ERR_OPEN,MED_ERR_DATAGROUP,_path);
    goto ERROR;
  }

  /* Lecture des attributs */
  if (_MEDattrEntierLire(_cpstidt, MED_NOM_NDT, (med_int*) numdt) < 0) {
    MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_NOM_NDT);
    SSCRUTE(_path);ISCRUTE(*numdt);goto ERROR;
  }
  if (_MEDattrFloatLire(_cpstidt, MED_NOM_PDT, (med_float*) dt) < 0) {
    MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_NOM_PDT);
    SSCRUTE(_path);RSCRUTE(*dt);goto ERROR;
  }
  if (_MEDattrEntierLire(_cpstidt, MED_NOM_NOR, (med_int*) numit) < 0) {
    MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_NOM_NOR);
    SSCRUTE(_path);ISCRUTE(*numit);goto ERROR;
  }

  _ret = 0;
 ERROR:

  /* on ferme tout */
  if (_cpstidt > 0)            
    if (_MEDdatagroupFermer(_cpstidt) < 0) {
      MED_ERR_(_ret,MED_ERR_CLOSE,MED_ERR_DATAGROUP,_path);
      ISCRUTE_id(_cpstidt);
    }

  return _ret;
}
开发者ID:vejmarie,项目名称:libMED,代码行数:57,代码来源:MEDparameterComputationStepInfo.c


示例18: MEDmeshEntityAttributeAdvancedWr

med_err MEDmeshEntityAttributeAdvancedWr(const med_idt               fid,
					 const char*  const          meshname,
					 const med_data_type         datatype,
					 const med_int               numdt,
					 const med_int               numit,
					 const med_entity_type       entitype,
					 const med_geometry_type     geotype,
					 const med_filter * const    filter,
					 const void * const          attval)
{

  med_err _ret=-1;

  switch (datatype) {
  case MED_NAME:
  case MED_NUMBER:
  case MED_FAMILY_NUMBER:
    break;
  default:
    MED_ERR_(_ret,MED_ERR_RANGE,MED_ERR_PARAMETER,"");
    ISCRUTE_int(datatype);
    goto ERROR;
  }

  _ret= _MEDmeshAdvancedWr(fid,
			   meshname,
			   datatype,
			   MED_NO_NAME,
			   MED_INTERNAL_UNDEF,
			   numdt,
			   numit,
			   MED_UNDEF_DT, /*Si la séquence de calcul n'existe pas, ce champ sera initialisé correctement par d'autres appels.*/
			   entitype,
			   geotype,
			   MED_NODAL,
			   MED_UNDEF_PFLMODE,
			   MED_NO_PROFILE,
			   MED_UNDEF_INTERLACE,
			   MED_ALL_CONSTITUENT,
			   filter,
			   MED_UNDEF_SIZE,
			   attval);
 ERROR:
  return _ret;

}
开发者ID:PROJECT-CDMATH,项目名称:CDMATH,代码行数:46,代码来源:MEDmeshEntityAttributeAdvancedWr.c


示例19: MEDlibraryClose

med_err
MEDlibraryClose(void)
{
  med_err _ret = -1;

  _MEDmodeErreurVerrouiller();

  if ( H5close() < 0) {
    MED_ERR_(_ret,MED_ERR_CLOSE,MED_ERR_LIBRARY,"");
    goto ERROR;
  }

  _ret = 0;
 ERROR:

  return _ret;
}
开发者ID:mndjinga,项目名称:CDMATH,代码行数:17,代码来源:MEDlibraryClose.c


示例20: _MEDequivalenceCorrespondenceRd236

void
_MEDequivalenceCorrespondenceRd236(int dummy, ...) {

  med_err _ret=-1;

  MED_VARGS_DECL(const, med_idt            , , fid            );
  MED_VARGS_DECL(const, char * , const       , meshname       );
  MED_VARGS_DECL(const, char * , const       , equivname      );
  MED_VARGS_DECL(const, med_int            , , numdt          );
  MED_VARGS_DECL(const, med_int            , , numit          );
  MED_VARGS_DECL(const, med_entity_type    , , entitype       );
  MED_VARGS_DECL(const, med_geometry_type  , , geotype        );
  MED_VARGS_DECL(, med_int *, const          , correspondence );
  MED_VARGS_DECL(, med_err *                ,, fret           );

  va_list params;
  va_start(params,dummy);

  MED_VARGS_DEF(const, med_idt            , , fid            );
  MED_VARGS_DEF(const, char * , const       , meshname       );
  MED_VARGS_DEF(const, char * , const       , equivname      );
  MED_VARGS_DEF(const, med_int            , , numdt          );
  MED_VARGS_DEF(const, med_int            , , numit          );
  MED_VARGS_DEF(const, med_entity_type    , , entitype       );
  MED_VARGS_DEF(const, med_geometry_type  , , geotype        );
  MED_VARGS_DEF(, med_int *, const          , correspondence );
  MED_VARGS_DEF(, med_err *                ,, fret           );


  if ( MEDequivLire(fid, (char *) meshname, (char *) equivname, correspondence, -1 ,
		    entitype, geotype) < 0 ) {
    MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDequivLire");
    SSCRUTE(meshname); SSCRUTE(equivname); 
    ISCRUTE_int(entitype);ISCRUTE_int(geotype);goto ERROR;

  }

  _ret=0;
 ERROR:

  va_end(params);
  *fret = _ret;

  return;
}
开发者ID:mndjinga,项目名称:CDMATH,代码行数:45,代码来源:_MEDequivalenceCorrespondenceRd236.c



注:本文中的MED_ERR_函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ MEM函数代码示例发布时间:2022-05-30
下一篇:
C++ ME函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap