#define MESGERR 1
#include <string.h>
int main (
int argc,
char **argv) {
int i;
int ret = -1;
if (fid < 0) {
MESSAGE(
"ERROR : open file in READ ONLY ACCESS mode ...");
goto ERROR;
}
if (
MEDmeshInfoByName(fid, meshname, &spacedim, &meshdim, &meshtype, meshdescription,
dtunit, &sortingtype, &nstep, &axistype, axisname, unitname) < 0) {
goto ERROR;
}
&geotransformation)) < 0) {
MESSAGE(
"ERROR : number of nodes ...");
goto ERROR;
}
&geotransformation)) < 0) {
MESSAGE(
"ERROR : number of MED_TRIA3 ...");
goto ERROR;
}
&geotransformation)) < 0) {
MESSAGE(
"ERROR : number of MED_QUAD4 ...");
goto ERROR;
}
MESSAGE(
"ERROR : memory allocation ...");
goto ERROR;
}
coordinates) < 0) {
MESSAGE(
"ERROR : nodes coordinates ...");
goto ERROR;
}
if ((triaconnectivity = (
med_int *) malloc(
sizeof(
med_int)*ntria3*3)) == NULL) {
MESSAGE(
"ERROR : memory allocation ...");
goto ERROR;
}
MESSAGE(
"ERROR : MED_TRIA3 connectivity ...");
goto ERROR;
}
if ((quadconnectivity = (
med_int *) malloc(
sizeof(
med_int)*nquad4*4)) == NULL) {
MESSAGE(
"ERROR : memory allocation ...");
goto ERROR;
}
MESSAGE(
"ERROR : MED_QUAD4 connectivity ...");
goto ERROR;
}
ret = 0;
ERROR :
if (coordinates)
free(coordinates);
if (triaconnectivity)
free(triaconnectivity);
if (quadconnectivity)
free(quadconnectivity);
ret = -1;
}
return ret;
}