29 int main (
int argc,
char **argv) {
31 const char meshname[
MED_NAME_SIZE+1] =
"2D unstructured mesh";
36 const med_float tria3values_step1_profile1[3] = {1000., 4000., 8000.};
37 const med_float tria3values_step2_profile1[8] = {1500., 0., 0., 4500., 0., 0., 0., 8500.};
38 const med_float tria3values_step2_profile2[8] = { 0., 2500., 3500., 0., 5500., 6500., 7500., 0.};
39 const med_float quad4values_step1[4] = {10000., 20000., 30000., 40000.};
40 const med_float quad4values_step2[4] = {15000., 25000., 35000., 45000.};
41 const char profile1name[
MED_NAME_SIZE+1] =
"MED_TRIA3_PROFILE1";
42 const med_int profile1[3] = {1, 4, 8};
44 const char profile2name[
MED_NAME_SIZE+1] =
"MED_TRIA3_PROFILE2";
45 const med_int profile2[5] = {2, 3, 5, 6, 7};
54 MESSAGE(
"ERROR : file creation ...");
59 if (
MEDlinkWr(fid,meshname,
"./UsesCase_MEDmesh_1.med") < 0) {
60 MESSAGE(
"ERROR : create mesh link ...");
65 if (
MEDprofileWr(fid, profile1name, profile1size, profile1 ) < 0) {
66 MESSAGE(
"ERROR : create profile ...");
70 if (
MEDprofileWr(fid, profile2name, profile2size, profile2 ) < 0) {
71 MESSAGE(
"ERROR : create profile ...");
81 componentname, componentunit,
"ms", meshname) < 0) {
82 MESSAGE(
"ERROR : create field");
94 (
unsigned char*) tria3values_step1_profile1) < 0) {
95 MESSAGE(
"ERROR : write field values on MED_TRIA3");
102 (
unsigned char*) quad4values_step1) < 0) {
103 MESSAGE(
"ERROR : write field values on MED_QUAD4 ");
112 (
unsigned char*) tria3values_step2_profile1) < 0) {
113 MESSAGE(
"ERROR : write field values on MED_TRIA3 ...");
119 (
unsigned char*) tria3values_step2_profile2) < 0) {
120 MESSAGE(
"ERROR : write field values on MED_TRIA3 ...");
128 (
unsigned char*) quad4values_step2) < 0) {
129 MESSAGE(
"ERROR : write field values on MED_QUAD4 ... ");
138 MESSAGE(
"ERROR : close file ...");