29 int main (
int argc,
char **argv) {
31 const char meshname[
MED_NAME_SIZE+1] =
"2D unstructured mesh";
36 const med_float verticesvalues[15] = { 0., 100., 200., 300., 400.,
37 500., 600., 700., 800., 900,
38 1000., 1100, 1200., 1300., 1500. };
40 const med_float tria3values[8] = {1000., 2000., 3000., 4000.,
41 5000., 6000., 7000., 8000.};
43 const med_float quad4values[4] = {10000., 20000., 30000., 4000.};
50 MESSAGE(
"ERROR : file creation ...");
59 if (
MEDlinkWr(fid,meshname,
"./UsesCase_MEDmesh_1.med") < 0) {
60 MESSAGE(
"ERROR : create mesh link ...");
65 ncomponent, componentname, componentunit,
"",
67 MESSAGE(
"ERROR : create field");
74 nnodes,(
unsigned char*) verticesvalues) < 0) {
75 MESSAGE(
"ERROR : write field values on vertices");
83 ntria3, (
unsigned char*) tria3values) < 0) {
84 MESSAGE(
"ERROR : write field values on MED_TRIA3");
90 nquad4, (
unsigned char*) quad4values) < 0) {
91 MESSAGE(
"ERROR : write field values on MED_QUAD4 ");
100 MESSAGE(
"ERROR : close file ...");