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 #include <string.h>
00023 #include <stdlib.h>
00024
00025 void _MEDsubdomainCorrespondenceSizeInfo30(int dummy, ...) {
00026
00027
00028 med_err _ret=-1;
00029 med_idt _datagroup1=0,_dataset=0;
00030 int _num;
00031 char _path[MED_TAILLE_JNT+2*MED_NAME_SIZE+2+2*MED_MAX_PARA+1+4*MED_TAILLE_NOM_ENTITE+4]=MED_JNT;
00032 char _datagroupname1[2*MED_TAILLE_NOM_ENTITE+2]="";
00033 char _cstpname[2*MED_MAX_PARA+1]="";
00034 med_sorting_type _sortingtype=0;
00035 med_int _intlocalentitype;
00036 med_int _intlocalgeotype;
00037 med_int _intremoteentitype;
00038 med_int _intremotegeotype;
00039
00040
00041 MED_VARGS_DECL(const, med_idt , , fid );
00042 MED_VARGS_DECL(const, char * , const , meshname );
00043 MED_VARGS_DECL(const, char * , const , jointname );
00044 MED_VARGS_DECL(const, med_int , , numdt );
00045 MED_VARGS_DECL(const, med_int , , numit );
00046 MED_VARGS_DECL(const, int , , corit );
00047 MED_VARGS_DECL(, med_entity_type *, const , localentitype );
00048 MED_VARGS_DECL(, med_geometry_type *, const , localgeotype );
00049 MED_VARGS_DECL(, med_entity_type *, const , remoteentitype );
00050 MED_VARGS_DECL(, med_geometry_type *, const , remotegeotype );
00051 MED_VARGS_DECL(, med_int *, const , nentitycor );
00052 MED_VARGS_DECL(, med_err * ,, fret );
00053
00054 va_list params;
00055 va_start(params,dummy);
00056
00057 MED_VARGS_DEF(const, med_idt , , fid );
00058 MED_VARGS_DEF(const, char * , const , meshname );
00059 MED_VARGS_DEF(const, char * , const , jointname );
00060 MED_VARGS_DEF(const, med_int , , numdt );
00061 MED_VARGS_DEF(const, med_int , , numit );
00062 MED_VARGS_DEF(const, int , , corit );
00063 MED_VARGS_DEF(, med_entity_type *, const , localentitype );
00064 MED_VARGS_DEF(, med_geometry_type *, const , localgeotype );
00065 MED_VARGS_DEF(, med_entity_type *, const , remoteentitype );
00066 MED_VARGS_DEF(, med_geometry_type *, const , remotegeotype );
00067 MED_VARGS_DEF(, med_int *, const , nentitycor );
00068 MED_VARGS_DEF(, med_err * ,, fret );
00069
00070 _num = corit -1;
00071
00072
00073
00074
00075
00076 _MEDmodeErreurVerrouiller();
00077
00078
00079 if ( MEDmeshSortingTypeRd(fid,meshname,&_sortingtype) < 0 ) {
00080 MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API," MEDmeshSortingTypeRd");
00081 SSCRUTE(meshname);ISCRUTE_int(_sortingtype);goto ERROR;
00082 }
00083
00084
00085 strcat( _path, meshname);
00086 strcat( _path, "/");
00087 strcat( _path, jointname);
00088 strcat( _path, "/");
00089 _MEDgetComputationStepName(_sortingtype,numdt,numit,&_path[strlen(_path)]);
00090 strcat( _path, "/");
00091
00092
00093
00094
00095 if ( _MEDobjectGetName(fid, _path ,_num, &_path[strlen(_path)]) < 0 ) {
00096 MED_ERR_(_ret,MED_ERR_ACCESS,MED_ERR_DATAGROUP,_path);ISCRUTE_int(corit);
00097 goto ERROR;
00098 }
00099
00100 if ( (_datagroup1 = _MEDdatagroupOuvrir(fid,_path)) < 0 ) {
00101 MED_ERR_(_ret,MED_ERR_OPEN,MED_ERR_DATAGROUP,_path);
00102 goto ERROR;
00103 }
00104
00105
00106 if (_MEDattrEntierLire(_datagroup1,MED_NOM_ENT,&_intlocalentitype) < 0) {
00107 MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_NOM_ENT);
00108 ISCRUTE(_intlocalentitype);goto ERROR;
00109 }
00110 *localentitype = (med_entity_type) _intlocalentitype;
00111
00112 if (_MEDattrEntierLire(_datagroup1,MED_NOM_GEO,&_intlocalgeotype) < 0) {
00113 MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_NOM_GEO);
00114 ISCRUTE(_intlocalgeotype);goto ERROR;
00115 }
00116 *localgeotype = (med_geometry_type) _intlocalgeotype;
00117
00118
00119 if (_MEDattrEntierLire(_datagroup1,MED_NOM_END,&_intremoteentitype) < 0) {
00120 MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_NOM_ENT);
00121 ISCRUTE(_intremoteentitype);goto ERROR;
00122 }
00123 *remoteentitype = (med_entity_type) _intremoteentitype;
00124
00125 if (_MEDattrEntierLire(_datagroup1,MED_NOM_GED,&_intremotegeotype) < 0) {
00126 MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_NOM_GEO);
00127 ISCRUTE(_intremotegeotype);goto ERROR;
00128 }
00129 *remotegeotype = (med_geometry_type) _intremotegeotype;
00130
00131 if ((_dataset = _MEDdatasetOuvrir(_datagroup1,MED_NOM_COR)) < 0) {
00132 MED_ERR_(_ret,MED_ERR_OPEN,MED_ERR_DATASET,MED_NOM_COR);
00133 SSCRUTE(_path);
00134 goto ERROR;
00135 }
00136
00137 if ( _MEDattrEntierLire(_dataset,MED_NOM_NBR,nentitycor) < 0) {
00138 MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_ERR_SUBDOMAINJOINT_MSG);
00139 SSCRUTE(_path);SSCRUTE(MED_NOM_NBR);ISCRUTE(*nentitycor);
00140 goto ERROR;
00141 }
00142
00143 _ret = 0;
00144 ERROR:
00145
00146 if (_dataset>0) if (_MEDdatasetFermer(_dataset) < 0) {
00147 MED_ERR_(_ret,MED_ERR_CLOSE,MED_ERR_DATASET,MED_NOM_COR);
00148 ISCRUTE_id(_dataset);
00149 }
00150
00151 if (_datagroup1>0) if (_MEDdatagroupFermer(_datagroup1) < 0) {
00152 MED_ERR_(_ret,MED_ERR_CLOSE,MED_ERR_DATAGROUP,_path);
00153 ISCRUTE_id(_datagroup1);
00154 }
00155
00156 va_end(params);
00157 *fret = _ret;
00158 return;
00159 }