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 va_list params;
00033 va_start(params,dummy);
00034
00035 const med_idt fid = va_arg(params,const med_idt );
00036 const char * const localmeshname = va_arg(params,const char * const );
00037 const int jointit = va_arg(params,const int );
00038 char * const jointname = va_arg(params,char * const );
00039 char * const description = va_arg(params,char * const );
00040 med_int * const domainnumber = va_arg(params,med_int * const );
00041 char * const remotemeshname = va_arg(params,char * const );
00042 med_int * const nstep = va_arg(params,med_int * const );
00043 med_int * const nocstpncorrespondence = va_arg(params,med_int * const );
00044 med_err * fret = va_arg(params,med_err * );
00045
00046 med_idt _jntid=0;
00047 med_err _ret=-1,_err=-1;
00048 char _path[MED_TAILLE_MAA+MED_TAILLE_JNT+MED_TAILLE_NOM+1]=MED_MAA;
00049 int _num=jointit-1;
00050 med_size _nstep=0,_nocstpncorrespondence=0;
00051
00052
00053
00054
00055 _MEDmodeErreurVerrouiller();
00056
00057
00058
00059
00060
00061 strcat(_path,localmeshname);
00062 strcat(_path,MED_JNT);
00063 if ( _MEDobjectGetName(fid, _path ,_num, jointname) < 0 ) {
00064 MED_ERR_(_ret,MED_ERR_ACCESS,MED_ERR_DATAGROUP,_path);ISCRUTE_int(jointit);
00065 SSCRUTE(_path);
00066 goto ERROR;
00067 }
00068
00069
00070
00071
00072
00073 strcat(_path,jointname);
00074 if ((_jntid = _MEDdatagroupOuvrir(fid,_path)) < 0) {
00075 MED_ERR_(_ret,MED_ERR_OPEN,MED_ERR_DATAGROUP,MED_ERR_SUBDOMAINJOINT_MSG);
00076 SSCRUTE(_path);
00077 goto ERROR;
00078 }
00079
00080
00081
00082
00083 if ( _MEDattrStringLire(_jntid,MED_NOM_DES,MED_TAILLE_DESC,description) < 0) {
00084 MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_ERR_SUBDOMAINJOINT_MSG);
00085 SSCRUTE(jointname);SSCRUTE(_path);SSCRUTE(MED_NOM_DES);
00086 goto ERROR;
00087 }
00088
00089
00090
00091 if ( _MEDattrStringLire(_jntid,MED_NOM_MAI,MED_TAILLE_NOM,remotemeshname) < 0) {
00092 MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_ERR_SUBDOMAINJOINT_MSG);
00093 SSCRUTE(jointname);SSCRUTE(_path);SSCRUTE(MED_NOM_MAI);SSCRUTE(remotemeshname);
00094 goto ERROR;
00095 }
00096
00097
00098
00099
00100 if (_MEDattrEntierLire(_jntid,MED_NOM_DOM,domainnumber) < 0){
00101 MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_ERR_SUBDOMAINJOINT_MSG);
00102 SSCRUTE(jointname);SSCRUTE(_path);SSCRUTE(MED_NOM_DOM);ISCRUTE(*domainnumber);
00103 goto ERROR;
00104 }
00105
00106
00107
00108
00109
00110 if ((_err=_MEDnObjects(_jntid, _path, &_nocstpncorrespondence)) < 0 )
00111 if ( _err == (MED_ERR_COUNT + MED_ERR_DATAGROUP) ) {
00112 MED_ERR_(_ret,MED_ERR_COUNT,MED_ERR_DATAGROUP,_path);
00113 goto ERROR;
00114 }
00115
00116 *nocstpncorrespondence = (med_int) _nocstpncorrespondence;
00117
00118
00119 *nstep=1;
00120
00121 _ret = 0;
00122
00123 ERROR:
00124
00125 if (_jntid>0) if (_MEDdatagroupFermer(_jntid) < 0) {
00126 MED_ERR_(_ret,MED_ERR_CLOSE,MED_ERR_DATAGROUP,_path);
00127 ISCRUTE_id(_jntid);
00128 }
00129
00130 va_end(params);
00131 *fret = _ret;
00132 return;
00133 }
00134
00135
00136
00137