#define MESGERR 1
#include <string.h>
int main (
int argc,
char **argv) {
const med_float verticesvalues[15] = { 0., 100., 200., 300., 400.,
500., 600., 700., 800., 900,
1000., 1100, 1200., 1300., 1500. };
const med_float tria3values[8] = {1000., 2000., 3000., 4000.,
5000., 6000., 7000., 8000.};
const med_float quad4values[4] = {10000., 20000., 30000., 4000.};
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,"",
meshname) < 0) {
goto ERROR;
}
nnodes,(unsigned char*) verticesvalues) < 0) {
MESSAGE(
"ERROR : write field values on vertices");
goto ERROR;
}
ntria3, (unsigned char*) tria3values) < 0) {
MESSAGE(
"ERROR : write field values on MED_TRIA3");
goto ERROR;
}
nquad4, (unsigned char*) quad4values) < 0) {
MESSAGE(
"ERROR : write field values on MED_QUAD4 ");
goto ERROR;
}
ret=0;
ERROR :
ret = -1;
}
return ret;
}