#define MESGERR 1
#include <string.h>
int main (
int argc,
char **argv) {
const med_float quad4values_step1[4*4] = { 10000., 20000., 30000., 40000.,
50000., 60000., 70000., 80000.,
90000., 100000., 110000., 120000.,
130000., 140000., 150000., 160000. };
const med_float quad4values_step2[4*4] = { 100., 200., 300., 400.,
500., 600., 700., 800.,
900., 1000., 1100., 1200.,
1300., 1400., 1500., 1600. };
int ret=-1;
if (fid < 0) {
MESSAGE(
"ERROR : file creation ...");
goto ERROR;
}
if (
MEDlinkWr(fid,meshname,
"./UsesCase_MEDmesh_1.med") < 0) {
MESSAGE(
"ERROR : create mesh link ...");
goto ERROR;
}
ncomponent, componentname, componentunit,
"ms", meshname) < 0) {
goto ERROR;
}
nquad4, (unsigned char*) quad4values_step1) < 0) {
MESSAGE(
"ERROR : write field values on MED_QUAD4 ");
goto ERROR;
}
nquad4, (unsigned char*) quad4values_step2) < 0) {
MESSAGE(
"ERROR : write field values on MED_QUAD4 ... ");
goto ERROR;
}
ret=0;
ERROR:
ret=-1;
}
return ret;
}