MEDmeshElementConnectivityAdvancedWr.c
Aller à la documentation de ce fichier.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
00041 med_err MEDmeshElementConnectivityAdvancedWr(const med_idt fid,
00042 const char* const meshname,
00043 const med_int numdt,
00044 const med_int numit,
00045 const med_float dt,
00046 const med_entity_type entitype,
00047 const med_geometry_type geotype,
00048 const med_connectivity_mode cmode,
00049 const med_filter * const filter,
00050 const med_int* const connectivity)
00051 {
00052 med_err _ret=-1;
00053 char _geotypename[MED_NAME_SIZE+1] = "";
00054
00055 if (_MEDcheckVersion30(fid) < 0) goto ERROR;
00056
00057 if ( entitype == MED_STRUCT_ELEMENT ) {
00058
00059
00060
00061 if ( MEDstructElementName(fid, geotype,_geotypename) < 0 ) {
00062 MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDstructElementName");
00063 ISCRUTE_int(geotype);goto ERROR;
00064 }
00065
00066 if ( !strcmp(_geotypename,"MED_PARTICLE") )
00067 if ( strlen((*filter).profilename ) ){
00068 MED_ERR_(_ret,MED_ERR_USE,MED_ERR_PROFILE,(*filter).profilename);
00069 goto ERROR;
00070 }
00071 }
00072
00073 _ret = _MEDmeshAdvancedWr(fid,
00074 meshname,
00075 MED_CONNECTIVITY,
00076 MED_NO_NAME,
00077 MED_INTERNAL_UNDEF,
00078 numdt,
00079 numit,
00080 dt,
00081 entitype,
00082 geotype,
00083 cmode,
00084 MED_UNDEF_PFLMODE,
00085 MED_NO_PROFILE,
00086 MED_UNDEF_INTERLACE,
00087 MED_ALL_CONSTITUENT,
00088 filter,
00089 MED_UNDEF_SIZE,
00090 connectivity);
00091
00092 ERROR:
00093 return _ret;
00094 }