29 int main (
int argc,
char **argv) {
31 const char meshname[
MED_NAME_SIZE+1] =
"2D unstructured mesh";
37 const med_float quad4values_step1[4*4] = { 10000., 20000., 30000., 40000.,
38 50000., 60000., 70000., 80000.,
39 90000., 100000., 110000., 120000.,
40 130000., 140000., 150000., 160000. };
41 const med_float quad4values_step2[4*4] = { 100., 200., 300., 400.,
42 500., 600., 700., 800.,
43 900., 1000., 1100., 1200.,
44 1300., 1400., 1500., 1600. };
50 MESSAGE(
"ERROR : file creation ...");
55 if (
MEDlinkWr(fid,meshname,
"./UsesCase_MEDmesh_1.med") < 0) {
56 MESSAGE(
"ERROR : create mesh link ...");
68 ncomponent, componentname, componentunit,
69 "ms", meshname) < 0) {
70 MESSAGE(
"ERROR : create field");
82 nquad4, (
unsigned char*) quad4values_step1) < 0) {
83 MESSAGE(
"ERROR : write field values on MED_QUAD4 ");
92 nquad4, (
unsigned char*) quad4values_step2) < 0) {
93 MESSAGE(
"ERROR : write field values on MED_QUAD4 ... ");
102 MESSAGE(
"ERROR : close file ...");