00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <med.h>
00020 #include <med_config.h>
00021 #include <med_outils.h>
00022
00023 #include <string.h>
00024 #include <stdlib.h>
00025
00026 #include <2.3.6/med23v30.h>
00027 #include <2.3.6/med23v30_proto.h>
00028 #include "2.3.6/med23v30_misc.h"
00029
00030 void _MEDsubdomainJointInfo236(int dummy, ...) {
00031
00032
00033 med_idt _jntid=0;
00034 med_err _ret=-1,_err=-1;
00035 char _path[MED_TAILLE_MAA+MED_TAILLE_JNT+MED_TAILLE_NOM+1]=MED_MAA;
00036 int _num;
00037 med_size _nstep=0,_nocstpncorrespondence=0;
00038
00039
00040 MED_VARGS_DECL(const, med_idt , , fid );
00041 MED_VARGS_DECL(const, char * , const , localmeshname );
00042 MED_VARGS_DECL(const, int , , jointit );
00043 MED_VARGS_DECL(, char *, const , jointname );
00044 MED_VARGS_DECL(, char *, const , description );
00045 MED_VARGS_DECL(, med_int *, const , domainnumber );
00046 MED_VARGS_DECL(, char *, const , remotemeshname );
00047 MED_VARGS_DECL(, med_int *, const , nstep );
00048 MED_VARGS_DECL(, med_int *, const , nocstpncorrespondence );
00049 MED_VARGS_DECL(, med_err * ,, fret );
00050
00051 va_list params;
00052 va_start(params,dummy);
00053
00054 MED_VARGS_DEF(const, med_idt , , fid );
00055 MED_VARGS_DEF(const, char * , const , localmeshname );
00056 MED_VARGS_DEF(const, int , , jointit );
00057 MED_VARGS_DEF(, char *, const , jointname );
00058 MED_VARGS_DEF(, char *, const , description );
00059 MED_VARGS_DEF(, med_int *, const , domainnumber );
00060 MED_VARGS_DEF(, char *, const , remotemeshname );
00061 MED_VARGS_DEF(, med_int *, const , nstep );
00062 MED_VARGS_DEF(, med_int *, const , nocstpncorrespondence );
00063 MED_VARGS_DEF(, med_err * ,, fret );
00064
00065 _num=jointit-1;
00066
00067
00068
00069
00070 _MEDmodeErreurVerrouiller();
00071
00072
00073
00074
00075
00076 strcat(_path,localmeshname);
00077 strcat(_path,MED_JNT);
00078 if ( _MEDobjectGetName(fid, _path ,_num, jointname) < 0 ) {
00079 MED_ERR_(_ret,MED_ERR_ACCESS,MED_ERR_DATAGROUP,_path);ISCRUTE_int(jointit);
00080 SSCRUTE(_path);
00081 goto ERROR;
00082 }
00083
00084
00085
00086
00087
00088 strcat(_path,jointname);
00089 if ((_jntid = _MEDdatagroupOuvrir(fid,_path)) < 0) {
00090 MED_ERR_(_ret,MED_ERR_OPEN,MED_ERR_DATAGROUP,MED_ERR_SUBDOMAINJOINT_MSG);
00091 SSCRUTE(_path);
00092 goto ERROR;
00093 }
00094
00095
00096
00097
00098 if ( _MEDattrStringLire(_jntid,MED_NOM_DES,MED_TAILLE_DESC,description) < 0) {
00099 MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_ERR_SUBDOMAINJOINT_MSG);
00100 SSCRUTE(jointname);SSCRUTE(_path);SSCRUTE(MED_NOM_DES);
00101 goto ERROR;
00102 }
00103
00104
00105
00106 if ( _MEDattrStringLire(_jntid,MED_NOM_MAI,MED_TAILLE_NOM,remotemeshname) < 0) {
00107 MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_ERR_SUBDOMAINJOINT_MSG);
00108 SSCRUTE(jointname);SSCRUTE(_path);SSCRUTE(MED_NOM_MAI);SSCRUTE(remotemeshname);
00109 goto ERROR;
00110 }
00111
00112
00113
00114
00115 if (_MEDattrEntierLire(_jntid,MED_NOM_DOM,domainnumber) < 0){
00116 MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_ERR_SUBDOMAINJOINT_MSG);
00117 SSCRUTE(jointname);SSCRUTE(_path);SSCRUTE(MED_NOM_DOM);ISCRUTE(*domainnumber);
00118 goto ERROR;
00119 }
00120
00121
00122
00123
00124
00125 if ((_err=_MEDnObjects(_jntid, _path, &_nocstpncorrespondence)) < 0 )
00126 if ( _err == (MED_ERR_COUNT + MED_ERR_DATAGROUP) ) {
00127 MED_ERR_(_ret,MED_ERR_COUNT,MED_ERR_DATAGROUP,_path);
00128 goto ERROR;
00129 }
00130
00131 *nocstpncorrespondence = (med_int) _nocstpncorrespondence;
00132
00133
00134 *nstep=1;
00135
00136 _ret = 0;
00137
00138 ERROR:
00139
00140 if (_jntid>0) if (_MEDdatagroupFermer(_jntid) < 0) {
00141 MED_ERR_(_ret,MED_ERR_CLOSE,MED_ERR_DATAGROUP,_path);
00142 ISCRUTE_id(_jntid);
00143 }
00144
00145 va_end(params);
00146 *fret = _ret;
00147 return;
00148 }
00149
00150