31 int main (
int argc,
char **argv) {
33 const char meshname[
MED_NAME_SIZE+1] =
"2D unstructured mesh";
38 const med_float initial_coordinates[30] = { 2.,1., 7.,1., 12.,1., 17.,1., 22.,1.,
39 2.,6., 7.,6., 12.,6., 17.,6., 22.,6.,
40 2.,11., 7.,11., 12.,11., 17.,11., 22.,11.};
42 const med_int triaconnectivity[24] = { 1,7,6, 2,7,1, 3,7,2, 8,7,3,
43 13,7,8, 12,7,13, 11,7,12, 6,7,11 };
45 const med_int quadconnectivity[16] = {3,4,9,8, 4,5,10,9,
46 15,14,9,10, 13,8,9,14};
49 const med_float new_coordinates_step1 [6] = { 12.,15., 17.,15., 22.,15.};
50 const char profile1name[
MED_NAME_SIZE+1] =
"UPPER_QUAD4_PROFILE";
51 const med_int profile1[3] = {13, 14, 15};
54 const med_float new_coordinates_step2 [6] = { 12.,10., 17.,10., 22.,10.};
55 const char profile2name[
MED_NAME_SIZE+1] =
"MIDDLE_QUAD4_PROFILE";
56 const med_int profile2[3] = {8, 9, 10};
64 MESSAGE(
"ERROR : file creation ...");
69 if (
MEDfileCommentWr(fid,
"A 2D unstructured mesh : 15 nodes, 12 cells") < 0) {
70 MESSAGE(
"ERROR : write file description ...");
75 if (
MEDprofileWr(fid, profile1name, profile1size, profile1 ) < 0) {
76 MESSAGE(
"ERROR : create profile ...");
80 if (
MEDprofileWr(fid, profile2name, profile2size, profile2 ) < 0) {
81 MESSAGE(
"ERROR : create profile ...");
88 MESSAGE(
"ERROR : mesh creation ...");
98 nnodes, initial_coordinates) < 0) {
99 MESSAGE(
"ERROR : nodes coordinates ...");
108 ntria3, triaconnectivity) < 0) {
109 MESSAGE(
"ERROR : triangular cells connectivity ...");
117 nquad4, quadconnectivity) < 0) {
118 MESSAGE(
"ERROR : quadrangular cells connectivity ...");
130 nnodes, new_coordinates_step1 ) < 0) {
131 MESSAGE(
"ERROR : nodes coordinates ...");
138 nnodes, new_coordinates_step2 ) < 0) {
139 MESSAGE(
"ERROR : nodes coordinates ...");
145 MESSAGE(
"ERROR : familly 0 creation ...");
154 MESSAGE(
"ERROR : close file ...");