From d5f570a507f393d4bc424c30de4e7bd75e7005cc Mon Sep 17 00:00:00 2001 From: nri Date: Fri, 25 Jun 2004 12:58:40 +0000 Subject: [PATCH] DCQ : Merge with Ecole Ete a6. --- src/MEDMEM/DataTest/Data/elle_2D_QT_2x2.sauve | 98 ++ src/MEDMEM/DataTest/Data/elle_2D_QT_4x4.sauve | 175 +++ .../DataTest/Data/elle_3D_HPr_4x4x4.sauve | 1292 +++++++++++++++++ src/MEDMEM/Doxyfile_med_user.in | 3 + src/MEDMEM/MEDMEM_Exception.hxx | 4 +- src/MEDMEM/MEDMEM_Field.hxx | 11 +- src/MEDMEM/MEDMEM_GenDriver.cxx | 16 +- src/MEDMEM/MEDMEM_Grid.cxx | 15 +- src/MEDMEM/MEDMEM_Grid.hxx | 33 +- src/MEDMEM/MEDMEM_Med.cxx | 39 +- src/MEDMEM/MEDMEM_MedFieldDriver.hxx | 84 +- src/MEDMEM/MEDMEM_MedMedDriver.cxx | 666 ++++----- src/MEDMEM/MEDMEM_MedMeshDriver.cxx | 1055 ++++++-------- src/MEDMEM/MEDMEM_MedMeshDriver.hxx | 16 +- src/MEDMEM/MEDMEM_Mesh.cxx | 23 +- src/MEDMEM/MEDMEM_Mesh.hxx | 16 +- src/MEDMEM/MEDMEM_Meshing.cxx | 23 +- src/MEDMEM/MEDMEM_Meshing.hxx | 2 +- src/MEDMEM/MEDMEM_PointerOf.hxx | 294 ++-- src/MEDMEM/MEDMEM_Support.cxx | 13 +- src/MEDMEM/MEDMEM_Utilities.hxx | 86 ++ src/MEDMEM/MEDMEM_define.hxx | 44 +- src/MEDMEM/Makefile.in | 4 +- src/MEDMEM/create_grid.c | 229 +-- src/MEDMEM/create_mesh.c | 115 +- src/MEDMEM/create_mesh_c2q4.c | 77 +- src/MEDMEM/create_mesh_c2q4s2.c | 79 +- src/MEDMEM/create_mesh_c2q4s2_wrong.c | 79 +- src/MEDMEM/create_mesh_c3h8.c | 73 +- src/MEDMEM/create_mesh_c3h8q4.c | 79 +- src/MEDMEM/create_mesh_c3h8q4_wrong.c | 79 +- src/MEDMEM_I/MEDMEM_FieldOf_i.hxx | 42 +- src/MEDMEM_I/MEDMEM_Med_i.cxx | 84 +- src/MEDMEM_I/MEDMEM_Med_i.hxx | 2 + src/MEDMEM_I/MEDMEM_Support_i.cxx | 22 +- src/MEDMEM_I/Makefile.in | 2 +- src/MEDMEM_SWIG/Makefile.in | 2 +- src/MEDMEM_SWIG/libMEDMEM_Swig.i | 23 +- src/MEDMEM_SWIG/med_test_grid.py | 4 +- src/MEDMEM_SWIG/testMedMemGeneral.py | 12 +- src/MedCorba_Swig/Makefile.in | 4 +- src/MedCorba_Swig/batchmode_medcorba_test.py | 46 +- src/MedCorba_Swig/batchmode_medcorba_test1.py | 133 ++ src/MedCorba_Swig/libMedCorba_Swig.i | 6 +- 44 files changed, 3319 insertions(+), 1885 deletions(-) create mode 100644 src/MEDMEM/DataTest/Data/elle_2D_QT_2x2.sauve create mode 100644 src/MEDMEM/DataTest/Data/elle_2D_QT_4x4.sauve create mode 100644 src/MEDMEM/DataTest/Data/elle_3D_HPr_4x4x4.sauve create mode 100644 src/MEDMEM/MEDMEM_Utilities.hxx create mode 100644 src/MedCorba_Swig/batchmode_medcorba_test1.py diff --git a/src/MEDMEM/DataTest/Data/elle_2D_QT_2x2.sauve b/src/MEDMEM/DataTest/Data/elle_2D_QT_2x2.sauve new file mode 100644 index 000000000..4ef4a6dbe --- /dev/null +++ b/src/MEDMEM/DataTest/Data/elle_2D_QT_2x2.sauve @@ -0,0 +1,98 @@ + ENREGISTREMENT DE TYPE 4 + NIVEAU 13 NIVEAU ERREUR 0 DIMENSION 2 + DENSITE 0.00000E+00 + ENREGISTREMENT DE TYPE 7 + NOMBRE INFO CASTEM2000 8 + IFOUR -1 NIFOUR 0 IFOMOD -1 IECHO 1 IIMPI 0 IOSPI 0 ISOTYP 1 + NSDPGE 0 + ENREGISTREMENT DE TYPE 2 + PILE NUMERO 1NBRE OBJETS NOMMES 11NBRE OBJETS 14 + A0B0 B1A1 A1A0 B0C0 C0C1 C1C2 C2B2 B2B1 + BOX1 BOX2 BOX3 + 4 6 7 13 14 10 11 12 1 2 + 3 + 8 0 4 4 4 + 4 5 6 7 + 0 0 0 0 + 1 2 3 4 2 5 6 3 4 3 + 7 8 3 6 9 7 + 4 0 1 3 8 + 8 + 0 0 0 0 0 0 0 0 + 6 5 10 10 11 12 12 13 14 14 + 9 6 12 14 15 14 6 15 10 12 + 15 6 10 15 + 8 0 4 4 4 + 9 10 11 12 + 0 0 0 0 + 9 14 16 17 14 13 18 16 17 16 + 19 20 16 18 21 19 + 2 0 0 2 2 + 0 0 + 1 2 2 5 + 2 0 0 2 2 + 0 0 + 5 6 6 9 + 2 0 0 2 2 + 0 0 + 9 7 7 8 + 2 0 0 2 2 + 0 0 + 8 4 4 1 + 2 0 0 2 8 + 0 0 0 0 0 0 0 0 + 5 10 10 11 11 12 12 13 13 14 + 14 9 9 6 6 5 + 2 0 0 2 2 + 0 0 + 9 14 14 13 + 2 0 0 2 2 + 0 0 + 13 18 18 21 + 2 0 0 2 2 + 0 0 + 21 19 19 20 + 2 0 0 2 2 + 0 0 + 20 17 17 9 + 2 0 0 2 2 + 0 0 + 5 10 10 11 + 2 0 0 2 2 + 0 0 + 11 12 12 13 + ENREGISTREMENT DE TYPE 2 + PILE NUMERO 32NBRE OBJETS NOMMES 8NBRE OBJETS 21 + A0 B0 C0 A1 B1 C1 B2 C2 + 1 5 11 8 9 13 20 21 + 21 + 17 18 22 21 5 1 19 20 8 2 + 6 3 7 4 9 12 11 13 14 16 + 15 + ENREGISTREMENT DE TYPE 2 + PILE NUMERO 33NBRE OBJETS NOMMES 0NBRE OBJETS 1 + 66 + 1.00000000000000E+00 5.00000000000000E-01 5.00000000000000E-01 + 1.50000000000000E+00 0.00000000000000E+00 5.00000000000000E-01 + 2.00000000000000E+00 5.00000000000000E-01 5.00000000000000E-01 + 1.50000000000000E+00 1.00000000000000E+00 5.00000000000000E-01 + 1.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 2.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 2.00000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 + 1.00000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 + 1.50000000000000E+00 5.00000000000000E-01 5.00000000000000E-01 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 1.00000000000000E+00 1.50000000000000E+00 5.00000000000000E-01 + 1.50000000000000E+00 1.50000000000000E+00 1.25000000000000E-01 + 2.00000000000000E+00 1.50000000000000E+00 5.00000000000000E-01 + 1.50000000000000E+00 2.00000000000000E+00 5.00000000000000E-01 + 2.00000000000000E+00 2.00000000000000E+00 0.00000000000000E+00 + 1.00000000000000E+00 2.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 5.00000000000000E-01 0.00000000000000E+00 5.00000000000000E-01 + 5.00000000000000E-01 1.00000000000000E+00 5.00000000000000E-01 + 0.00000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 5.00000000000000E-01 5.00000000000000E-01 + 5.00000000000000E-01 5.00000000000000E-01 1.25000000000000E-01 + ENREGISTREMENT DE TYPE 5 +LABEL AUTOMATIQUE : 1 diff --git a/src/MEDMEM/DataTest/Data/elle_2D_QT_4x4.sauve b/src/MEDMEM/DataTest/Data/elle_2D_QT_4x4.sauve new file mode 100644 index 000000000..5b208d1cf --- /dev/null +++ b/src/MEDMEM/DataTest/Data/elle_2D_QT_4x4.sauve @@ -0,0 +1,175 @@ + ENREGISTREMENT DE TYPE 4 + NIVEAU 13 NIVEAU ERREUR 0 DIMENSION 2 + DENSITE 0.00000E+00 + ENREGISTREMENT DE TYPE 7 + NOMBRE INFO CASTEM2000 8 + IFOUR -1 NIFOUR 0 IFOMOD -1 IECHO 1 IIMPI 0 IOSPI 0 ISOTYP 1 + NSDPGE 0 + ENREGISTREMENT DE TYPE 2 + PILE NUMERO 1NBRE OBJETS NOMMES 11NBRE OBJETS 14 + A0B0 B1A1 A1A0 B0C0 C0C1 C1C2 C2B2 B2B1 + BOX1 BOX2 BOX3 + 4 6 7 13 14 10 11 12 1 2 + 3 + 8 0 4 4 16 + 4 5 6 7 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 + 1 2 3 4 2 5 6 3 5 7 + 8 6 7 9 10 8 4 3 11 12 + 3 6 13 11 6 8 14 13 8 10 + 15 14 12 11 16 17 11 13 18 16 + 13 14 19 18 14 15 20 19 17 16 + 21 22 16 18 23 21 18 19 24 23 + 19 20 25 24 + 4 0 1 3 34 + 8 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 + 10 9 26 27 28 29 30 31 32 33 + 25 20 34 26 35 36 34 35 36 35 + 27 37 36 27 37 27 29 37 29 38 + 39 37 38 39 38 30 40 39 30 40 + 30 32 40 32 41 42 40 41 42 41 + 33 43 42 33 43 33 20 43 20 15 + 44 43 15 44 15 10 34 44 10 34 + 10 26 34 36 45 34 45 44 43 44 + 45 45 36 37 45 37 39 42 43 45 + 45 39 46 39 40 46 42 45 46 40 + 42 46 + 8 0 4 4 16 + 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 + 25 33 47 48 33 41 49 47 41 32 + 50 49 32 31 51 50 48 47 52 53 + 47 49 54 52 49 50 55 54 50 51 + 56 55 53 52 57 58 52 54 59 57 + 54 55 60 59 55 56 61 60 58 57 + 62 63 57 59 64 62 59 60 65 64 + 60 61 66 65 + 2 0 0 2 4 + 0 0 0 0 + 1 2 2 5 5 7 7 9 + 2 0 0 2 4 + 0 0 0 0 + 9 10 10 15 15 20 20 25 + 2 0 0 2 4 + 0 0 0 0 + 25 24 24 23 23 21 21 22 + 2 0 0 2 4 + 0 0 0 0 + 22 17 17 12 12 4 4 1 + 2 0 0 2 16 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 + 9 26 26 35 35 27 27 28 28 29 + 29 38 38 30 30 31 31 32 32 41 + 41 33 33 25 25 20 20 15 15 10 + 10 9 + 2 0 0 2 4 + 0 0 0 0 + 25 33 33 41 41 32 32 31 + 2 0 0 2 4 + 0 0 0 0 + 31 51 51 56 56 61 61 66 + 2 0 0 2 4 + 0 0 0 0 + 66 65 65 64 64 62 62 63 + 2 0 0 2 4 + 0 0 0 0 + 63 58 58 53 53 48 48 25 + 2 0 0 2 4 + 0 0 0 0 + 9 26 26 35 35 27 27 28 + 2 0 0 2 4 + 0 0 0 0 + 28 29 29 38 38 30 30 31 + ENREGISTREMENT DE TYPE 2 + PILE NUMERO 32NBRE OBJETS NOMMES 8NBRE OBJETS 66 + A0 B0 C0 A1 B1 C1 B2 C2 + 1 9 28 22 25 31 63 66 + 66 + 50 51 61 60 52 62 53 63 14 1 + 64 59 65 66 25 67 58 68 69 24 + 56 57 55 54 17 18 2 15 20 3 + 16 22 4 5 19 6 7 21 8 9 + 23 10 11 12 13 26 31 30 32 33 + 42 35 34 36 37 43 39 38 40 41 + 44 45 49 46 47 48 + ENREGISTREMENT DE TYPE 2 + PILE NUMERO 33NBRE OBJETS NOMMES 0NBRE OBJETS 1 + 207 + 1.00000000000000E+00 2.50000000000000E-01 2.50000000000000E-01 + 1.75000000000000E+00 0.00000000000000E+00 2.50000000000000E-01 + 2.00000000000000E+00 7.50000000000000E-01 2.50000000000000E-01 + 1.25000000000000E+00 1.00000000000000E+00 2.50000000000000E-01 + 1.32713397223596E+00 2.00510665587990E-01 2.50000000000000E-01 + 1.58171915768599E+00 2.04663521459000E-01 2.50000000000000E-01 + 1.79975007305965E+00 3.27394710883601E-01 2.50000000000000E-01 + 1.79495960350997E+00 5.77789090564371E-01 2.50000000000000E-01 + 1.67489393228352E+00 7.97461429892528E-01 2.50000000000000E-01 + 1.42452256547730E+00 7.94737926521907E-01 2.50000000000000E-01 + 1.20389122059610E+00 6.76246582772151E-01 2.50000000000000E-01 + 1.20539375184324E+00 4.25895712464750E-01 2.50000000000000E-01 + 1.46870992982599E+00 4.44185259205497E-01 2.50000000000000E-01 + 1.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 2.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 2.00000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 + 1.00000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 + 1.25000000000000E+00 0.00000000000000E+00 2.50000000000000E-01 + 1.50000000000000E+00 0.00000000000000E+00 2.50000000000000E-01 + 2.00000000000000E+00 2.50000000000000E-01 2.50000000000000E-01 + 2.00000000000000E+00 5.00000000000000E-01 2.50000000000000E-01 + 1.75000000000000E+00 1.00000000000000E+00 2.50000000000000E-01 + 1.50000000000000E+00 1.00000000000000E+00 2.50000000000000E-01 + 1.00000000000000E+00 7.50000000000000E-01 2.50000000000000E-01 + 1.00000000000000E+00 5.00000000000000E-01 2.50000000000000E-01 + 1.57180193105475E+00 6.20823344549013E-01 2.50000000000000E-01 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 1.00000000000000E+00 1.25000000000000E+00 2.50000000000000E-01 + 1.25000000000000E+00 1.25000000000000E+00 -7.81250000000000E-02 + 1.50000000000000E+00 1.25000000000000E+00 -2.18750000000000E-01 + 1.75000000000000E+00 1.25000000000000E+00 -3.59375000000000E-01 + 1.00000000000000E+00 1.50000000000000E+00 2.50000000000000E-01 + 1.25000000000000E+00 1.50000000000000E+00 -2.18750000000000E-01 + 1.50000000000000E+00 1.50000000000000E+00 -3.12500000000000E-01 + 1.75000000000000E+00 1.50000000000000E+00 -4.06250000000000E-01 + 1.00000000000000E+00 1.75000000000000E+00 2.50000000000000E-01 + 1.25000000000000E+00 1.75000000000000E+00 -3.59375000000000E-01 + 1.50000000000000E+00 1.75000000000000E+00 -4.06250000000000E-01 + 1.75000000000000E+00 1.75000000000000E+00 -4.53125000000000E-01 + 2.00000000000000E+00 1.25000000000000E+00 2.50000000000000E-01 + 2.00000000000000E+00 1.50000000000000E+00 2.50000000000000E-01 + 2.00000000000000E+00 1.75000000000000E+00 2.50000000000000E-01 + 1.25000000000000E+00 2.00000000000000E+00 2.50000000000000E-01 + 1.50000000000000E+00 2.00000000000000E+00 2.50000000000000E-01 + 1.75000000000000E+00 2.00000000000000E+00 2.50000000000000E-01 + 2.00000000000000E+00 2.00000000000000E+00 0.00000000000000E+00 + 1.00000000000000E+00 2.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 2.50000000000000E-01 0.00000000000000E+00 2.50000000000000E-01 + 5.00000000000000E-01 0.00000000000000E+00 2.50000000000000E-01 + 7.50000000000000E-01 0.00000000000000E+00 2.50000000000000E-01 + 7.50000000000000E-01 1.00000000000000E+00 2.50000000000000E-01 + 5.00000000000000E-01 1.00000000000000E+00 2.50000000000000E-01 + 2.50000000000000E-01 1.00000000000000E+00 2.50000000000000E-01 + 0.00000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 7.50000000000000E-01 2.50000000000000E-01 + 0.00000000000000E+00 5.00000000000000E-01 2.50000000000000E-01 + 0.00000000000000E+00 2.50000000000000E-01 2.50000000000000E-01 + 2.50000000000000E-01 2.50000000000000E-01 -7.81250000000000E-02 + 5.00000000000000E-01 2.50000000000000E-01 -2.18750000000000E-01 + 7.50000000000000E-01 2.50000000000000E-01 -3.59375000000000E-01 + 2.50000000000000E-01 5.00000000000000E-01 -2.18750000000000E-01 + 5.00000000000000E-01 5.00000000000000E-01 -3.12500000000000E-01 + 7.50000000000000E-01 5.00000000000000E-01 -4.06250000000000E-01 + 2.50000000000000E-01 7.50000000000000E-01 -3.59375000000000E-01 + 5.00000000000000E-01 7.50000000000000E-01 -4.06250000000000E-01 + 7.50000000000000E-01 7.50000000000000E-01 -4.53125000000000E-01 + ENREGISTREMENT DE TYPE 5 +LABEL AUTOMATIQUE : 1 diff --git a/src/MEDMEM/DataTest/Data/elle_3D_HPr_4x4x4.sauve b/src/MEDMEM/DataTest/Data/elle_3D_HPr_4x4x4.sauve new file mode 100644 index 000000000..a494195fb --- /dev/null +++ b/src/MEDMEM/DataTest/Data/elle_3D_HPr_4x4x4.sauve @@ -0,0 +1,1292 @@ + ENREGISTREMENT DE TYPE 4 + NIVEAU 13 NIVEAU ERREUR 0 DIMENSION 3 + DENSITE 0.00000E+00 + ENREGISTREMENT DE TYPE 7 + NOMBRE INFO CASTEM2000 8 + IFOUR 2 NIFOUR 0 IFOMOD 2 IECHO 1 IIMPI 0 IOSPI 0 ISOTYP 1 + NSDPGE 0 + ENREGISTREMENT DE TYPE 2 + PILE NUMERO 1NBRE OBJETS NOMMES 22NBRE OBJETS 41 + A0B0 B0B1 B1A1 A1A0 B0C0 C0C1 C1B1 B1B0 + B1C1 C1C2 C2B2 B2B1 BOX1 CONT2 BOX2 SURF + BOX3 VOL1 VOL2 VOL3 DOM FRONT + 1 2 3 4 5 6 7 8 9 10 + 11 12 13 14 15 16 17 18 19 20 + 21 22 + 2 0 0 2 4 + 0 0 0 0 + 1 10 10 11 11 12 12 2 + 2 0 0 2 4 + 0 0 0 0 + 2 13 13 14 14 15 15 5 + 2 0 0 2 4 + 0 0 0 0 + 5 16 16 17 17 18 18 4 + 2 0 0 2 4 + 0 0 0 0 + 4 19 19 20 20 21 21 1 + 2 0 0 2 4 + 0 0 0 0 + 2 22 22 23 23 24 24 3 + 2 0 0 2 4 + 0 0 0 0 + 3 25 25 26 26 27 27 6 + 2 0 0 2 4 + 0 0 0 0 + 6 28 28 29 29 30 30 5 + 2 0 0 2 4 + 0 0 0 0 + 5 15 15 14 14 13 13 2 + 2 0 0 2 4 + 0 0 0 0 + 5 30 30 29 29 28 28 6 + 2 0 0 2 4 + 0 0 0 0 + 6 31 31 32 32 33 33 8 + 2 0 0 2 4 + 0 0 0 0 + 8 34 34 35 35 36 36 7 + 2 0 0 2 4 + 0 0 0 0 + 7 37 37 38 38 39 39 5 + 8 0 4 4 16 + 1 2 3 4 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 + 1 10 40 21 10 11 41 40 11 12 + 42 41 12 2 13 42 21 40 43 20 + 40 41 44 43 41 42 45 44 42 13 + 14 45 20 43 46 19 43 44 47 46 + 44 45 48 47 45 14 15 48 19 46 + 18 4 46 47 17 18 47 48 16 17 + 48 15 5 16 + 2 0 0 2 16 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 + 2 22 22 23 23 24 24 3 3 25 + 25 26 26 27 27 6 6 28 28 29 + 29 30 30 5 5 15 15 14 14 13 + 13 2 + 4 0 1 3 34 + 14 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 + 13 2 22 24 3 25 27 6 28 30 + 5 15 49 22 23 50 49 23 50 23 + 24 51 50 24 51 24 25 51 25 26 + 52 51 26 52 26 27 53 52 27 53 + 27 28 53 28 29 54 53 29 54 29 + 30 55 54 30 55 30 15 55 15 14 + 56 55 14 56 14 13 49 56 13 49 + 13 22 49 50 57 49 57 56 55 56 + 57 57 50 51 57 51 52 54 55 57 + 57 52 58 52 53 58 54 57 58 53 + 54 58 + 0 2 0 0 0 + 23 15 + 8 0 4 4 16 + 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 + 5 30 59 39 30 29 60 59 29 28 + 61 60 28 6 31 61 39 59 62 38 + 59 60 63 62 60 61 64 63 61 31 + 32 64 38 62 65 37 62 63 66 65 + 63 64 67 66 64 32 33 67 37 65 + 36 7 65 66 35 36 66 67 34 35 + 67 33 8 34 + 14 0 3 8 64 + 13 24 25 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 + 1 10 40 21 68 69 70 71 10 11 + 41 40 69 72 73 70 11 12 42 41 + 72 74 75 73 12 2 13 42 74 76 + 77 75 21 40 43 20 71 70 78 79 + 40 41 44 43 70 73 80 78 41 42 + 45 44 73 75 81 80 42 13 14 45 + 75 77 82 81 20 43 46 19 79 78 + 83 84 43 44 47 46 78 80 85 83 + 44 45 48 47 80 81 86 85 45 14 + 15 48 81 82 87 86 19 46 18 4 + 84 83 88 89 46 47 17 18 83 85 + 90 88 47 48 16 17 85 86 91 90 + 48 15 5 16 86 87 92 91 68 69 + 70 71 93 94 95 96 69 72 73 70 + 94 97 98 95 72 74 75 73 97 99 + 100 98 74 76 77 75 99 101 102 100 + 71 70 78 79 96 95 103 104 70 73 + 80 78 95 98 105 103 73 75 81 80 + 98 100 106 105 75 77 82 81 100 102 + 107 106 79 78 83 84 104 103 108 109 + 78 80 85 83 103 105 110 108 80 81 + 86 85 105 106 111 110 81 82 87 86 + 106 107 112 111 84 83 88 89 109 108 + 113 114 83 85 90 88 108 110 115 113 + 85 86 91 90 110 111 116 115 86 87 + 92 91 111 112 117 116 93 94 95 96 + 118 119 120 121 94 97 98 95 119 122 + 123 120 97 99 100 98 122 124 125 123 + 99 101 102 100 124 126 127 125 96 95 + 103 104 121 120 128 129 95 98 105 103 + 120 123 130 128 98 100 106 105 123 125 + 131 130 100 102 107 106 125 127 132 131 + 104 103 108 109 129 128 133 134 103 105 + 110 108 128 130 135 133 105 106 111 110 + 130 131 136 135 106 107 112 111 131 132 + 137 136 109 108 113 114 134 133 138 139 + 108 110 115 113 133 135 140 138 110 111 + 116 115 135 136 141 140 111 112 117 116 + 136 137 142 141 118 119 120 121 143 144 + 145 146 119 122 123 120 144 147 148 145 + 122 124 125 123 147 149 150 148 124 126 + 127 125 149 151 152 150 121 120 128 129 + 146 145 153 154 120 123 130 128 145 148 + 155 153 123 125 131 130 148 150 156 155 + 125 127 132 131 150 152 157 156 129 128 + 133 134 154 153 158 159 128 130 135 133 + 153 155 160 158 130 131 136 135 155 156 + 161 160 131 132 137 136 156 157 162 161 + 134 133 138 139 159 158 163 164 133 135 + 140 138 158 160 165 163 135 136 141 140 + 160 161 166 165 136 137 142 141 161 162 + 167 166 + 16 0 3 6 136 + 15 26 27 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 + 13 2 22 77 76 168 24 3 25 169 + 170 171 27 6 28 172 173 174 30 5 + 15 175 92 87 49 22 23 176 168 177 + 50 49 23 178 176 177 50 23 24 178 + 177 169 51 50 24 179 178 169 51 24 + 25 179 169 171 51 25 26 179 171 180 + 52 51 26 181 179 180 52 26 27 181 + 180 172 53 52 27 182 181 172 53 27 + 28 182 172 174 53 28 29 182 174 183 + 54 53 29 184 182 183 54 29 30 184 + 183 175 55 54 30 185 184 175 55 30 + 15 185 175 87 55 15 14 185 87 82 + 56 55 14 186 185 82 56 14 13 186 + 82 77 49 56 13 176 186 77 49 13 + 22 176 77 168 49 50 57 176 178 187 + 49 57 56 176 187 186 55 56 57 185 + 186 187 57 50 51 187 178 179 57 51 + 52 187 179 181 54 55 57 184 185 187 + 57 52 58 187 181 188 52 53 58 181 + 182 188 54 57 58 184 187 188 53 54 + 58 182 184 188 77 76 168 102 101 189 + 169 170 171 190 191 192 172 173 174 193 + 194 195 175 92 87 196 117 112 176 168 + 177 197 189 198 178 176 177 199 197 198 + 178 177 169 199 198 190 179 178 169 200 + 199 190 179 169 171 200 190 192 179 171 + 180 200 192 201 181 179 180 202 200 201 + 181 180 172 202 201 193 182 181 172 203 + 202 193 182 172 174 203 193 195 182 174 + 183 203 195 204 184 182 183 205 203 204 + 184 183 175 205 204 196 185 184 175 206 + 205 196 185 175 87 206 196 112 185 87 + 82 206 112 107 186 185 82 207 206 107 + 186 82 77 207 107 102 176 186 77 197 + 207 102 176 77 168 197 102 189 176 178 + 187 197 199 208 176 187 186 197 208 207 + 185 186 187 206 207 208 187 178 179 208 + 199 200 187 179 181 208 200 202 184 185 + 187 205 206 208 187 181 188 208 202 209 + 181 182 188 202 203 209 184 187 188 205 + 208 209 182 184 188 203 205 209 102 101 + 189 127 126 210 190 191 192 211 212 213 + 193 194 195 214 215 216 196 117 112 217 + 142 137 197 189 198 218 210 219 199 197 + 198 220 218 219 199 198 190 220 219 211 + 200 199 190 221 220 211 200 190 192 221 + 211 213 200 192 201 221 213 222 202 200 + 201 223 221 222 202 201 193 223 222 214 + 203 202 193 224 223 214 203 193 195 224 + 214 216 203 195 204 224 216 225 205 203 + 204 226 224 225 205 204 196 226 225 217 + 206 205 196 227 226 217 206 196 112 227 + 217 137 206 112 107 227 137 132 207 206 + 107 228 227 132 207 107 102 228 132 127 + 197 207 102 218 228 127 197 102 189 218 + 127 210 197 199 208 218 220 229 197 208 + 207 218 229 228 206 207 208 227 228 229 + 208 199 200 229 220 221 208 200 202 229 + 221 223 205 206 208 226 227 229 208 202 + 209 229 223 230 202 203 209 223 224 230 + 205 208 209 226 229 230 203 205 209 224 + 226 230 127 126 210 152 151 231 211 212 + 213 232 233 234 214 215 216 235 236 237 + 217 142 137 238 167 162 218 210 219 239 + 231 240 220 218 219 241 239 240 220 219 + 211 241 240 232 221 220 211 242 241 232 + 221 211 213 242 232 234 221 213 222 242 + 234 243 223 221 222 244 242 243 223 222 + 214 244 243 235 224 223 214 245 244 235 + 224 214 216 245 235 237 224 216 225 245 + 237 246 226 224 225 247 245 246 226 225 + 217 247 246 238 227 226 217 248 247 238 + 227 217 137 248 238 162 227 137 132 248 + 162 157 228 227 132 249 248 157 228 132 + 127 249 157 152 218 228 127 239 249 152 + 218 127 210 239 152 231 218 220 229 239 + 241 250 218 229 228 239 250 249 227 228 + 229 248 249 250 229 220 221 250 241 242 + 229 221 223 250 242 244 226 227 229 247 + 248 250 229 223 230 250 244 251 223 224 + 230 244 245 251 226 229 230 247 250 251 + 224 226 230 245 247 251 + 14 0 3 8 64 + 17 28 29 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 + 5 30 59 39 92 175 252 253 30 29 + 60 59 175 183 254 252 29 28 61 60 + 183 174 255 254 28 6 31 61 174 173 + 256 255 39 59 62 38 253 252 257 258 + 59 60 63 62 252 254 259 257 60 61 + 64 63 254 255 260 259 61 31 32 64 + 255 256 261 260 38 62 65 37 258 257 + 262 263 62 63 66 65 257 259 264 262 + 63 64 67 66 259 260 265 264 64 32 + 33 67 260 261 266 265 37 65 36 7 + 263 262 267 268 65 66 35 36 262 264 + 269 267 66 67 34 35 264 265 270 269 + 67 33 8 34 265 266 271 270 92 175 + 252 253 117 196 272 273 175 183 254 252 + 196 204 274 272 183 174 255 254 204 195 + 275 274 174 173 256 255 195 194 276 275 + 253 252 257 258 273 272 277 278 252 254 + 259 257 272 274 279 277 254 255 260 259 + 274 275 280 279 255 256 261 260 275 276 + 281 280 258 257 262 263 278 277 282 283 + 257 259 264 262 277 279 284 282 259 260 + 265 264 279 280 285 284 260 261 266 265 + 280 281 286 285 263 262 267 268 283 282 + 287 288 262 264 269 267 282 284 289 287 + 264 265 270 269 284 285 290 289 265 266 + 271 270 285 286 291 290 117 196 272 273 + 142 217 292 293 196 204 274 272 217 225 + 294 292 204 195 275 274 225 216 295 294 + 195 194 276 275 216 215 296 295 273 272 + 277 278 293 292 297 298 272 274 279 277 + 292 294 299 297 274 275 280 279 294 295 + 300 299 275 276 281 280 295 296 301 300 + 278 277 282 283 298 297 302 303 277 279 + 284 282 297 299 304 302 279 280 285 284 + 299 300 305 304 280 281 286 285 300 301 + 306 305 283 282 287 288 303 302 307 308 + 282 284 289 287 302 304 309 307 284 285 + 290 289 304 305 310 309 285 286 291 290 + 305 306 311 310 142 217 292 293 167 238 + 312 313 217 225 294 292 238 246 314 312 + 225 216 295 294 246 237 315 314 216 215 + 296 295 237 236 316 315 293 292 297 298 + 313 312 317 318 292 294 299 297 312 314 + 319 317 294 295 300 299 314 315 320 319 + 295 296 301 300 315 316 321 320 298 297 + 302 303 318 317 322 323 297 299 304 302 + 317 319 324 322 299 300 305 304 319 320 + 325 324 300 301 306 305 320 321 326 325 + 303 302 307 308 323 322 327 328 302 304 + 309 307 322 324 329 327 304 305 310 309 + 324 325 330 329 305 306 311 310 325 326 + 331 330 + 0 2 0 0 0 + 30 19 + 0 2 0 0 0 + 31 32 + 8 0 0 4 32 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 + 5 30 59 39 30 29 60 59 29 28 + 61 60 28 6 31 61 39 59 62 38 + 59 60 63 62 60 61 64 63 61 31 + 32 64 38 62 65 37 62 63 66 65 + 63 64 67 66 64 32 33 67 37 65 + 36 7 65 66 35 36 66 67 34 35 + 67 33 8 34 1 10 40 21 10 11 + 41 40 11 12 42 41 12 2 13 42 + 21 40 43 20 40 41 44 43 41 42 + 45 44 42 13 14 45 20 43 46 19 + 43 44 47 46 44 45 48 47 45 14 + 15 48 19 46 18 4 46 47 17 18 + 47 48 16 17 48 15 5 16 + 8 0 4 4 16 + 33 34 35 36 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 + 143 144 145 146 144 147 148 145 147 149 + 150 148 149 151 152 150 146 145 153 154 + 145 148 155 153 148 150 156 155 150 152 + 157 156 154 153 158 159 153 155 160 158 + 155 156 161 160 156 157 162 161 159 158 + 163 164 158 160 165 163 160 161 166 165 + 161 162 167 166 + 8 0 0 4 64 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 + 1 10 69 68 10 11 72 69 11 12 + 74 72 12 2 76 74 2 13 77 76 + 13 14 82 77 14 15 87 82 15 5 + 92 87 5 16 91 92 16 17 90 91 + 17 18 88 90 18 4 89 88 4 19 + 84 89 19 20 79 84 20 21 71 79 + 21 1 68 71 68 69 94 93 69 72 + 97 94 72 74 99 97 74 76 101 99 + 76 77 102 101 77 82 107 102 82 87 + 112 107 87 92 117 112 92 91 116 117 + 91 90 115 116 90 88 113 115 88 89 + 114 113 89 84 109 114 84 79 104 109 + 79 71 96 104 71 68 93 96 93 94 + 119 118 94 97 122 119 97 99 124 122 + 99 101 126 124 101 102 127 126 102 107 + 132 127 107 112 137 132 112 117 142 137 + 117 116 141 142 116 115 140 141 115 113 + 138 140 113 114 139 138 114 109 134 139 + 109 104 129 134 104 96 121 129 96 93 + 118 121 118 119 144 143 119 122 147 144 + 122 124 149 147 124 126 151 149 126 127 + 152 151 127 132 157 152 132 137 162 157 + 137 142 167 162 142 141 166 167 141 140 + 165 166 140 138 163 165 138 139 164 163 + 139 134 159 164 134 129 154 159 129 121 + 146 154 121 118 143 146 + 4 0 1 3 34 + 37 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 + 152 151 231 232 233 234 235 236 237 238 + 167 162 239 231 240 241 239 240 241 240 + 232 242 241 232 242 232 234 242 234 243 + 244 242 243 244 243 235 245 244 235 245 + 235 237 245 237 246 247 245 246 247 246 + 238 248 247 238 248 238 162 248 162 157 + 249 248 157 249 157 152 239 249 152 239 + 152 231 239 241 250 239 250 249 248 249 + 250 250 241 242 250 242 244 247 248 250 + 250 244 251 244 245 251 247 250 251 245 + 247 251 + 8 0 0 4 64 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 + 2 22 168 76 22 23 177 168 23 24 + 169 177 24 3 170 169 3 25 171 170 + 25 26 180 171 26 27 172 180 27 6 + 173 172 6 28 174 173 28 29 183 174 + 29 30 175 183 30 5 92 175 5 15 + 87 92 15 14 82 87 14 13 77 82 + 13 2 76 77 76 168 189 101 168 177 + 198 189 177 169 190 198 169 170 191 190 + 170 171 192 191 171 180 201 192 180 172 + 193 201 172 173 194 193 173 174 195 194 + 174 183 204 195 183 175 196 204 175 92 + 117 196 92 87 112 117 87 82 107 112 + 82 77 102 107 77 76 101 102 101 189 + 210 126 189 198 219 210 198 190 211 219 + 190 191 212 211 191 192 213 212 192 201 + 222 213 201 193 214 222 193 194 215 214 + 194 195 216 215 195 204 225 216 204 196 + 217 225 196 117 142 217 117 112 137 142 + 112 107 132 137 107 102 127 132 102 101 + 126 127 126 210 231 151 210 219 240 231 + 219 211 232 240 211 212 233 232 212 213 + 234 233 213 222 243 234 222 214 235 243 + 214 215 236 235 215 216 237 236 216 225 + 246 237 225 217 238 246 217 142 167 238 + 142 137 162 167 137 132 157 162 132 127 + 152 157 127 126 151 152 + 8 0 4 4 16 + 38 39 40 41 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 + 167 238 312 313 238 246 314 312 246 237 + 315 314 237 236 316 315 313 312 317 318 + 312 314 319 317 314 315 320 319 315 316 + 321 320 318 317 322 323 317 319 324 322 + 319 320 325 324 320 321 326 325 323 322 + 327 328 322 324 329 327 324 325 330 329 + 325 326 331 330 + 8 0 0 4 64 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 + 5 30 175 92 30 29 183 175 29 28 + 174 183 28 6 173 174 6 31 256 173 + 31 32 261 256 32 33 266 261 33 8 + 271 266 8 34 270 271 34 35 269 270 + 35 36 267 269 36 7 268 267 7 37 + 263 268 37 38 258 263 38 39 253 258 + 39 5 92 253 92 175 196 117 175 183 + 204 196 183 174 195 204 174 173 194 195 + 173 256 276 194 256 261 281 276 261 266 + 286 281 266 271 291 286 271 270 290 291 + 270 269 289 290 269 267 287 289 267 268 + 288 287 268 263 283 288 263 258 278 283 + 258 253 273 278 253 92 117 273 117 196 + 217 142 196 204 225 217 204 195 216 225 + 195 194 215 216 194 276 296 215 276 281 + 301 296 281 286 306 301 286 291 311 306 + 291 290 310 311 290 289 309 310 289 287 + 307 309 287 288 308 307 288 283 303 308 + 283 278 298 303 278 273 293 298 273 117 + 142 293 142 217 238 167 217 225 246 238 + 225 216 237 246 216 215 236 237 215 296 + 316 236 296 301 321 316 301 306 326 321 + 306 311 331 326 311 310 330 331 310 309 + 329 330 309 307 327 329 307 308 328 327 + 308 303 323 328 303 298 318 323 298 293 + 313 318 293 142 167 313 + 14 0 0 8 128 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 + 5 30 59 39 92 175 252 253 30 29 + 60 59 175 183 254 252 29 28 61 60 + 183 174 255 254 28 6 31 61 174 173 + 256 255 39 59 62 38 253 252 257 258 + 59 60 63 62 252 254 259 257 60 61 + 64 63 254 255 260 259 61 31 32 64 + 255 256 261 260 38 62 65 37 258 257 + 262 263 62 63 66 65 257 259 264 262 + 63 64 67 66 259 260 265 264 64 32 + 33 67 260 261 266 265 37 65 36 7 + 263 262 267 268 65 66 35 36 262 264 + 269 267 66 67 34 35 264 265 270 269 + 67 33 8 34 265 266 271 270 92 175 + 252 253 117 196 272 273 175 183 254 252 + 196 204 274 272 183 174 255 254 204 195 + 275 274 174 173 256 255 195 194 276 275 + 253 252 257 258 273 272 277 278 252 254 + 259 257 272 274 279 277 254 255 260 259 + 274 275 280 279 255 256 261 260 275 276 + 281 280 258 257 262 263 278 277 282 283 + 257 259 264 262 277 279 284 282 259 260 + 265 264 279 280 285 284 260 261 266 265 + 280 281 286 285 263 262 267 268 283 282 + 287 288 262 264 269 267 282 284 289 287 + 264 265 270 269 284 285 290 289 265 266 + 271 270 285 286 291 290 117 196 272 273 + 142 217 292 293 196 204 274 272 217 225 + 294 292 204 195 275 274 225 216 295 294 + 195 194 276 275 216 215 296 295 273 272 + 277 278 293 292 297 298 272 274 279 277 + 292 294 299 297 274 275 280 279 294 295 + 300 299 275 276 281 280 295 296 301 300 + 278 277 282 283 298 297 302 303 277 279 + 284 282 297 299 304 302 279 280 285 284 + 299 300 305 304 280 281 286 285 300 301 + 306 305 283 282 287 288 303 302 307 308 + 282 284 289 287 302 304 309 307 284 285 + 290 289 304 305 310 309 285 286 291 290 + 305 306 311 310 142 217 292 293 167 238 + 312 313 217 225 294 292 238 246 314 312 + 225 216 295 294 246 237 315 314 216 215 + 296 295 237 236 316 315 293 292 297 298 + 313 312 317 318 292 294 299 297 312 314 + 319 317 294 295 300 299 314 315 320 319 + 295 296 301 300 315 316 321 320 298 297 + 302 303 318 317 322 323 297 299 304 302 + 317 319 324 322 299 300 305 304 319 320 + 325 324 300 301 306 305 320 321 326 325 + 303 302 307 308 323 322 327 328 302 304 + 309 307 322 324 329 327 304 305 310 309 + 324 325 330 329 305 306 311 310 325 326 + 331 330 1 10 40 21 68 69 70 71 + 10 11 41 40 69 72 73 70 11 12 + 42 41 72 74 75 73 12 2 13 42 + 74 76 77 75 21 40 43 20 71 70 + 78 79 40 41 44 43 70 73 80 78 + 41 42 45 44 73 75 81 80 42 13 + 14 45 75 77 82 81 20 43 46 19 + 79 78 83 84 43 44 47 46 78 80 + 85 83 44 45 48 47 80 81 86 85 + 45 14 15 48 81 82 87 86 19 46 + 18 4 84 83 88 89 46 47 17 18 + 83 85 90 88 47 48 16 17 85 86 + 91 90 48 15 5 16 86 87 92 91 + 68 69 70 71 93 94 95 96 69 72 + 73 70 94 97 98 95 72 74 75 73 + 97 99 100 98 74 76 77 75 99 101 + 102 100 71 70 78 79 96 95 103 104 + 70 73 80 78 95 98 105 103 73 75 + 81 80 98 100 106 105 75 77 82 81 + 100 102 107 106 79 78 83 84 104 103 + 108 109 78 80 85 83 103 105 110 108 + 80 81 86 85 105 106 111 110 81 82 + 87 86 106 107 112 111 84 83 88 89 + 109 108 113 114 83 85 90 88 108 110 + 115 113 85 86 91 90 110 111 116 115 + 86 87 92 91 111 112 117 116 93 94 + 95 96 118 119 120 121 94 97 98 95 + 119 122 123 120 97 99 100 98 122 124 + 125 123 99 101 102 100 124 126 127 125 + 96 95 103 104 121 120 128 129 95 98 + 105 103 120 123 130 128 98 100 106 105 + 123 125 131 130 100 102 107 106 125 127 + 132 131 104 103 108 109 129 128 133 134 + 103 105 110 108 128 130 135 133 105 106 + 111 110 130 131 136 135 106 107 112 111 + 131 132 137 136 109 108 113 114 134 133 + 138 139 108 110 115 113 133 135 140 138 + 110 111 116 115 135 136 141 140 111 112 + 117 116 136 137 142 141 118 119 120 121 + 143 144 145 146 119 122 123 120 144 147 + 148 145 122 124 125 123 147 149 150 148 + 124 126 127 125 149 151 152 150 121 120 + 128 129 146 145 153 154 120 123 130 128 + 145 148 155 153 123 125 131 130 148 150 + 156 155 125 127 132 131 150 152 157 156 + 129 128 133 134 154 153 158 159 128 130 + 135 133 153 155 160 158 130 131 136 135 + 155 156 161 160 131 132 137 136 156 157 + 162 161 134 133 138 139 159 158 163 164 + 133 135 140 138 158 160 165 163 135 136 + 141 140 160 161 166 165 136 137 142 141 + 161 162 167 166 + 4 0 0 3 68 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 + 248 162 157 245 237 246 247 250 251 242 + 234 243 249 248 157 250 244 251 238 167 + 162 245 247 251 244 245 251 239 231 240 + 247 245 246 235 236 237 248 238 162 249 + 157 152 247 246 238 232 233 234 248 249 + 250 244 242 243 245 235 237 247 248 250 + 152 151 231 244 243 235 241 239 240 239 + 250 249 242 232 234 250 242 244 241 240 + 232 250 241 242 248 247 238 239 241 250 + 239 152 231 245 244 235 239 249 152 242 + 241 232 55 15 14 53 28 29 51 25 + 26 54 57 58 30 5 15 57 52 58 + 53 54 58 49 22 23 27 6 28 52 + 53 58 24 3 25 13 2 22 56 55 + 14 54 53 29 55 30 15 56 14 13 + 54 29 30 52 51 26 53 27 28 52 + 26 27 50 49 23 51 24 25 50 23 + 24 49 13 22 55 56 57 54 55 57 + 49 57 56 57 51 52 57 50 51 55 + 54 30 49 50 57 53 52 27 49 56 + 13 51 50 24 + 8 0 0 4 192 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 + 160 161 166 165 158 160 165 163 159 158 + 163 164 155 156 161 160 153 155 160 158 + 154 153 158 159 140 141 166 165 148 150 + 156 155 138 140 165 163 139 138 163 164 + 145 148 155 153 146 145 153 154 147 149 + 150 148 134 139 164 159 144 147 148 145 + 143 144 145 146 129 134 159 154 121 129 + 154 146 122 124 149 147 119 122 147 144 + 118 121 146 143 118 119 144 143 115 116 + 141 140 113 115 140 138 114 113 138 139 + 109 114 139 134 104 109 134 129 96 104 + 129 121 97 99 124 122 94 97 122 119 + 93 96 121 118 93 94 119 118 90 91 + 116 115 88 90 115 113 89 88 113 114 + 84 89 114 109 79 84 109 104 71 79 + 104 96 72 74 99 97 69 72 97 94 + 68 71 96 93 68 69 94 93 4 18 + 88 89 17 16 91 90 19 4 89 84 + 18 17 90 88 20 19 84 79 21 20 + 79 71 44 45 48 47 43 44 47 46 + 41 42 45 44 11 12 74 72 1 21 + 71 68 40 41 44 43 10 11 72 69 + 20 43 46 19 46 47 17 18 47 48 + 16 17 21 40 43 20 1 10 69 68 + 19 46 18 4 11 12 42 41 10 11 + 41 40 1 10 40 21 325 326 331 330 + 324 325 330 329 323 322 327 328 322 324 + 329 327 320 321 326 325 315 316 321 320 + 319 320 325 324 317 319 324 322 318 317 + 322 323 161 162 167 166 156 157 162 161 + 308 307 327 328 310 311 331 330 314 315 + 320 319 312 314 319 317 309 310 330 329 + 313 312 317 318 307 309 329 327 306 311 + 331 326 150 152 157 156 303 308 328 323 + 301 306 326 321 149 151 152 150 296 301 + 321 316 141 142 167 166 288 287 307 308 + 290 291 311 310 268 267 287 288 289 290 + 310 309 287 289 309 307 7 36 267 268 + 124 126 151 149 270 271 291 290 269 270 + 290 289 267 269 289 287 286 291 311 306 + 34 8 271 270 298 303 323 318 35 34 + 270 269 36 35 269 267 266 271 291 286 + 293 298 318 313 116 117 142 141 33 8 + 271 266 281 286 306 301 283 288 308 303 + 276 281 301 296 261 266 286 281 256 261 + 281 276 99 101 126 124 32 33 266 261 + 31 32 261 256 263 268 288 283 67 33 + 8 34 91 92 117 116 37 7 268 263 + 237 236 316 315 246 237 315 314 74 76 + 101 99 278 283 303 298 37 65 36 7 + 238 246 314 312 66 67 34 35 65 66 + 35 36 273 278 298 293 167 238 312 313 + 16 5 92 91 64 32 33 67 45 14 + 15 48 215 296 316 236 61 31 32 64 + 12 2 76 74 48 15 5 16 258 263 + 283 278 253 258 278 273 142 293 313 167 + 42 13 14 45 38 37 263 258 12 2 + 13 42 194 276 296 215 39 38 258 253 + 63 64 67 66 62 63 66 65 38 62 + 65 37 60 61 64 63 173 256 276 194 + 59 60 63 62 39 59 62 38 117 273 + 293 142 6 31 256 173 92 253 273 117 + 28 6 31 61 213 222 243 234 210 219 + 240 231 212 213 234 233 126 210 231 151 + 5 39 253 92 29 28 61 60 222 214 + 235 243 219 211 232 240 214 215 236 235 + 192 201 222 213 211 212 233 232 189 198 + 219 210 191 192 213 212 101 189 210 126 + 30 29 60 59 5 30 59 39 171 180 + 201 192 168 177 198 189 170 171 192 191 + 76 168 189 101 25 26 180 171 22 23 + 177 168 201 193 214 222 3 25 171 170 + 198 190 211 219 2 22 168 76 193 194 + 215 214 190 191 212 211 180 172 193 201 + 177 169 190 198 172 173 194 193 169 170 + 191 190 26 27 172 180 23 24 169 177 + 27 6 173 172 24 3 170 169 + 2 0 0 2 4 + 0 0 0 0 + 143 144 144 147 147 149 149 151 + 2 0 0 2 4 + 0 0 0 0 + 151 152 152 157 157 162 162 167 + 2 0 0 2 4 + 0 0 0 0 + 167 166 166 165 165 163 163 164 + 2 0 0 2 4 + 0 0 0 0 + 164 159 159 154 154 146 146 143 + 2 0 0 2 16 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 + 151 231 231 240 240 232 232 233 233 234 + 234 243 243 235 235 236 236 237 237 246 + 246 238 238 167 167 162 162 157 157 152 + 152 151 + 2 0 0 2 4 + 0 0 0 0 + 167 238 238 246 246 237 237 236 + 2 0 0 2 4 + 0 0 0 0 + 236 316 316 321 321 326 326 331 + 2 0 0 2 4 + 0 0 0 0 + 331 330 330 329 329 327 327 328 + 2 0 0 2 4 + 0 0 0 0 + 328 323 323 318 318 313 313 167 + ENREGISTREMENT DE TYPE 2 + PILE NUMERO 25NBRE OBJETS NOMMES 1NBRE OBJETS 1 + PI + 1 + 1 + 3.14159265358979E+00 + ENREGISTREMENT DE TYPE 2 + PILE NUMERO 26NBRE OBJETS NOMMES 3NBRE OBJETS 1 + NX NY NZ + 1 1 1 + 1 + 4 + ENREGISTREMENT DE TYPE 2 + PILE NUMERO 27NBRE OBJETS NOMMES 16NBRE OBJETS 15 + #2 #3 #4 D C TITR OPTI DROI + DALL PLAN ET ELIM ENVE OPTION SAUV SAUVE + 1 2 3 4 5 6 7 4 8 9 + 10 11 12 13 14 15 + 55 15 + #2#3#4DROICERCTITROPTIDALLPLANETELIMENVEOPTIONSAUVSAUVE + 2 4 6 10 14 18 22 26 30 32 + 36 40 46 50 55 + ENREGISTREMENT DE TYPE 2 + PILE NUMERO 32NBRE OBJETS NOMMES 9NBRE OBJETS 331 + A0 B0 C0 A1 B1 C1 B2 C2 + VECT + 1 2 3 4 5 6 7 8 9 + 331 + 251 53 54 258 56 55 222 209 351 252 + 253 254 1 64 63 255 256 257 259 260 + 261 57 58 2 59 60 3 61 62 4 + 191 192 193 208 207 206 139 135 131 262 + 263 264 265 266 267 268 269 270 5 6 + 7 8 9 10 11 12 13 101 132 133 + 134 136 137 138 140 141 142 271 272 273 + 274 275 276 277 278 65 14 279 280 281 + 282 76 283 284 285 286 75 287 288 289 + 290 68 291 292 293 294 295 296 297 298 + 77 27 299 300 301 302 88 303 304 305 + 306 87 307 308 309 310 80 311 312 313 + 314 315 316 317 318 89 40 319 320 321 + 322 100 323 324 325 326 99 327 328 329 + 330 92 331 332 333 334 335 336 337 338 + 118 105 339 340 341 342 129 343 344 345 + 346 128 347 348 349 350 121 69 15 66 + 71 16 67 73 17 18 70 19 20 72 + 21 22 74 23 24 25 26 102 81 28 + 78 83 29 79 85 30 31 82 32 33 + 84 34 35 86 36 37 38 39 103 93 + 41 90 95 42 91 97 43 44 94 45 + 46 96 47 48 98 49 50 51 52 104 + 122 106 119 124 107 120 126 108 109 123 + 110 111 125 112 113 127 114 115 116 117 + 130 148 147 149 150 195 152 151 153 154 + 196 156 155 157 158 197 210 223 211 212 + 213 164 163 165 166 199 168 167 169 170 + 200 172 171 173 174 201 214 224 215 216 + 217 180 179 181 182 203 184 183 185 186 + 204 188 187 189 190 205 218 225 219 220 + 221 231 230 232 233 243 235 234 236 237 + 244 239 238 240 241 245 246 250 247 248 + 249 + ENREGISTREMENT DE TYPE 2 + PILE NUMERO 33NBRE OBJETS NOMMES 0NBRE OBJETS 1 + 1404 + 1.00000000000000E+00 2.50000000000000E-01 0.00000000000000E+00 + 2.50000000000000E-01 1.75000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 2.50000000000000E-01 2.00000000000000E+00 + 7.50000000000000E-01 0.00000000000000E+00 2.50000000000000E-01 + 1.25000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 + 2.50000000000000E-01 1.32713397223596E+00 2.00510665587990E-01 + 0.00000000000000E+00 2.50000000000000E-01 1.58171915768599E+00 + 2.04663521459000E-01 0.00000000000000E+00 2.50000000000000E-01 + 1.79975007305965E+00 3.27394710883601E-01 0.00000000000000E+00 + 2.50000000000000E-01 1.79495960350997E+00 5.77789090564371E-01 + 0.00000000000000E+00 2.50000000000000E-01 1.67489393228352E+00 + 7.97461429892528E-01 0.00000000000000E+00 2.50000000000000E-01 + 1.42452256547730E+00 7.94737926521907E-01 0.00000000000000E+00 + 2.50000000000000E-01 1.20389122059610E+00 6.76246582772151E-01 + 0.00000000000000E+00 2.50000000000000E-01 1.20539375184324E+00 + 4.25895712464750E-01 0.00000000000000E+00 2.50000000000000E-01 + 1.46870992982599E+00 4.44185259205497E-01 0.00000000000000E+00 + 2.50000000000000E-01 1.00000000000000E+00 2.50000000000000E-01 + 2.50000000000000E-01 2.50000000000000E-01 1.75000000000000E+00 + 0.00000000000000E+00 2.50000000000000E-01 2.50000000000000E-01 + 2.00000000000000E+00 7.50000000000000E-01 2.50000000000000E-01 + 2.50000000000000E-01 1.25000000000000E+00 1.00000000000000E+00 + 2.50000000000000E-01 2.50000000000000E-01 1.32713397223596E+00 + 2.00510665587990E-01 2.50000000000000E-01 2.50000000000000E-01 + 1.58171915768599E+00 2.04663521459000E-01 2.50000000000000E-01 + 2.50000000000000E-01 1.79975007305965E+00 3.27394710883601E-01 + 2.50000000000000E-01 2.50000000000000E-01 1.79495960350997E+00 + 5.77789090564371E-01 2.50000000000000E-01 2.50000000000000E-01 + 1.67489393228352E+00 7.97461429892528E-01 2.50000000000000E-01 + 2.50000000000000E-01 1.42452256547730E+00 7.94737926521907E-01 + 2.50000000000000E-01 2.50000000000000E-01 1.20389122059610E+00 + 6.76246582772151E-01 2.50000000000000E-01 2.50000000000000E-01 + 1.20539375184324E+00 4.25895712464750E-01 2.50000000000000E-01 + 2.50000000000000E-01 1.46870992982599E+00 4.44185259205497E-01 + 2.50000000000000E-01 2.50000000000000E-01 1.00000000000000E+00 + 2.50000000000000E-01 5.00000000000000E-01 2.50000000000000E-01 + 1.75000000000000E+00 0.00000000000000E+00 5.00000000000000E-01 + 2.50000000000000E-01 2.00000000000000E+00 7.50000000000000E-01 + 5.00000000000000E-01 2.50000000000000E-01 1.25000000000000E+00 + 1.00000000000000E+00 5.00000000000000E-01 2.50000000000000E-01 + 1.32713397223596E+00 2.00510665587990E-01 5.00000000000000E-01 + 2.50000000000000E-01 1.58171915768599E+00 2.04663521459000E-01 + 5.00000000000000E-01 2.50000000000000E-01 1.79975007305965E+00 + 3.27394710883601E-01 5.00000000000000E-01 2.50000000000000E-01 + 1.79495960350997E+00 5.77789090564371E-01 5.00000000000000E-01 + 2.50000000000000E-01 1.67489393228352E+00 7.97461429892528E-01 + 5.00000000000000E-01 2.50000000000000E-01 1.42452256547730E+00 + 7.94737926521907E-01 5.00000000000000E-01 2.50000000000000E-01 + 1.20389122059610E+00 6.76246582772151E-01 5.00000000000000E-01 + 2.50000000000000E-01 1.20539375184324E+00 4.25895712464750E-01 + 5.00000000000000E-01 2.50000000000000E-01 1.46870992982599E+00 + 4.44185259205497E-01 5.00000000000000E-01 2.50000000000000E-01 + 1.00000000000000E+00 2.50000000000000E-01 7.50000000000000E-01 + 2.50000000000000E-01 1.75000000000000E+00 0.00000000000000E+00 + 7.50000000000000E-01 2.50000000000000E-01 2.00000000000000E+00 + 7.50000000000000E-01 7.50000000000000E-01 2.50000000000000E-01 + 1.25000000000000E+00 1.00000000000000E+00 7.50000000000000E-01 + 2.50000000000000E-01 1.32713397223596E+00 2.00510665587990E-01 + 7.50000000000000E-01 2.50000000000000E-01 1.58171915768599E+00 + 2.04663521459000E-01 7.50000000000000E-01 2.50000000000000E-01 + 1.79975007305965E+00 3.27394710883601E-01 7.50000000000000E-01 + 2.50000000000000E-01 1.79495960350997E+00 5.77789090564371E-01 + 7.50000000000000E-01 2.50000000000000E-01 1.67489393228352E+00 + 7.97461429892528E-01 7.50000000000000E-01 2.50000000000000E-01 + 1.42452256547730E+00 7.94737926521907E-01 7.50000000000000E-01 + 2.50000000000000E-01 1.20389122059610E+00 6.76246582772151E-01 + 7.50000000000000E-01 2.50000000000000E-01 1.20539375184324E+00 + 4.25895712464750E-01 7.50000000000000E-01 2.50000000000000E-01 + 1.46870992982599E+00 4.44185259205497E-01 7.50000000000000E-01 + 2.50000000000000E-01 1.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 2.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 2.00000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 1.00000000000000E+00 1.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 1.25000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 2.50000000000000E-01 + 1.50000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 2.50000000000000E-01 2.00000000000000E+00 2.50000000000000E-01 + 0.00000000000000E+00 2.50000000000000E-01 2.00000000000000E+00 + 5.00000000000000E-01 0.00000000000000E+00 2.50000000000000E-01 + 1.75000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 + 2.50000000000000E-01 1.50000000000000E+00 1.00000000000000E+00 + 0.00000000000000E+00 2.50000000000000E-01 1.00000000000000E+00 + 7.50000000000000E-01 0.00000000000000E+00 2.50000000000000E-01 + 1.00000000000000E+00 5.00000000000000E-01 0.00000000000000E+00 + 2.50000000000000E-01 1.00000000000000E+00 0.00000000000000E+00 + 2.50000000000000E-01 2.50000000000000E-01 2.00000000000000E+00 + 0.00000000000000E+00 2.50000000000000E-01 2.50000000000000E-01 + 2.00000000000000E+00 1.00000000000000E+00 2.50000000000000E-01 + 2.50000000000000E-01 1.00000000000000E+00 1.00000000000000E+00 + 2.50000000000000E-01 2.50000000000000E-01 1.25000000000000E+00 + 0.00000000000000E+00 2.50000000000000E-01 2.50000000000000E-01 + 1.50000000000000E+00 0.00000000000000E+00 2.50000000000000E-01 + 2.50000000000000E-01 2.00000000000000E+00 2.50000000000000E-01 + 2.50000000000000E-01 2.50000000000000E-01 2.00000000000000E+00 + 5.00000000000000E-01 2.50000000000000E-01 2.50000000000000E-01 + 1.75000000000000E+00 1.00000000000000E+00 2.50000000000000E-01 + 2.50000000000000E-01 1.50000000000000E+00 1.00000000000000E+00 + 2.50000000000000E-01 2.50000000000000E-01 1.00000000000000E+00 + 7.50000000000000E-01 2.50000000000000E-01 2.50000000000000E-01 + 1.00000000000000E+00 5.00000000000000E-01 2.50000000000000E-01 + 2.50000000000000E-01 1.00000000000000E+00 0.00000000000000E+00 + 5.00000000000000E-01 2.50000000000000E-01 2.00000000000000E+00 + 0.00000000000000E+00 5.00000000000000E-01 2.50000000000000E-01 + 2.00000000000000E+00 1.00000000000000E+00 5.00000000000000E-01 + 2.50000000000000E-01 1.00000000000000E+00 1.00000000000000E+00 + 5.00000000000000E-01 2.50000000000000E-01 1.25000000000000E+00 + 0.00000000000000E+00 5.00000000000000E-01 2.50000000000000E-01 + 1.50000000000000E+00 0.00000000000000E+00 5.00000000000000E-01 + 2.50000000000000E-01 2.00000000000000E+00 2.50000000000000E-01 + 5.00000000000000E-01 2.50000000000000E-01 2.00000000000000E+00 + 5.00000000000000E-01 5.00000000000000E-01 2.50000000000000E-01 + 1.75000000000000E+00 1.00000000000000E+00 5.00000000000000E-01 + 2.50000000000000E-01 1.50000000000000E+00 1.00000000000000E+00 + 5.00000000000000E-01 2.50000000000000E-01 1.00000000000000E+00 + 7.50000000000000E-01 5.00000000000000E-01 2.50000000000000E-01 + 1.00000000000000E+00 5.00000000000000E-01 5.00000000000000E-01 + 2.50000000000000E-01 1.00000000000000E+00 0.00000000000000E+00 + 7.50000000000000E-01 2.50000000000000E-01 2.00000000000000E+00 + 0.00000000000000E+00 7.50000000000000E-01 2.50000000000000E-01 + 2.00000000000000E+00 1.00000000000000E+00 7.50000000000000E-01 + 2.50000000000000E-01 1.00000000000000E+00 1.00000000000000E+00 + 7.50000000000000E-01 2.50000000000000E-01 1.25000000000000E+00 + 0.00000000000000E+00 7.50000000000000E-01 2.50000000000000E-01 + 1.50000000000000E+00 0.00000000000000E+00 7.50000000000000E-01 + 2.50000000000000E-01 2.00000000000000E+00 2.50000000000000E-01 + 7.50000000000000E-01 2.50000000000000E-01 2.00000000000000E+00 + 5.00000000000000E-01 7.50000000000000E-01 2.50000000000000E-01 + 1.75000000000000E+00 1.00000000000000E+00 7.50000000000000E-01 + 2.50000000000000E-01 1.50000000000000E+00 1.00000000000000E+00 + 7.50000000000000E-01 2.50000000000000E-01 1.00000000000000E+00 + 7.50000000000000E-01 7.50000000000000E-01 2.50000000000000E-01 + 1.00000000000000E+00 5.00000000000000E-01 7.50000000000000E-01 + 2.50000000000000E-01 1.57180193105475E+00 6.20823344549013E-01 + 0.00000000000000E+00 2.50000000000000E-01 1.57180193105475E+00 + 6.20823344549013E-01 2.50000000000000E-01 2.50000000000000E-01 + 1.57180193105475E+00 6.20823344549013E-01 5.00000000000000E-01 + 2.50000000000000E-01 1.57180193105475E+00 6.20823344549013E-01 + 7.50000000000000E-01 2.50000000000000E-01 1.00000000000000E+00 + 2.50000000000000E-01 1.00000000000000E+00 2.50000000000000E-01 + 1.75000000000000E+00 0.00000000000000E+00 1.00000000000000E+00 + 2.50000000000000E-01 2.00000000000000E+00 7.50000000000000E-01 + 1.00000000000000E+00 2.50000000000000E-01 1.25000000000000E+00 + 1.00000000000000E+00 1.00000000000000E+00 2.50000000000000E-01 + 1.32713397223596E+00 2.00510665587990E-01 1.00000000000000E+00 + 2.50000000000000E-01 1.58171915768599E+00 2.04663521459000E-01 + 1.00000000000000E+00 2.50000000000000E-01 1.79975007305965E+00 + 3.27394710883601E-01 1.00000000000000E+00 2.50000000000000E-01 + 1.79495960350997E+00 5.77789090564371E-01 1.00000000000000E+00 + 2.50000000000000E-01 1.67489393228352E+00 7.97461429892528E-01 + 1.00000000000000E+00 2.50000000000000E-01 1.42452256547730E+00 + 7.94737926521907E-01 1.00000000000000E+00 2.50000000000000E-01 + 1.20389122059610E+00 6.76246582772151E-01 1.00000000000000E+00 + 2.50000000000000E-01 1.20539375184324E+00 4.25895712464750E-01 + 1.00000000000000E+00 2.50000000000000E-01 1.46870992982599E+00 + 4.44185259205497E-01 1.00000000000000E+00 2.50000000000000E-01 + 1.00000000000000E+00 0.00000000000000E+00 1.00000000000000E+00 + 0.00000000000000E+00 2.00000000000000E+00 0.00000000000000E+00 + 1.00000000000000E+00 0.00000000000000E+00 2.00000000000000E+00 + 1.00000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 + 1.00000000000000E+00 1.00000000000000E+00 1.00000000000000E+00 + 0.00000000000000E+00 1.25000000000000E+00 0.00000000000000E+00 + 1.00000000000000E+00 2.50000000000000E-01 1.50000000000000E+00 + 0.00000000000000E+00 1.00000000000000E+00 2.50000000000000E-01 + 2.00000000000000E+00 2.50000000000000E-01 1.00000000000000E+00 + 2.50000000000000E-01 2.00000000000000E+00 5.00000000000000E-01 + 1.00000000000000E+00 2.50000000000000E-01 1.75000000000000E+00 + 1.00000000000000E+00 1.00000000000000E+00 2.50000000000000E-01 + 1.50000000000000E+00 1.00000000000000E+00 1.00000000000000E+00 + 2.50000000000000E-01 1.00000000000000E+00 7.50000000000000E-01 + 1.00000000000000E+00 2.50000000000000E-01 1.00000000000000E+00 + 5.00000000000000E-01 1.00000000000000E+00 2.50000000000000E-01 + 1.57180193105475E+00 6.20823344549013E-01 1.00000000000000E+00 + 2.50000000000000E-01 1.00000000000000E+00 1.25000000000000E+00 + 0.00000000000000E+00 2.50000000000000E-01 1.25000000000000E+00 + 1.25000000000000E+00 0.00000000000000E+00 -7.81250000000000E-02 + 1.50000000000000E+00 1.25000000000000E+00 0.00000000000000E+00 + -2.18750000000000E-01 1.75000000000000E+00 1.25000000000000E+00 + 0.00000000000000E+00 -3.59375000000000E-01 1.00000000000000E+00 + 1.50000000000000E+00 0.00000000000000E+00 2.50000000000000E-01 + 1.25000000000000E+00 1.50000000000000E+00 0.00000000000000E+00 + -2.18750000000000E-01 1.50000000000000E+00 1.50000000000000E+00 + 0.00000000000000E+00 -3.12500000000000E-01 1.75000000000000E+00 + 1.50000000000000E+00 0.00000000000000E+00 -4.06250000000000E-01 + 1.00000000000000E+00 1.75000000000000E+00 0.00000000000000E+00 + 2.50000000000000E-01 1.25000000000000E+00 1.75000000000000E+00 + 0.00000000000000E+00 -3.59375000000000E-01 1.50000000000000E+00 + 1.75000000000000E+00 0.00000000000000E+00 -4.06250000000000E-01 + 1.75000000000000E+00 1.75000000000000E+00 0.00000000000000E+00 + -4.53125000000000E-01 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 1.00000000000000E+00 + 1.25000000000000E+00 2.50000000000000E-01 2.50000000000000E-01 + 1.25000000000000E+00 1.25000000000000E+00 2.50000000000000E-01 + 2.50000000000000E-01 1.50000000000000E+00 1.25000000000000E+00 + 2.50000000000000E-01 2.50000000000000E-01 1.75000000000000E+00 + 1.25000000000000E+00 2.50000000000000E-01 2.50000000000000E-01 + 1.00000000000000E+00 1.50000000000000E+00 2.50000000000000E-01 + 2.50000000000000E-01 1.25000000000000E+00 1.50000000000000E+00 + 2.50000000000000E-01 2.50000000000000E-01 1.50000000000000E+00 + 1.50000000000000E+00 2.50000000000000E-01 2.50000000000000E-01 + 1.75000000000000E+00 1.50000000000000E+00 2.50000000000000E-01 + 2.50000000000000E-01 1.00000000000000E+00 1.75000000000000E+00 + 2.50000000000000E-01 2.50000000000000E-01 1.25000000000000E+00 + 1.75000000000000E+00 2.50000000000000E-01 2.50000000000000E-01 + 1.50000000000000E+00 1.75000000000000E+00 2.50000000000000E-01 + 2.50000000000000E-01 1.75000000000000E+00 1.75000000000000E+00 + 2.50000000000000E-01 2.50000000000000E-01 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 1.00000000000000E+00 1.25000000000000E+00 5.00000000000000E-01 + 2.50000000000000E-01 1.25000000000000E+00 1.25000000000000E+00 + 5.00000000000000E-01 2.50000000000000E-01 1.50000000000000E+00 + 1.25000000000000E+00 5.00000000000000E-01 2.50000000000000E-01 + 1.75000000000000E+00 1.25000000000000E+00 5.00000000000000E-01 + 2.50000000000000E-01 1.00000000000000E+00 1.50000000000000E+00 + 5.00000000000000E-01 2.50000000000000E-01 1.25000000000000E+00 + 1.50000000000000E+00 5.00000000000000E-01 2.50000000000000E-01 + 1.50000000000000E+00 1.50000000000000E+00 5.00000000000000E-01 + 2.50000000000000E-01 1.75000000000000E+00 1.50000000000000E+00 + 5.00000000000000E-01 2.50000000000000E-01 1.00000000000000E+00 + 1.75000000000000E+00 5.00000000000000E-01 2.50000000000000E-01 + 1.25000000000000E+00 1.75000000000000E+00 5.00000000000000E-01 + 2.50000000000000E-01 1.50000000000000E+00 1.75000000000000E+00 + 5.00000000000000E-01 2.50000000000000E-01 1.75000000000000E+00 + 1.75000000000000E+00 5.00000000000000E-01 2.50000000000000E-01 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 1.00000000000000E+00 1.25000000000000E+00 + 7.50000000000000E-01 2.50000000000000E-01 1.25000000000000E+00 + 1.25000000000000E+00 7.50000000000000E-01 2.50000000000000E-01 + 1.50000000000000E+00 1.25000000000000E+00 7.50000000000000E-01 + 2.50000000000000E-01 1.75000000000000E+00 1.25000000000000E+00 + 7.50000000000000E-01 2.50000000000000E-01 1.00000000000000E+00 + 1.50000000000000E+00 7.50000000000000E-01 2.50000000000000E-01 + 1.25000000000000E+00 1.50000000000000E+00 7.50000000000000E-01 + 2.50000000000000E-01 1.50000000000000E+00 1.50000000000000E+00 + 7.50000000000000E-01 2.50000000000000E-01 1.75000000000000E+00 + 1.50000000000000E+00 7.50000000000000E-01 2.50000000000000E-01 + 1.00000000000000E+00 1.75000000000000E+00 7.50000000000000E-01 + 2.50000000000000E-01 1.25000000000000E+00 1.75000000000000E+00 + 7.50000000000000E-01 2.50000000000000E-01 1.50000000000000E+00 + 1.75000000000000E+00 7.50000000000000E-01 2.50000000000000E-01 + 1.75000000000000E+00 1.75000000000000E+00 7.50000000000000E-01 + 2.50000000000000E-01 2.00000000000000E+00 1.25000000000000E+00 + 0.00000000000000E+00 2.50000000000000E-01 2.00000000000000E+00 + 1.50000000000000E+00 0.00000000000000E+00 2.50000000000000E-01 + 2.00000000000000E+00 1.75000000000000E+00 0.00000000000000E+00 + 2.50000000000000E-01 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 2.00000000000000E+00 + 1.25000000000000E+00 2.50000000000000E-01 2.50000000000000E-01 + 2.00000000000000E+00 1.50000000000000E+00 2.50000000000000E-01 + 2.50000000000000E-01 2.00000000000000E+00 1.75000000000000E+00 + 2.50000000000000E-01 2.50000000000000E-01 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 2.00000000000000E+00 1.25000000000000E+00 5.00000000000000E-01 + 2.50000000000000E-01 2.00000000000000E+00 1.50000000000000E+00 + 5.00000000000000E-01 2.50000000000000E-01 2.00000000000000E+00 + 1.75000000000000E+00 5.00000000000000E-01 2.50000000000000E-01 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 2.00000000000000E+00 1.25000000000000E+00 + 7.50000000000000E-01 2.50000000000000E-01 2.00000000000000E+00 + 1.50000000000000E+00 7.50000000000000E-01 2.50000000000000E-01 + 2.00000000000000E+00 1.75000000000000E+00 7.50000000000000E-01 + 2.50000000000000E-01 1.25000000000000E+00 2.00000000000000E+00 + 0.00000000000000E+00 2.50000000000000E-01 1.50000000000000E+00 + 2.00000000000000E+00 0.00000000000000E+00 2.50000000000000E-01 + 1.75000000000000E+00 2.00000000000000E+00 0.00000000000000E+00 + 2.50000000000000E-01 2.00000000000000E+00 2.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 1.25000000000000E+00 + 2.00000000000000E+00 2.50000000000000E-01 2.50000000000000E-01 + 1.50000000000000E+00 2.00000000000000E+00 2.50000000000000E-01 + 2.50000000000000E-01 1.75000000000000E+00 2.00000000000000E+00 + 2.50000000000000E-01 2.50000000000000E-01 2.00000000000000E+00 + 2.00000000000000E+00 2.50000000000000E-01 2.50000000000000E-01 + 1.25000000000000E+00 2.00000000000000E+00 5.00000000000000E-01 + 2.50000000000000E-01 1.50000000000000E+00 2.00000000000000E+00 + 5.00000000000000E-01 2.50000000000000E-01 1.75000000000000E+00 + 2.00000000000000E+00 5.00000000000000E-01 2.50000000000000E-01 + 2.00000000000000E+00 2.00000000000000E+00 5.00000000000000E-01 + 2.50000000000000E-01 1.25000000000000E+00 2.00000000000000E+00 + 7.50000000000000E-01 2.50000000000000E-01 1.50000000000000E+00 + 2.00000000000000E+00 7.50000000000000E-01 2.50000000000000E-01 + 1.75000000000000E+00 2.00000000000000E+00 7.50000000000000E-01 + 2.50000000000000E-01 2.00000000000000E+00 2.00000000000000E+00 + 7.50000000000000E-01 2.50000000000000E-01 1.00000000000000E+00 + 2.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 1.00000000000000E+00 2.00000000000000E+00 2.50000000000000E-01 + 2.50000000000000E-01 1.00000000000000E+00 2.00000000000000E+00 + 5.00000000000000E-01 2.50000000000000E-01 1.00000000000000E+00 + 2.00000000000000E+00 7.50000000000000E-01 2.50000000000000E-01 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 1.00000000000000E+00 1.25000000000000E+00 + 1.00000000000000E+00 2.50000000000000E-01 1.25000000000000E+00 + 1.25000000000000E+00 1.00000000000000E+00 -7.81250000000000E-02 + 1.50000000000000E+00 1.25000000000000E+00 1.00000000000000E+00 + -2.18750000000000E-01 1.75000000000000E+00 1.25000000000000E+00 + 1.00000000000000E+00 -3.59375000000000E-01 1.00000000000000E+00 + 1.50000000000000E+00 1.00000000000000E+00 2.50000000000000E-01 + 1.25000000000000E+00 1.50000000000000E+00 1.00000000000000E+00 + -2.18750000000000E-01 1.50000000000000E+00 1.50000000000000E+00 + 1.00000000000000E+00 -3.12500000000000E-01 1.75000000000000E+00 + 1.50000000000000E+00 1.00000000000000E+00 -4.06250000000000E-01 + 1.00000000000000E+00 1.75000000000000E+00 1.00000000000000E+00 + 2.50000000000000E-01 1.25000000000000E+00 1.75000000000000E+00 + 1.00000000000000E+00 -3.59375000000000E-01 1.50000000000000E+00 + 1.75000000000000E+00 1.00000000000000E+00 -4.06250000000000E-01 + 1.75000000000000E+00 1.75000000000000E+00 1.00000000000000E+00 + -4.53125000000000E-01 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 2.00000000000000E+00 + 1.25000000000000E+00 1.00000000000000E+00 2.50000000000000E-01 + 2.00000000000000E+00 1.50000000000000E+00 1.00000000000000E+00 + 2.50000000000000E-01 2.00000000000000E+00 1.75000000000000E+00 + 1.00000000000000E+00 2.50000000000000E-01 1.25000000000000E+00 + 2.00000000000000E+00 1.00000000000000E+00 2.50000000000000E-01 + 1.50000000000000E+00 2.00000000000000E+00 1.00000000000000E+00 + 2.50000000000000E-01 1.75000000000000E+00 2.00000000000000E+00 + 1.00000000000000E+00 2.50000000000000E-01 2.00000000000000E+00 + 2.00000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 + 1.00000000000000E+00 2.00000000000000E+00 1.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 2.50000000000000E-01 + 0.00000000000000E+00 0.00000000000000E+00 2.50000000000000E-01 + 5.00000000000000E-01 0.00000000000000E+00 0.00000000000000E+00 + 2.50000000000000E-01 7.50000000000000E-01 0.00000000000000E+00 + 0.00000000000000E+00 2.50000000000000E-01 7.50000000000000E-01 + 1.00000000000000E+00 0.00000000000000E+00 2.50000000000000E-01 + 5.00000000000000E-01 1.00000000000000E+00 0.00000000000000E+00 + 2.50000000000000E-01 2.50000000000000E-01 1.00000000000000E+00 + 0.00000000000000E+00 2.50000000000000E-01 0.00000000000000E+00 + 1.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 7.50000000000000E-01 0.00000000000000E+00 + 2.50000000000000E-01 0.00000000000000E+00 5.00000000000000E-01 + 0.00000000000000E+00 2.50000000000000E-01 0.00000000000000E+00 + 2.50000000000000E-01 0.00000000000000E+00 2.50000000000000E-01 + 2.50000000000000E-01 2.50000000000000E-01 0.00000000000000E+00 + -7.81250000000000E-02 5.00000000000000E-01 2.50000000000000E-01 + 0.00000000000000E+00 -2.18750000000000E-01 7.50000000000000E-01 + 2.50000000000000E-01 0.00000000000000E+00 -3.59375000000000E-01 + 2.50000000000000E-01 5.00000000000000E-01 0.00000000000000E+00 + -2.18750000000000E-01 5.00000000000000E-01 5.00000000000000E-01 + 0.00000000000000E+00 -3.12500000000000E-01 7.50000000000000E-01 + 5.00000000000000E-01 0.00000000000000E+00 -4.06250000000000E-01 + 2.50000000000000E-01 7.50000000000000E-01 0.00000000000000E+00 + -3.59375000000000E-01 5.00000000000000E-01 7.50000000000000E-01 + 0.00000000000000E+00 -4.06250000000000E-01 7.50000000000000E-01 + 7.50000000000000E-01 0.00000000000000E+00 -4.53125000000000E-01 + 0.00000000000000E+00 0.00000000000000E+00 2.50000000000000E-01 + 2.50000000000000E-01 2.50000000000000E-01 0.00000000000000E+00 + 2.50000000000000E-01 2.50000000000000E-01 2.50000000000000E-01 + 2.50000000000000E-01 2.50000000000000E-01 2.50000000000000E-01 + 0.00000000000000E+00 2.50000000000000E-01 2.50000000000000E-01 + 2.50000000000000E-01 5.00000000000000E-01 0.00000000000000E+00 + 2.50000000000000E-01 2.50000000000000E-01 5.00000000000000E-01 + 2.50000000000000E-01 2.50000000000000E-01 2.50000000000000E-01 + 7.50000000000000E-01 0.00000000000000E+00 2.50000000000000E-01 + 2.50000000000000E-01 7.50000000000000E-01 2.50000000000000E-01 + 2.50000000000000E-01 2.50000000000000E-01 2.50000000000000E-01 + 5.00000000000000E-01 2.50000000000000E-01 2.50000000000000E-01 + 0.00000000000000E+00 5.00000000000000E-01 2.50000000000000E-01 + 2.50000000000000E-01 5.00000000000000E-01 5.00000000000000E-01 + 2.50000000000000E-01 2.50000000000000E-01 7.50000000000000E-01 + 5.00000000000000E-01 2.50000000000000E-01 2.50000000000000E-01 + 2.50000000000000E-01 7.50000000000000E-01 2.50000000000000E-01 + 2.50000000000000E-01 0.00000000000000E+00 7.50000000000000E-01 + 2.50000000000000E-01 2.50000000000000E-01 5.00000000000000E-01 + 7.50000000000000E-01 2.50000000000000E-01 2.50000000000000E-01 + 7.50000000000000E-01 7.50000000000000E-01 2.50000000000000E-01 + 2.50000000000000E-01 2.50000000000000E-01 1.00000000000000E+00 + 2.50000000000000E-01 2.50000000000000E-01 0.00000000000000E+00 + 1.00000000000000E+00 2.50000000000000E-01 2.50000000000000E-01 + 5.00000000000000E-01 1.00000000000000E+00 2.50000000000000E-01 + 2.50000000000000E-01 7.50000000000000E-01 1.00000000000000E+00 + 2.50000000000000E-01 2.50000000000000E-01 0.00000000000000E+00 + 0.00000000000000E+00 5.00000000000000E-01 2.50000000000000E-01 + 2.50000000000000E-01 0.00000000000000E+00 5.00000000000000E-01 + 2.50000000000000E-01 2.50000000000000E-01 2.50000000000000E-01 + 5.00000000000000E-01 2.50000000000000E-01 0.00000000000000E+00 + 2.50000000000000E-01 5.00000000000000E-01 2.50000000000000E-01 + 5.00000000000000E-01 0.00000000000000E+00 5.00000000000000E-01 + 2.50000000000000E-01 5.00000000000000E-01 2.50000000000000E-01 + 5.00000000000000E-01 2.50000000000000E-01 7.50000000000000E-01 + 0.00000000000000E+00 5.00000000000000E-01 2.50000000000000E-01 + 7.50000000000000E-01 2.50000000000000E-01 5.00000000000000E-01 + 2.50000000000000E-01 2.50000000000000E-01 5.00000000000000E-01 + 5.00000000000000E-01 2.50000000000000E-01 0.00000000000000E+00 + 5.00000000000000E-01 5.00000000000000E-01 2.50000000000000E-01 + 5.00000000000000E-01 5.00000000000000E-01 5.00000000000000E-01 + 2.50000000000000E-01 7.50000000000000E-01 5.00000000000000E-01 + 5.00000000000000E-01 2.50000000000000E-01 2.50000000000000E-01 + 7.50000000000000E-01 5.00000000000000E-01 2.50000000000000E-01 + 0.00000000000000E+00 7.50000000000000E-01 5.00000000000000E-01 + 2.50000000000000E-01 5.00000000000000E-01 7.50000000000000E-01 + 5.00000000000000E-01 2.50000000000000E-01 7.50000000000000E-01 + 7.50000000000000E-01 5.00000000000000E-01 2.50000000000000E-01 + 2.50000000000000E-01 1.00000000000000E+00 5.00000000000000E-01 + 2.50000000000000E-01 0.00000000000000E+00 1.00000000000000E+00 + 5.00000000000000E-01 2.50000000000000E-01 5.00000000000000E-01 + 1.00000000000000E+00 5.00000000000000E-01 2.50000000000000E-01 + 7.50000000000000E-01 1.00000000000000E+00 5.00000000000000E-01 + 2.50000000000000E-01 0.00000000000000E+00 0.00000000000000E+00 + 7.50000000000000E-01 2.50000000000000E-01 2.50000000000000E-01 + 0.00000000000000E+00 7.50000000000000E-01 2.50000000000000E-01 + 2.50000000000000E-01 2.50000000000000E-01 7.50000000000000E-01 + 2.50000000000000E-01 0.00000000000000E+00 2.50000000000000E-01 + 7.50000000000000E-01 2.50000000000000E-01 5.00000000000000E-01 + 0.00000000000000E+00 7.50000000000000E-01 2.50000000000000E-01 + 5.00000000000000E-01 2.50000000000000E-01 7.50000000000000E-01 + 2.50000000000000E-01 7.50000000000000E-01 0.00000000000000E+00 + 7.50000000000000E-01 2.50000000000000E-01 7.50000000000000E-01 + 2.50000000000000E-01 7.50000000000000E-01 2.50000000000000E-01 + 2.50000000000000E-01 5.00000000000000E-01 7.50000000000000E-01 + 2.50000000000000E-01 0.00000000000000E+00 5.00000000000000E-01 + 7.50000000000000E-01 2.50000000000000E-01 5.00000000000000E-01 + 5.00000000000000E-01 7.50000000000000E-01 2.50000000000000E-01 + 7.50000000000000E-01 5.00000000000000E-01 7.50000000000000E-01 + 2.50000000000000E-01 2.50000000000000E-01 7.50000000000000E-01 + 7.50000000000000E-01 2.50000000000000E-01 0.00000000000000E+00 + 7.50000000000000E-01 7.50000000000000E-01 2.50000000000000E-01 + 5.00000000000000E-01 7.50000000000000E-01 7.50000000000000E-01 + 2.50000000000000E-01 7.50000000000000E-01 7.50000000000000E-01 + 7.50000000000000E-01 2.50000000000000E-01 2.50000000000000E-01 + 1.00000000000000E+00 7.50000000000000E-01 2.50000000000000E-01 + 0.00000000000000E+00 1.00000000000000E+00 7.50000000000000E-01 + 2.50000000000000E-01 5.00000000000000E-01 1.00000000000000E+00 + 7.50000000000000E-01 2.50000000000000E-01 7.50000000000000E-01 + 1.00000000000000E+00 7.50000000000000E-01 2.50000000000000E-01 + 0.00000000000000E+00 0.00000000000000E+00 1.00000000000000E+00 + 0.00000000000000E+00 2.50000000000000E-01 0.00000000000000E+00 + 1.00000000000000E+00 2.50000000000000E-01 2.50000000000000E-01 + 2.50000000000000E-01 1.00000000000000E+00 -7.81250000000000E-02 + 0.00000000000000E+00 2.50000000000000E-01 1.00000000000000E+00 + 2.50000000000000E-01 5.00000000000000E-01 0.00000000000000E+00 + 1.00000000000000E+00 2.50000000000000E-01 5.00000000000000E-01 + 2.50000000000000E-01 1.00000000000000E+00 -2.18750000000000E-01 + 7.50000000000000E-01 0.00000000000000E+00 1.00000000000000E+00 + 2.50000000000000E-01 7.50000000000000E-01 2.50000000000000E-01 + 1.00000000000000E+00 -3.59375000000000E-01 2.50000000000000E-01 + 5.00000000000000E-01 1.00000000000000E+00 -2.18750000000000E-01 + 0.00000000000000E+00 5.00000000000000E-01 1.00000000000000E+00 + 2.50000000000000E-01 5.00000000000000E-01 5.00000000000000E-01 + 1.00000000000000E+00 -3.12500000000000E-01 7.50000000000000E-01 + 5.00000000000000E-01 1.00000000000000E+00 -4.06250000000000E-01 + 2.50000000000000E-01 7.50000000000000E-01 1.00000000000000E+00 + -3.59375000000000E-01 0.00000000000000E+00 7.50000000000000E-01 + 1.00000000000000E+00 2.50000000000000E-01 5.00000000000000E-01 + 7.50000000000000E-01 1.00000000000000E+00 -4.06250000000000E-01 + 7.50000000000000E-01 7.50000000000000E-01 1.00000000000000E+00 + -4.53125000000000E-01 2.50000000000000E-01 1.00000000000000E+00 + 1.00000000000000E+00 2.50000000000000E-01 0.00000000000000E+00 + 1.00000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 + 5.00000000000000E-01 1.00000000000000E+00 1.00000000000000E+00 + 2.50000000000000E-01 7.50000000000000E-01 1.00000000000000E+00 + 1.00000000000000E+00 2.50000000000000E-01 0.00000000000000E+00 + 0.00000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 + ENREGISTREMENT DE TYPE 5 +LABEL AUTOMATIQUE : 1 diff --git a/src/MEDMEM/Doxyfile_med_user.in b/src/MEDMEM/Doxyfile_med_user.in index 3855b171a..0f007a560 100644 --- a/src/MEDMEM/Doxyfile_med_user.in +++ b/src/MEDMEM/Doxyfile_med_user.in @@ -58,6 +58,9 @@ EXCLUDE_PATTERNS = MEDMEM_DriversDef.* \ MEDMEM_DriverTools.* \ MEDMEM_SkyLineArray.* \ MEDMEM_TypeMeshDriver.* \ + MEDMEM_CellModel.* \ + MEDMEM_Exception.* \ + MEDMEM_GenDriver.* \ MEDMEM_Array.hxx \ MEDMEM_PointerOf.hxx \ MEDMEM_STRING.hxx \ diff --git a/src/MEDMEM/MEDMEM_Exception.hxx b/src/MEDMEM/MEDMEM_Exception.hxx index 43906d2ce..1591771df 100644 --- a/src/MEDMEM/MEDMEM_Exception.hxx +++ b/src/MEDMEM/MEDMEM_Exception.hxx @@ -6,11 +6,11 @@ #ifndef MEDEXCEPTION_HXX #define MEDEXCEPTION_HXX -using namespace std; - #include #include +using namespace std; + #ifndef LOCALIZED #define LOCALIZED(message) message , __FILE__ , __LINE__ #endif diff --git a/src/MEDMEM/MEDMEM_Field.hxx b/src/MEDMEM/MEDMEM_Field.hxx index 69db4dd7c..f5a243798 100644 --- a/src/MEDMEM/MEDMEM_Field.hxx +++ b/src/MEDMEM/MEDMEM_Field.hxx @@ -1874,15 +1874,24 @@ template int FIELD::addDriver(driverTypes driverType, template inline int FIELD::addDriver (GENDRIVER & driver ) { const char * LOC = "FIELD::addDriver(GENDRIVER &) : "; + int current; + BEGIN_OF(LOC); // duplicate driver to delete it with destructor ! GENDRIVER * newDriver = driver.copy() ; _drivers.push_back(newDriver); - return _drivers.size() -1 ; + current = _drivers.size()-1; + SCRUTE(current); + driver.setId(current); + + MESSAGE(LOC << " je suis la 1"); END_OF(LOC); + MESSAGE(LOC << " je suis la 2"); + + return current ; }; /*! diff --git a/src/MEDMEM/MEDMEM_GenDriver.cxx b/src/MEDMEM/MEDMEM_GenDriver.cxx index cff81aed6..e99ec8af4 100644 --- a/src/MEDMEM/MEDMEM_GenDriver.cxx +++ b/src/MEDMEM/MEDMEM_GenDriver.cxx @@ -115,27 +115,25 @@ ostream & MEDMEM::operator<<(ostream &os,const GENDRIVER & drv) switch (drv._accessMode) { case MED_RDONLY : - os << "C'est un IO de READ" << endl; + os<<"C'est un IO de READ"< MED::getMeshNames () const { MESH * MED::getMesh ( const string & meshName ) const throw (MED_EXCEPTION) { + const char * LOC = "MED::getMesh ( const string & meshName ) const : "; BEGIN_OF(LOC); - SCRUTE(meshName); - map::const_iterator itMeshes = _meshes.find(meshName); if ( itMeshes == _meshes.end() ) @@ -599,15 +600,29 @@ deque MED::getFieldIteration (const string & fieldName) const // const MAP_DT_IT_ & myIterationMap = const_cast ((*itFields).second); const MAP_DT_IT_ & myIterationMap = (*itFields).second ; MAP_DT_IT_::const_iterator currentIterator ; + + int iterationSize = myIterationMap.size(); - deque Iteration(myIterationMap.size()); + SCRUTE(iterationSize); + + deque Iteration(iterationSize); int iterationIndex = 0; - for ( currentIterator=myIterationMap.begin();currentIterator != myIterationMap.end(); currentIterator++ ) { - Iteration[iterationIndex]=(*currentIterator).first; - iterationIndex++; // CF OPTIMISATION - } + for (currentIterator = myIterationMap.begin(); + currentIterator != myIterationMap.end(); currentIterator++ ) + { + SCRUTE(((*currentIterator).first).dt); + SCRUTE(((*currentIterator).first).it); + + Iteration[iterationIndex].dt = ((*currentIterator).first).dt; + Iteration[iterationIndex].it = ((*currentIterator).first).it; + + // Iteration[iterationIndex]=(*currentIterator).first; + SCRUTE(Iteration[iterationIndex].dt); + SCRUTE(Iteration[iterationIndex].it); + iterationIndex++; // CF OPTIMISATION + } END_OF(LOC); return Iteration ; diff --git a/src/MEDMEM/MEDMEM_MedFieldDriver.hxx b/src/MEDMEM/MEDMEM_MedFieldDriver.hxx index 9ecc949dd..13da382e5 100644 --- a/src/MEDMEM/MEDMEM_MedFieldDriver.hxx +++ b/src/MEDMEM/MEDMEM_MedFieldDriver.hxx @@ -119,7 +119,7 @@ public : MED_FR::med_int err = 0; if (_status == MED_OPENED) { err=MED_FR::MEDfermer(_medIdt); - H5close(); // If we call H5close() all the files are closed. + //H5close(); // If we call H5close() all the files are closed. _status = MED_CLOSED; _medIdt = MED_INVALID; MESSAGE(" MED_FIELD_DRIVER::close() : MEDfermer : _medIdt= " << _medIdt ); @@ -478,32 +478,19 @@ template void MED_FIELD_RDONLY_DRIVER::read(void) for (int i=0; i_support->getEntity()); -// NumberOfValues[i] = -// MEDnVal(_medIdt, -// const_cast (_fieldName.c_str()), -// (MED_FR::med_entite_maillage)_ptrField->_support->getEntity(), -// (MED_FR::med_geometrie_element)Types[i], -// _ptrField->_iterationNumber, -// _ptrField->_orderNumber) ; // no time step ! prend en compte le nbre de pt de gauss - // test if NumberOfValues is the same in _support !!! TODO that !! - // we suppose it is - // we could allocate array - // Be really carefull about the profil; especially the last arg of - // MEDnVal - - NumberOfValues[i] = + NumberOfValues[i] = MEDnVal(_medIdt, const_cast (_fieldName.c_str()), (MED_FR::med_entite_maillage)_ptrField->_support->getEntity(), - (MED_FR::med_geometrie_element) Types[i], - _ptrField->_iterationNumber, _ptrField->_orderNumber, - const_cast (_ptrField->_support->getMesh()->getName().c_str()), - MED_FR::MED_COMPACT) ; - + (MED_FR::med_geometrie_element)Types[i], + _ptrField->_iterationNumber, + _ptrField->_orderNumber) ; // no time step ! prend en compte le nbre de pt de gauss + // test if NumberOfValues is the same in _support !!! TODO that !! + // we suppose it is + // we could allocate array myValues[i] = new T[ NumberOfValues[i]*numberOfComponents ] ; TotalNumberOfValues+=NumberOfValues[i] ;// diviser par le nombre de point de gauss char * ProfilName = new char[MED_TAILLE_NOM+1]; - char * LocalGaussName = new char[MED_TAILLE_NOM+1]; MESSAGE ("NumberOfValues :"<< NumberOfValues[i]); MESSAGE ("NumberOfComponents :"<< numberOfComponents); MESSAGE ("MESH_NAME :"<< MeshName.c_str()); @@ -513,25 +500,22 @@ template void MED_FIELD_RDONLY_DRIVER::read(void) MESSAGE("Iteration :"<<_ptrField->getIterationNumber()); MESSAGE("Order :"<<_ptrField->getOrderNumber()); _ptrField->_numberOfValues+=NumberOfValues[i]; // problem with gauss point : _numberOfValues != TotalNumberOfValues !!!!!!! - - err = MEDchampLire(_medIdt,const_cast (MeshName.c_str()), - const_cast (_fieldName.c_str()), - (unsigned char*) myValues[i], - MED_FR::MED_NO_INTERLACE,MED_ALL, - LocalGaussName,ProfilName, - MED_FR::MED_NO_PFLMOD, - (MED_FR::med_entite_maillage) _ptrField->_support->getEntity(),(MED_FR::med_geometrie_element)Types[i], - _ptrField->getIterationNumber(), - _ptrField->getOrderNumber()); - - if ( err < 0) { + if ( MED_FR::MEDchampLire(_medIdt,const_cast (MeshName.c_str()), + const_cast (_fieldName.c_str()), + (unsigned char*) myValues[i], + MED_FR::MED_NO_INTERLACE, + MED_ALL, + ProfilName, + (MED_FR::med_entite_maillage) _ptrField->_support->getEntity(),(MED_FR::med_geometrie_element)Types[i], + _ptrField->getIterationNumber(), + _ptrField->getOrderNumber() + ) < 0) { // we must do some delete !!! for(int j=0; j<=i;j++) delete[] myValues[j]; delete[] myValues; delete[] NumberOfValues ; delete[] ProfilName; - delete[] LocalGaussName; delete[] _ptrField->_componentsTypes ; delete[] _ptrField->_componentsNames ; delete[] _ptrField->_componentsUnits ; @@ -546,10 +530,7 @@ template void MED_FIELD_RDONLY_DRIVER::read(void) throw MEDEXCEPTION( LOCALIZED( STRING(LOC) <<": ERROR when read value")) ; } - // At this time ProfilName should be MED_FR::MED_NOPFL and - // LocalGaussName should be MED_FR::MED_NOGAUSS delete[] ProfilName ; - delete[] LocalGaussName ; } // allocate _value // probleme avec les points de gauss : voir lorsqu-il y en a (!= 1) @@ -762,32 +743,16 @@ template void MED_FIELD_WRONLY_DRIVER::write(void) const cout<<"==================> valeur de MED_FR::MED_REEL64 = "< ( MeshName.c_str()) , //( string(mesh_name).resize(MED_TAILLE_NOM).c_str()) -// const_cast ( (_ptrField->getName()).c_str()), -// (unsigned char*)value, -// MED_FR::MED_FULL_INTERLACE, -// NumberOfElements, -// NumberOfGaussPoint[i], -// MED_ALL, -// MED_NOPFL, -// MED_FR::MED_REMP, // PROFIL NON GERE, mode de remplacement non géré -// (MED_FR::med_entite_maillage)mySupport->getEntity(), -// (MED_FR::med_geometrie_element)Types[i], -// _ptrField->getIterationNumber(), -// " ", -// _ptrField->getTime(), -// _ptrField->getOrderNumber() -// ); - err=MED_FR::MEDchampEcr(_medIdt, const_cast ( MeshName.c_str()) , //( string(mesh_name).resize(MED_TAILLE_NOM).c_str()) const_cast ( (_ptrField->getName()).c_str()), - (unsigned char*)value, + (unsigned char*)value, MED_FR::MED_FULL_INTERLACE, - NumberOfElements*NumberOfGaussPoint[i], - MED_NOGAUSS, MED_ALL, MED_NOPFL, - MED_FR::MED_NO_PFLMOD, // PROFIL NON GERE, mode de remplacement non géré + NumberOfElements, + NumberOfGaussPoint[i], + MED_ALL, + MED_NOPFL, + MED_FR::MED_REMP, // PROFIL NON GERE, mode de remplacement non géré (MED_FR::med_entite_maillage)mySupport->getEntity(), (MED_FR::med_geometrie_element)Types[i], _ptrField->getIterationNumber(), @@ -795,7 +760,6 @@ template void MED_FIELD_WRONLY_DRIVER::write(void) const _ptrField->getTime(), _ptrField->getOrderNumber() ); - if (err < MED_VALID ) throw MEDEXCEPTION(LOCALIZED( STRING(LOC) <<": Error in writing Field "<< _ptrField->getName() <<", type "<getIsAGrid(); - -// MED_FR::med_grid_type type; + int isAGrid = false; + MED_FR::med_grid_type type; -// err = MEDgridInfo (_medIdt, i, &isAGrid, &type); -// if (err != MED_VALID) -// throw MED_EXCEPTION ( LOCALIZED( STRING(LOC) << "error in MEDgridInfo()") ); - -// err = MEDmaaInfo(_medIdt, i ,meshName, &meshDim) ; -// if (err != MED_VALID) -// throw MED_EXCEPTION ( LOCALIZED( STRING(LOC) << ": can't get information about the mesh n°" -// << i <<" of the file |" << _fileName << "| !" -// ) -// ); -// MESSAGE(LOC<<": Mesh n°"<V2_2 - case MED_EN::MED_LECTURE: - ptrDriver = new MED_MESH_RDONLY_DRIVER(_fileName, ptrMesh); - break ; - // case MED_EN::MED_REMP: V2_1->V2_2 - case MED_EN::MED_LECTURE_ECRITURE: - ptrDriver = new MED_MESH_RDWR_DRIVER(_fileName, ptrMesh); - break ; - // case MED_EN::MED_ECRI: // should never append !! V2_1->V2_2 - case MED_EN::MED_LECTURE_AJOUT: // should never append !! - // ptrDriver = new MED_MESH_RDONLY_DRIVER(_fileName, ptrMesh); - ptrDriver = new MED_MESH_WRONLY_DRIVER(_fileName, ptrMesh); - break; - case MED_EN::MED_CREATION: // V2_1->V2_2 - ptrDriver = new MED_MESH_WRONLY_DRIVER(_fileName, ptrMesh); - break; - default: - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) << "Bad file mode access !")); - } - ptrDriver->setId ( getId() ); - ptrDriver->setMeshName ( meshName ); - ptrMesh->addDriver(*ptrDriver); - delete ptrDriver ; - - if (isAGrid) - _ptrMed->_meshes[meshName] = (MESH *) ptrMesh; - else - _ptrMed->_meshes[meshName] = ptrMesh; - + err = MEDgridInfo (_medIdt, i, &isAGrid, &type); + if (err != MED_VALID) + throw MED_EXCEPTION ( LOCALIZED( STRING(LOC) << "error in MEDgridInfo()") ); + + err = MEDmaaInfo(_medIdt, i ,meshName, &meshDim) ; + if (err != MED_VALID) + throw MED_EXCEPTION ( LOCALIZED( STRING(LOC) << ": can't get information about the mesh n°" + << i <<" of the file |" << _fileName << "| !" + ) + ); + MESSAGE(LOC<<": Mesh n°"<setId ( getId() ); + ptrDriver->setMeshName ( meshName ); + ptrMesh->addDriver(*ptrDriver); + delete ptrDriver ; + + if (isAGrid) + _ptrMed->_meshes[meshName] = (MESH *) ptrMesh; + else _ptrMed->_meshes[meshName] = ptrMesh; - ptrMesh->setName(meshName); - - ptrMesh->setDescription(meshDescription); - - SCRUTE(ptrMesh); - - MESSAGE(LOC<<"is" << (isAGrid ? "" : " NOT") << " a GRID and its name is "<getName()); - - // we create all global support (for each entity type : - int index = 0; - for (currentEntity=meshEntities.begin();currentEntity != meshEntities.end(); currentEntity++) { - string supportName="SupportOnAll_" ; - supportName+=entNames[(MED_FR::med_entite_maillage)(*currentEntity).first] ; - //(_ptrMed->_support)[meshName][(MED_FR::med_entite_maillage)(*currentEntity).first]=new SUPPORT(ptrMesh,supportName,(MED_EN::medEntityMesh) (*currentEntity).first) ; - SUPPORT* mySupport = new SUPPORT() ; - mySupport->setName(supportName); - mySupport->setMesh(ptrMesh); - mySupport->setEntity((MED_EN::medEntityMesh) (*currentEntity).first); - mySupport->setAll(true); - (_ptrMed->_support)[meshName][(MED_FR::med_entite_maillage)(*currentEntity).first] = mySupport ; - MESSAGE(LOC<< "The support " << supportName.c_str() << " on entity " << (*currentEntity).first << " is built"); - index++; - } - MESSAGE(LOC <<"The mesh " <getName() << " has " << index << " support(s)"); + ptrMesh->setName(meshName); + + SCRUTE(ptrMesh); + + MESSAGE(LOC<<"is" << (isAGrid ? "" : " NOT") << " a GRID and its name is "<getName()); + + // we create all global support (for each entity type : + int index = 0; + for (currentEntity=meshEntities.begin();currentEntity != meshEntities.end(); currentEntity++) { + string supportName="SupportOnAll_" ; + supportName+=entNames[(MED_FR::med_entite_maillage)(*currentEntity).first] ; + //(_ptrMed->_support)[meshName][(MED_FR::med_entite_maillage)(*currentEntity).first]=new SUPPORT(ptrMesh,supportName,(MED_EN::medEntityMesh) (*currentEntity).first) ; + SUPPORT* mySupport = new SUPPORT() ; + mySupport->setName(supportName); + mySupport->setMesh(ptrMesh); + mySupport->setEntity((MED_EN::medEntityMesh) (*currentEntity).first); + mySupport->setAll(true); + (_ptrMed->_support)[meshName][(MED_FR::med_entite_maillage)(*currentEntity).first] = mySupport ; + MESSAGE(LOC<< "The support " << supportName.c_str() << " on entity " << (*currentEntity).first << " is built"); + index++; } + MESSAGE(LOC <<"The mesh " <getName() << " has " << index << " support(s)"); + } map >::const_iterator const_itSupportOnMesh ; @@ -386,319 +340,219 @@ void MED_MED_RDONLY_DRIVER::readFileStruct( void ) char timeStepUnit[MED_TAILLE_PNOM+1] ; double timeStep = 0.0; int orderNumber = -1; //???init????? - int numberOfRefMesh = 0; - MED_FR::med_booleen meshLink; map & _meshes = _ptrMed->_meshes; map & _fields = _ptrMed->_fields; map & _meshName = _ptrMed->_meshName; map > & _support = _ptrMed->_support; + numberOfFields = MEDnChamp(_medIdt,0) ; if ( numberOfFields <= 0 ) - MESSAGE(LOC << "Be careful there is no field in file |"<< - _fileName<<"| !"); - - for (i=1;i<=numberOfFields;i++) - { - numberOfComponents = MEDnChamp(_medIdt,i) ; + MESSAGE(LOC << "Be careful there is no field in file |"<<_fileName<<"| !"); + + for (i=1;i<=numberOfFields;i++) { - if ( numberOfComponents <= 0 ) - if (err != MED_VALID) - throw MED_EXCEPTION(LOCALIZED(STRING(LOC) << "Be careful there is no compound for field n°" << i << "in file |"<<_fileName<<"| !")); + numberOfComponents = MEDnChamp(_medIdt,i) ; + if ( numberOfComponents <= 0 ) + if (err != MED_VALID) + throw MED_EXCEPTION ( LOCALIZED( STRING(LOC) << "Be careful there is no compound for field n°" + << i << "in file |"<<_fileName<<"| !")); + + componentName = new char[numberOfComponents*MED_TAILLE_PNOM+1] ; + unitName = new char[numberOfComponents*MED_TAILLE_PNOM+1] ; + + err = MEDchampInfo(_medIdt, i, fieldName, &type, componentName, + unitName, numberOfComponents) ; - componentName = new char[numberOfComponents*MED_TAILLE_PNOM+1] ; - unitName = new char[numberOfComponents*MED_TAILLE_PNOM+1] ; + if (err != MED_VALID) + throw MED_EXCEPTION ( LOCALIZED( STRING(LOC) + << ": can't get information about the field n°" + << i <<" of the file |" << _fileName << "| !")); - err = MEDchampInfo(_medIdt, i, fieldName, &type, componentName, - unitName, numberOfComponents) ; - - if (err != MED_VALID) - throw MED_EXCEPTION(LOCALIZED(STRING(LOC) << ": can't get information about the field n°" << i <<" of the file |" << _fileName << "| !")); - - MESSAGE(LOC << "Field n°"< MED_VALID ) - break ; - // There are value for some med_geometrie_element of this - // med_entite_maillage. - } - if (numberOfTimeSteps>0) // we have at least one + MESSAGE(LOC << "Field n°"< MED_VALID ) + break ; // There are value for some med_geometrie_element of this med_entite_maillage. + } + if (numberOfTimeSteps>0) // we have at least one - for (currentGeometry = (*currentEntity).second.begin(); - currentGeometry != (*currentEntity).second.end(); - currentGeometry++) - { - MESSAGE("Field information 3 : Geom : "<<(*currentGeometry)); - - for (j=1;j <= numberOfTimeSteps; j++) - { - MESSAGE("Field information 4 : time step j = "<100) + NbOfGaussPts=1 ; + if (timeStepNumber<0) + timeStepNumber=-1 ; - map::iterator _meshesIt = - _meshes.find(meshName); - if ( _meshesIt == _meshes.end() ) { - MESSAGE(LOC << "There is no mesh |" << meshName << - "| in the file |" << _fileName << - "|, but |" << meshName << - "| is referenced by field |" << - fieldName <<"|, entity : |" << - entNames [ (MED_FR::med_entite_maillage) - (*currentEntity).first] << - "|, geometric element of type |" << - geoNames [ (MED_FR::med_geometrie_element) - (*currentGeometry)] <<"|"); - } - // POURQUOI SI JE NE MET PAS DE BLOCK J'AI UN PARSE - // ERROR : PG : c'est la macro MESSAGE qui fait ca ! - else - ptrMesh = _meshes[meshName]; - - ptrSupport = _support[meshName][(MED_FR::med_entite_maillage) (*currentEntity).first]; - if (NbOfGaussPts != 1) - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Number of Gauss Point must be equal to 1 for instance")) ; - - // init to null to prevent some error if not - // correctly allocated ! - - ptrField = (FIELD_*)NULL ; - ptrDriver = (GENDRIVER*)NULL ; - - switch ( type) { - case MED_FR::MED_INT64 : - if ( sizeof(MED_FR::med_int) != 8 ) - throw MED_EXCEPTION(LOCALIZED(STRING(LOC) <<" The Field type of |" << fieldName <<"|, entity : |" << entNames [(MED_FR::med_entite_maillage) (*currentEntity).first] <<"|, geometric element of type |" << geoNames [(MED_FR::med_geometrie_element) (*currentGeometry) ] << "| is MED_INT64 but size of med_int is not equal to 8 bytes !")); - break; - case MED_FR::MED_INT32 : { - // throw MED_EXCEPTION(LOCALIZED(STRING(LOC) << - // "NOT IMPLEMENTED : BUG IN STL !") - //) ; - // ptrField = new FIELD (ptrSupport,numberOfComponents); - // Les valeurs du champ ne doivent pas être lue - // pour l'instant - - ptrField = new FIELD ( ); - // Les valeurs du champ ne doivent pas être lue - // pour l'instant - ((FIELD*) - ptrField)->setSupport(ptrSupport); - ((FIELD*) - ptrField)->setNumberOfComponents(numberOfComponents); - ((FIELD*) - ptrField)->setName(fieldName) ; - //provisoire, pour debug - MESSAGE("#### SET NAME in FIELD : "<V2_2 - case MED_EN::MED_LECTURE: - ptrDriver = new - MED_FIELD_RDONLY_DRIVER - (_fileName, (FIELD *) - ptrField); - break ; - // case MED_EN::MED_REMP: V2_1->V2_2 - case MED_EN::MED_LECTURE_ECRITURE: - ptrDriver = new - MED_FIELD_RDWR_DRIVER - (_fileName, (FIELD *) - ptrField); - break ; - // case MED_EN::MED_ECRI: - // should never append !! V2_1->V2_2 - case MED_EN::MED_LECTURE_AJOUT: - // should never append !! - // ptrDriver = new - // MED_FIELD_RDONLY_DRIVER - // (_fileName, (FIELD *) - // ptrField); - ptrDriver = new - MED_FIELD_WRONLY_DRIVER - (_fileName, (FIELD *) - ptrField); - break; - case MED_EN::MED_CREATION: // V2_1->V2_2 - ptrDriver = new - MED_FIELD_WRONLY_DRIVER - (_fileName, (FIELD *) - ptrField); - break; - default: - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) << "Bad file mode access !")); - } - break; - } - case MED_EN::MED_REEL64 : { - // ptrField = new FIELD - // (ptrSupport,numberOfComponents ); - // Les valeurs du champ ne doivent pas être lue - // pour l'instant - ptrField = new FIELD ( ); - // Les valeurs du champ ne doivent pas être lue - // pour l'instant - ((FIELD*) - ptrField)->setSupport(ptrSupport); - ((FIELD*) - ptrField)->setNumberOfComponents(numberOfComponents); - ((FIELD*) - ptrField)->setName(fieldName) ; - //provisoire, pour debug - MESSAGE("#### SET NAME in FIELD : "<V2_2 - case MED_EN::MED_LECTURE: - ptrDriver = new - MED_FIELD_RDONLY_DRIVER - (_fileName, (FIELD *) - ptrField); - break ; - // case MED_EN::MED_REMP: V2_1->V2_2 - case MED_EN::MED_LECTURE_ECRITURE: - ptrDriver = new - MED_FIELD_RDWR_DRIVER - (_fileName, (FIELD *) - ptrField); - break ; - // case MED_EN::MED_ECRI: - // should never append !! V2_1->V2_2 - case MED_EN::MED_LECTURE_AJOUT: - // should never append !! - // ptrDriver = new - // MED_FIELD_RDONLY_DRIVER - // (_fileName, (FIELD *) - // ptrField); - ptrDriver = new - MED_FIELD_WRONLY_DRIVER - (_fileName, (FIELD *) - ptrField); - break; - case MED_EN::MED_CREATION: - // should never append !! - ptrDriver = new - MED_FIELD_WRONLY_DRIVER - (_fileName, (FIELD *) - ptrField); - break; - default: - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) << "Bad file mode access !")); - } - break; - } - default : { - if ( numberOfTimeSteps > 1) - throw MED_EXCEPTION(LOCALIZED(STRING(LOC) << " The Field type of |" << fieldName <<"|, entity : |" << entNames [(MED_FR::med_entite_maillage) (*currentEntity).first] <<"|, geometric element of type |" << geoNames [(MED_FR::med_geometrie_element) (*currentGeometry)] <<"| is neither MED_INT, MED_INT32, MED_INT64 nor MED_REEL64 !")); - break ; - } - } - ptrField->setValueType((MED_EN::med_type_champ) - type) ; - // need to write field ! - MESSAGE("timeStepNumber :"<setIterationNumber ( timeStepNumber); - // A ajouter dans la classe FIELD - ptrField->setOrderNumber ( orderNumber); - ptrField->setTime ( timeStep); + // ATTENTION TRAITER L'EXCEPTION !!!!!!!!!!!! + + // Il faudra traiter le cas d'un champ qui utilise +sieurs (entity,geom) voir le travail de patrick + // Il faudra traiter le cas des profils... + // ptrField = new FIELD(); + // _ptrDriver = new MED_FIELD_RDWR_DRIVER(_fileName, ptrField); + // ptrField->addDriver(_ptrDriver); + // _fields[fieldName]=ptrField; + + // Verify meshName is already known - // Create a driver for this (field n°dt,n°it) - ptrDriver->setId ( getId() ); - MESSAGE("###### ptrDriver->setFieldName : #"<< - fieldName<<"#"); - ptrDriver->setFieldName(fieldName); - ptrField->addDriver(*ptrDriver); - // driver is duplicated : remove it - delete ptrDriver; - - DT_IT_ dtIt; - dtIt.dt = timeStepNumber; - dtIt.it = orderNumber; + map::iterator _meshesIt = _meshes.find(meshName); + if ( _meshesIt == _meshes.end() ) { + MESSAGE(LOC << "There is no mesh |" + << meshName <<"| in the file |" + << _fileName <<"|, but |" << meshName <<"| is referenced by field |" + << fieldName <<"|, entity : |" + << entNames [ (MED_FR::med_entite_maillage) (*currentEntity).first] <<"|, geometric element of type |" + << geoNames [ (MED_FR::med_geometrie_element) (*currentGeometry)] <<"|" + ); + } // POURQUOI SI JE NE MET PAS DE BLOCK J'AI UN PARSE ERROR : PG : c'est la macro MESSAGE qui fait ca ! + else + ptrMesh = _meshes[meshName]; - (_fields [fieldName])[dtIt] = ptrField; - _meshName[ptrField ] = meshName; - } - } + ptrSupport = _support[meshName][(MED_FR::med_entite_maillage) (*currentEntity).first]; + if (NbOfGaussPts != 1) + throw MEDEXCEPTION(LOCALIZED( STRING(LOC) <<"Number of Gauss Point must be equal to 1 for instance")) ; + + // init to null to prevent some error if not correctly allocated ! + ptrField = (FIELD_*)NULL ; + ptrDriver = (GENDRIVER*)NULL ; + + switch ( type) { + case MED_FR::MED_INT64 : + if ( sizeof(MED_FR::med_int) != 8 ) + throw MED_EXCEPTION ( LOCALIZED( STRING(LOC) << + " The Field type of |" + << fieldName <<"|, entity : |" + << entNames [(MED_FR::med_entite_maillage) (*currentEntity).first] <<"|, geometric element of type |" + << geoNames [(MED_FR::med_geometrie_element) (*currentGeometry) ] << + "| is MED_INT64 but size of med_int is not equal to 8 bytes !" + ) + ); + break; + case MED_FR::MED_INT32 : { +// throw MED_EXCEPTION ( LOCALIZED( STRING(LOC) << +// "NOT IMPLEMENTED : BUG IN STL !") +// ) ; + // ptrField = new FIELD ( ptrSupport,numberOfComponents ); // Les valeurs du champ ne doivent pas être lue pour l'instant + + ptrField = new FIELD ( ); // Les valeurs du champ ne doivent pas être lue pour l'instant + ((FIELD*) ptrField)->setSupport(ptrSupport); + ((FIELD*) ptrField)->setNumberOfComponents(numberOfComponents); + ((FIELD*) ptrField)->setName(fieldName) ; //provisoire, pour debug + MESSAGE("#### SET NAME in FIELD : "<(_fileName, (FIELD *)ptrField); + break ; + case MED_EN::MED_REMP: + ptrDriver = new MED_FIELD_RDWR_DRIVER(_fileName, (FIELD *)ptrField); + break ; + case MED_EN::MED_ECRI: // should never append !! + ptrDriver = new MED_FIELD_RDONLY_DRIVER(_fileName, (FIELD *)ptrField); + break; + default: + throw MEDEXCEPTION(LOCALIZED(STRING(LOC) << "Bad file mode access !")); + } + break; + } + case MED_FR::MED_REEL64 : { + // ptrField = new FIELD ( ptrSupport,numberOfComponents ); // Les valeurs du champ ne doivent pas être lue pour l'instant + ptrField = new FIELD ( ); // Les valeurs du champ ne doivent pas être lue pour l'instant + ((FIELD*) ptrField)->setSupport(ptrSupport); + ((FIELD*) ptrField)->setNumberOfComponents(numberOfComponents); + ((FIELD*) ptrField)->setName(fieldName) ; //provisoire, pour debug + MESSAGE("#### SET NAME in FIELD : "<(_fileName, (FIELD *)ptrField); + break ; + case MED_EN::MED_REMP: + ptrDriver = new MED_FIELD_RDWR_DRIVER(_fileName, (FIELD *)ptrField); + break ; + case MED_EN::MED_ECRI: // should never append !! + ptrDriver = new MED_FIELD_RDONLY_DRIVER(_fileName, (FIELD *)ptrField); + break; + default: + throw MEDEXCEPTION(LOCALIZED(STRING(LOC) << "Bad file mode access !")); + } + break; + } + default : { + if ( numberOfTimeSteps > 1) + throw MED_EXCEPTION ( LOCALIZED( STRING(LOC) << + " The Field type of |" + << fieldName <<"|, entity : |" + << entNames [(MED_FR::med_entite_maillage) (*currentEntity).first] + <<"|, geometric element of type |" + << geoNames [(MED_FR::med_geometrie_element) (*currentGeometry)] + <<"| is neither MED_INT, MED_INT32, MED_INT64 nor MED_REEL64 !" + ) + ); + break ; } + } + ptrField->setValueType((MED_EN::med_type_champ) type) ; // need to write field ! + + MESSAGE("timeStepNumber :"<setIterationNumber ( timeStepNumber); // A ajouter dans la classe FIELD + ptrField->setOrderNumber ( orderNumber); + ptrField->setTime ( timeStep); + + // Create a driver for this (field n°dt,n°it) + ptrDriver->setId ( getId() ); + MESSAGE("###### ptrDriver->setFieldName : #"<setFieldName(fieldName); + ptrField->addDriver(*ptrDriver); + // driver is duplicated : remove it + delete ptrDriver; + + DT_IT_ dtIt; + dtIt.dt = timeStepNumber; + dtIt.it = orderNumber; + + (_fields [fieldName])[dtIt] = ptrField; + _meshName[ptrField ] = meshName; + } + } } - delete[] componentName ; - delete[] unitName ; } + delete[] componentName ; + delete[] unitName ; + } } // read profil count and their names diff --git a/src/MEDMEM/MEDMEM_MedMeshDriver.cxx b/src/MEDMEM/MEDMEM_MedMeshDriver.cxx index 5ab0ffca7..021f9afa8 100644 --- a/src/MEDMEM/MEDMEM_MedMeshDriver.cxx +++ b/src/MEDMEM/MEDMEM_MedMeshDriver.cxx @@ -53,7 +53,6 @@ MED_MESH_DRIVER::~MED_MESH_DRIVER() } void MED_MESH_DRIVER::open() - throw (MEDEXCEPTION) { const char * LOC = "MED_MESH_DRIVER::open()" ; BEGIN_OF(LOC); @@ -72,14 +71,15 @@ void MED_MESH_DRIVER::open() } void MED_MESH_DRIVER::close() - throw (MEDEXCEPTION) { const char * LOC = "MED_MESH_DRIVER::close() " ; BEGIN_OF(LOC); int err = 0; if ( _status == MED_OPENED) { err=MED_FR::MEDfermer(_medIdt); - H5close(); // If we call H5close() all the files are closed. + // san -- MED5873 : Calling H5close() here leads to failure of SALOMEDS::StudyManager_i::_SaveAs() + // method during study saving process. MEDfermer() seems sufficient for closing a file. + //H5close(); // If we call H5close() all the files are closed. if (err != 0) throw MEDEXCEPTION( LOCALIZED(STRING(LOC) <<" Error when closing file !" @@ -137,7 +137,6 @@ GENDRIVER * MED_MESH_RDONLY_DRIVER::copy(void) const } void MED_MESH_RDONLY_DRIVER::read(void) - throw (MEDEXCEPTION) { const char * LOC = "MED_MESH_RDONLY_DRIVER::read() : " ; BEGIN_OF(LOC); @@ -219,169 +218,170 @@ void MED_MESH_RDONLY_DRIVER::getGRID() GRID * ptrGrid = (GRID *) _ptrMesh; - SCRUTE(ptrGrid); - int err, i; - // Read the dimension of the mesh <_meshName> - int MeshDimension = MED_FR::MEDdimLire(_medIdt, const_cast - (_meshName.c_str())) ; - - if (MeshDimension == MED_INVALID) - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) << "The mesh dimension |" << - MeshDimension << "| seems to be incorrect " << - "for the mesh : |" << _meshName << "|")) ; - - _ptrMesh->_meshDimension = MeshDimension; - - // Read or get the dimension of the space for the mesh <_meshName> - int SpaceDimension = MeshDimension; - - int SpaceDimensionRead = MED_FR::MEDdimEspaceLire(_medIdt, - const_cast - (_meshName.c_str())) ; - - if (SpaceDimensionRead != MED_INVALID) SpaceDimension = SpaceDimensionRead; - + // Read the dimension of the space for the mesh <_meshName> + int SpaceDimension = MED_FR::MEDdimLire(_medIdt,const_cast (_meshName.c_str())) ; + if ( SpaceDimension <= MED_VALID ) + throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"The space dimension |" << SpaceDimension << + "| seems to be incorrect " << "for the mesh : |" << + _meshName << "|")) ; _ptrMesh->_spaceDimension = SpaceDimension; - MED_FR::med_repere rep ; - string tmp_nom_coord (MED_TAILLE_PNOM*(_ptrMesh->_spaceDimension)+1,' '); - string tmp_unit_coord(MED_TAILLE_PNOM*(_ptrMesh->_spaceDimension)+1,' '); - char * tmp_nom = (const_cast ( tmp_nom_coord.c_str()) ) ; - char * tmp_unit= (const_cast ( tmp_unit_coord.c_str()) ) ; - // Read Array length int * ArrayLen[] = { & ptrGrid->_iArrayLength, & ptrGrid->_jArrayLength, & ptrGrid->_kArrayLength }; + int idim; + for (idim = 0; idim < _ptrMesh->_spaceDimension; ++idim) + { + int lenght = MED_FR::MEDnGrid(_medIdt, + const_cast (_ptrMesh->_name.c_str()), + (MED_FR::med_grid) + idim + ); + if ( lenght <= MED_VALID ) + throw MEDEXCEPTION(STRING(LOC) <<"The number of nodes |" << lenght << + "| seems to be incorrect " + << "for the mesh : |" << _meshName << "|" ) ; + + ArrayLen [idim][0] = lenght; + } - med_type_grille gridType = ptrGrid->getGridType(); + MED_FR::med_repere rep ; + string tmp_nom_coord (MED_TAILLE_PNOM*(_ptrMesh->_spaceDimension)+1,' '); + string tmp_unit_coord(MED_TAILLE_PNOM*(_ptrMesh->_spaceDimension)+1,' '); + char * tmp_nom = (const_cast ( tmp_nom_coord.c_str()) ) ; + char * tmp_unit= (const_cast ( tmp_unit_coord.c_str()) ) ; + + // Read node coordinates for MED_BODY_FITTED grid - int NumberOfNodes; + SCRUTE(ptrGrid->getGridType()); - if (gridType == MED_EN::MED_GRILLE_STANDARD) + if (ptrGrid->getGridType() == MED_EN::MED_BODY_FITTED) { - NumberOfNodes = MED_FR::MEDnEntMaa(_medIdt, - const_cast - (_ptrMesh->_name.c_str()), - MED_FR::MED_COOR,MED_FR::MED_NOEUD, - MED_FR::MED_NONE,MED_FR::MED_NOD); - + // Read nb of nodes + int NumberOfNodes = MED_FR::MEDnGrid(_medIdt, + const_cast (_meshName.c_str()), + MED_FR::MED_GRID_NOEUD); if ( NumberOfNodes <= MED_VALID ) - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"The number of nodes |" << - NumberOfNodes << + throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"The number of nodes |" << NumberOfNodes << "| seems to be incorrect " - << "for the mesh : |" << - _meshName << "|" )) ; - + << "for the mesh : |" << _meshName << "|" )) ; _ptrMesh->_numberOfNodes = NumberOfNodes ; - // create coordinates and its structure + // this array is useless because families numbers are read in getFAMILY + int * MEDArrayNodeFamily = new int[ NumberOfNodes ]; + // create coordinates _ptrMesh->_coordinate = new COORDINATE(SpaceDimension,NumberOfNodes, MED_EN::MED_FULL_INTERLACE); - int * structure = new int[MeshDimension]; + // Read coordinates and families +// double * coo = const_cast +// (_ptrMesh->_coordinate->getCoordinates(MED_EN::MED_FULL_INTERLACE)); + +// err = MED_FR::MEDbodyFittedLire (_medIdt, +// const_cast (_ptrMesh->_name.c_str()), +// _ptrMesh->_spaceDimension, +// coo, +// MED_FR::MED_FULL_INTERLACE, +// & rep, +// tmp_nom, +// tmp_unit, +// MEDArrayNodeFamily, +// NumberOfNodes); + + err = MED_FR::MEDbodyFittedLire (_medIdt, + const_cast (_ptrMesh->_name.c_str()), + _ptrMesh->_spaceDimension, + const_cast ( _ptrMesh->_coordinate->_coordinate.get(MED_EN::MED_FULL_INTERLACE) ), + MED_FR::MED_FULL_INTERLACE, + & rep, + tmp_nom, + tmp_unit, + MEDArrayNodeFamily, + NumberOfNodes); + + MESSAGE(LOC << " NumberOfNodes = " << NumberOfNodes << " SpaceDimension = " << SpaceDimension); + + ptrGrid->_is_coordinates_filled = true; - err = MED_FR::MEDstructureCoordLire(_medIdt, - const_cast - (_ptrMesh->_name.c_str()), - MeshDimension,structure); +// for (int icoor = 0 ; icoor (_ptrMesh->_name.c_str()), - _ptrMesh->_spaceDimension, - //const_cast ( _ptrMesh->_coordinate->_coordinate->get(MED_EN::MED_FULL_INTERLACE) ), - const_cast ( _ptrMesh->_coordinate->_coordinate.get(MED_EN::MED_FULL_INTERLACE) ), - MED_FR::MED_FULL_INTERLACE, - MED_ALL, // we read all the coordinates - NULL, // we don't use a profile - 0, // so the profile's size is 0 - &rep,tmp_nom,tmp_unit); + throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"error in MEDbodyFittedLire()")); - if (err != MED_VALID) - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Can't read coordinates of the |" << - NumberOfNodes << "| nodes for the mesh : |" << - _meshName << "| of space dimension |" << - SpaceDimension << "| with units names |" << - tmp_nom << "| and units |" << - tmp_unit << " |")) ; + // _ptrMesh->_MEDArrayNodeFamily = fam ; - ptrGrid->_is_coordinates_filled = true; } - else if ((gridType == MED_EN::MED_GRILLE_CARTESIENNE) || - (gridType == MED_EN::MED_GRILLE_POLAIRE)) + else { - NumberOfNodes = 1; + // Read Arrays and Node families in Cartesian or Polar Grid + int nbNodes = 1; double * Array[] = { (double*) 0, (double*) 0, (double*) 0 }; - - for (int idim = 0; idim < _ptrMesh->_meshDimension; ++idim) + for (idim = 0; idim < _ptrMesh->_spaceDimension; ++idim) { - MED_FR::med_table table; - if (idim == 0) table = MED_FR::MED_COOR_IND1; - else if (idim == 1) table = MED_FR::MED_COOR_IND2; - else if (idim == 2) table = MED_FR::MED_COOR_IND3; - - int length = MED_FR::MEDnEntMaa(_medIdt, - const_cast (_ptrMesh->_name.c_str()), - table,MED_FR::MED_NOEUD, - MED_FR::MED_NONE, - MED_FR::MED_NOD); - if ( length <= MED_VALID ) - throw MEDEXCEPTION(STRING(LOC) <<"The number of nodes |" << length << - "| seems to be incorrect " - << "for the mesh : |" << _meshName << "|" ) ; - - ArrayLen [idim][0] = length; - NumberOfNodes *= length; - - Array [idim] = new double [ length ]; - - err = MED_FR::MEDindicesCoordLire(_medIdt, const_cast - (_ptrMesh->_name.c_str()), - _ptrMesh->_meshDimension, - Array [idim], length, (idim+1), - tmp_nom+(idim*MED_TAILLE_PNOM), - tmp_unit+(idim*MED_TAILLE_PNOM)); - + int nbNodesDim = * ArrayLen [idim]; + nbNodes *= nbNodesDim; + Array [idim] = new double [ nbNodesDim ]; + err = MED_FR::MEDgridLire (_medIdt, + const_cast (_ptrMesh->_name.c_str()), + _ptrMesh->_spaceDimension, + Array [idim], + idim, + MED_FR::MED_FULL_INTERLACE, + & rep, + tmp_nom, + tmp_unit); if (err != MED_VALID) - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Error in reading coordinates indices " << - idim << "of the grid : |" << - _meshName << "|" )) ; - } + throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Error in MEDgridLire for dimention" << idim )); + } ptrGrid->_iArray = Array[0]; ptrGrid->_jArray = Array[1]; ptrGrid->_kArray = Array[2]; - - _ptrMesh->_numberOfNodes = NumberOfNodes ; + + _ptrMesh->_numberOfNodes = nbNodes ; // create coordinates - _ptrMesh->_coordinate = new COORDINATE(SpaceDimension,NumberOfNodes, + _ptrMesh->_coordinate = new COORDINATE(SpaceDimension,nbNodes, MED_EN::MED_FULL_INTERLACE); + // Read node families +// int nbFamNodes = MED_FR::MEDnGrid(_medIdt, +// const_cast (_ptrMesh->_name.c_str()), +// MED_FR::MED_FAM_NOEUD); +// if (nbFamNodes > 0) +// { +// // int * fam = new int[ nbFamNodes ]; + +// //_ptrMesh->_MEDArrayNodeFamily = new int[ nbFamNodes ]; +// // this array is useless because families numbers are read in getFAMILY +// int * MEDArrayNodeFamily = new int[ nbFamNodes ]; + +// err = MED_FR::MEDfamGridLire (_medIdt, +// const_cast (_ptrMesh->_name.c_str()), +// MEDArrayNodeFamily, +// nbFamNodes, +// MED_FR::MED_NOEUD); + +// if (err != MED_VALID) +// throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Can't read grid nodes families for " +// << idim << "-th dimention")); +// else +// _ptrMesh->_MEDArrayNodeFamily = fam; +// } - if (gridType == MED_EN::MED_GRILLE_CARTESIENNE) - rep = MED_FR::MED_CART; - else if (gridType == MED_EN::MED_GRILLE_POLAIRE) - rep = MED_FR::MED_CYL; - } - else - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<" bad grid type : " << gridType)); + } // end read Cartesian or Polar Grid // set coordinate names for (i=0; i<_ptrMesh->_spaceDimension; ++i ) { - string myStringName(tmp_nom,i*MED_TAILLE_PNOM,MED_TAILLE_PNOM) ; - string myStringUnit(tmp_unit,i*MED_TAILLE_PNOM,MED_TAILLE_PNOM) ; + string myStringName(tmp_nom_coord,i*MED_TAILLE_PNOM,MED_TAILLE_PNOM) ; + string myStringUnit(tmp_unit_coord,i*MED_TAILLE_PNOM,MED_TAILLE_PNOM) ; // suppress space at the end int j ; for(j=MED_TAILLE_PNOM-1;j>=0;j--) @@ -400,6 +400,7 @@ void MED_MESH_RDONLY_DRIVER::getGRID() _ptrMesh->_coordinate->setCoordinatesSystem(coordinateSystem); + END_OF(LOC); } @@ -410,36 +411,21 @@ void MED_MESH_RDONLY_DRIVER::getGRID() int MED_MESH_RDONLY_DRIVER::getCOORDINATE() { const char * LOC = "MED_MESH_RDONLY_DRIVER::getCOORDINATE() : " ; - BEGIN_OF(LOC); if (_status==MED_OPENED) { int err ; - // Read the dimension of the mesh <_meshName> - int MeshDimension = MED_FR::MEDdimLire(_medIdt, const_cast - (_meshName.c_str())) ; - - if ( MeshDimension == MED_INVALID ) - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) << "The mesh dimension |" << - MeshDimension << - "| seems to be incorrect " << - "for the mesh : |" << _meshName << "|")) ; - - _ptrMesh->_meshDimension = MeshDimension; - - // Read or get the dimension of the space for the mesh <_meshName> - int SpaceDimension = MeshDimension; - - int SpaceDimensionRead = MED_FR::MEDdimEspaceLire(_medIdt, - const_cast - (_meshName.c_str())) ; - - if (SpaceDimensionRead != MED_INVALID) - SpaceDimension = SpaceDimensionRead; + // Read the dimension of the space for the mesh <_meshName> + // to be able to create a COORDINATE object + int SpaceDimension = MED_FR::MEDdimLire(_medIdt,const_cast (_meshName.c_str())) ; + if ( SpaceDimension <= MED_VALID ) + throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"The space dimension |" << SpaceDimension << "| seems to be incorrect " + << "for the mesh : |" << _meshName << "|")) ; + _ptrMesh->_spaceDimension = SpaceDimension ; - _ptrMesh->_spaceDimension = SpaceDimension; + // Read the number of nodes used in the mesh <_meshName> // to be able to create a COORDINATE object @@ -454,6 +440,8 @@ int MED_MESH_RDONLY_DRIVER::getCOORDINATE() << "for the mesh : |" << _meshName << "|" )) ; _ptrMesh->_numberOfNodes = NumberOfNodes ; + + // create a COORDINATE object _ptrMesh->_coordinate = new COORDINATE(SpaceDimension, NumberOfNodes, MED_EN::MED_FULL_INTERLACE); @@ -483,8 +471,8 @@ int MED_MESH_RDONLY_DRIVER::getCOORDINATE() for (int i=0;i<_ptrMesh->_spaceDimension;i++) { - string myStringName(tmp_nom,i*MED_TAILLE_PNOM,MED_TAILLE_PNOM) ; - string myStringUnit(tmp_unit,i*MED_TAILLE_PNOM,MED_TAILLE_PNOM) ; + string myStringName(tmp_nom_coord,i*MED_TAILLE_PNOM,MED_TAILLE_PNOM) ; + string myStringUnit(tmp_unit_coord,i*MED_TAILLE_PNOM,MED_TAILLE_PNOM) ; // suppress space at the end int j ; for(j=MED_TAILLE_PNOM-1;j>=0;j--) @@ -495,7 +483,7 @@ int MED_MESH_RDONLY_DRIVER::getCOORDINATE() _ptrMesh->_coordinate->_coordinateUnit[i]=string(myStringUnit,0,j+1); } - // Pourquoi le stocker sous forme de chaîne ? + // Pourquoi le stocker sous forme de chaîne ? switch (rep) { case MED_FR::MED_CART : @@ -596,7 +584,7 @@ int MED_MESH_RDONLY_DRIVER::getCONNECTIVITY() throw MEDEXCEPTION(LOCALIZED(STRING(LOC) << "We could not read any Connectivity")) ; } - // _ptrMesh->_meshDimension = Connectivity->_entityDimension ; + _ptrMesh->_meshDimension = Connectivity->_entityDimension ; // At this point Connectivity->_typeConnectivity is either NODAL or DESCENDING // If both connectivities are found Connectivity->_typeConnectivity is NODAL @@ -611,7 +599,6 @@ int MED_MESH_RDONLY_DRIVER::getCONNECTIVITY() if(Connectivity->_constituent==NULL) { SCRUTE(_ptrMesh->_meshDimension); - SCRUTE(Connectivity->_entityDimension); if (_ptrMesh->_meshDimension == 3) { MESSAGE(LOC<<" ESSAI DE LECTURE DE LA CONNECTIVITE DES FACES..." ); CONNECTIVITY * ConnectivityFace = new CONNECTIVITY(MED_EN::MED_FACE) ; @@ -1202,117 +1189,85 @@ int MED_MESH_RDONLY_DRIVER::getFAMILY() const char * LOC = "MED_MESH_RDONLY_DRIVER::getFAMILY() : " ; BEGIN_OF(LOC); - if (_status==MED_OPENED) - { - int err = 0 ; - - int * MEDArrayNodeFamily = NULL ; - int ** MEDArrayCellFamily = NULL ; - int ** MEDArrayFaceFamily = NULL ; - int ** MEDArrayEdgeFamily = NULL ; - -// if ( !_ptrMesh->getIsAGrid() ) -// { - // read number : - // NODE : - MEDArrayNodeFamily = new int[_ptrMesh->getNumberOfNodes()] ; + if (_status==MED_OPENED) { + int err = 0 ; - err = getNodesFamiliesNumber(MEDArrayNodeFamily) ; - // error only if (_status!=MED_OPENED), other case exeception ! - // CELL + int * MEDArrayNodeFamily = NULL ; + int ** MEDArrayCellFamily = NULL ; + int ** MEDArrayFaceFamily = NULL ; + int ** MEDArrayEdgeFamily = NULL ; - MESSAGE(LOC << "error returned from getNodesFamiliesNumber " << err); + if ( !_ptrMesh->getIsAGrid() ) + { + // read number : + // NODE : + MEDArrayNodeFamily = new int[_ptrMesh->getNumberOfNodes()] ; + err = getNodesFamiliesNumber(MEDArrayNodeFamily) ; // error only if (_status!=MED_OPENED), other case exeception ! + // CELL - MEDArrayCellFamily = new (int*)[_ptrMesh->getNumberOfTypes(MED_CELL)] ; - // ET SI IL N'Y A PAS DE CELLS ? + MESSAGE(LOC << "error returned from getNodesFamiliesNumber " << err); - const medGeometryElement * myTypes = _ptrMesh->getTypes(MED_CELL); - for (int i=0;i<_ptrMesh->getNumberOfTypes(MED_CELL);i++) - MEDArrayCellFamily[i] = new - int[_ptrMesh->getNumberOfElements(MED_CELL,myTypes[i])] ; + MEDArrayCellFamily = new (int*)[_ptrMesh->getNumberOfTypes(MED_CELL)] ; // ET SI IL N'Y A PAS DE CELLS ? + const medGeometryElement * myTypes = _ptrMesh->getTypes(MED_CELL); + for (int i=0;i<_ptrMesh->getNumberOfTypes(MED_CELL);i++) + MEDArrayCellFamily[i] = new int[_ptrMesh->getNumberOfElements(MED_CELL,myTypes[i])] ; - err = getCellsFamiliesNumber(MEDArrayCellFamily, - _ptrMesh->_connectivity) ; + err = getCellsFamiliesNumber(MEDArrayCellFamily,_ptrMesh->_connectivity) ; - MESSAGE(LOC << "error returned from getCellsFamiliesNumber for Cells " << err); + MESSAGE(LOC << "error returned from getCellsFamiliesNumber for Cells " << err); - if (_ptrMesh->_connectivity->_constituent != NULL) - { - if (_ptrMesh->_connectivity->_constituent->_entity == MED_EN::MED_FACE) - { + if (_ptrMesh->_connectivity->_constituent != NULL) { + if (_ptrMesh->_connectivity->_constituent->_entity == MED_EN::MED_FACE) { // FACE - MEDArrayFaceFamily = new - (int*)[_ptrMesh->getNumberOfTypes(MED_FACE)] ; - + MEDArrayFaceFamily = new (int*)[_ptrMesh->getNumberOfTypes(MED_FACE)] ; myTypes = _ptrMesh->getTypes(MED_FACE); for (int i=0;i<_ptrMesh->getNumberOfTypes(MED_FACE);i++) - MEDArrayFaceFamily[i] = new - int[_ptrMesh->getNumberOfElements(MED_FACE,myTypes[i])] ; - - err = - getCellsFamiliesNumber(MEDArrayFaceFamily, - _ptrMesh->_connectivity->_constituent) ; + MEDArrayFaceFamily[i] = new int[_ptrMesh->getNumberOfElements(MED_FACE,myTypes[i])] ; + + err = getCellsFamiliesNumber(MEDArrayFaceFamily,_ptrMesh->_connectivity->_constituent) ; MESSAGE(LOC << "error returned from getCellsFamiliesNumber for Faces " << err); - } - else - { - // EDGE in 2D - MEDArrayEdgeFamily = new - (int*)[_ptrMesh->getNumberOfTypes(MED_EDGE)] ; + } else { + // EDGE in 2D + MEDArrayEdgeFamily = new (int*)[_ptrMesh->getNumberOfTypes(MED_EDGE)] ; myTypes = _ptrMesh->getTypes(MED_EDGE); for (int i=0;i<_ptrMesh->getNumberOfTypes(MED_EDGE);i++) - MEDArrayEdgeFamily[i] = new - int[_ptrMesh->getNumberOfElements(MED_EDGE,myTypes[i])] ; + MEDArrayEdgeFamily[i] = new int[_ptrMesh->getNumberOfElements(MED_EDGE,myTypes[i])] ; + err = getCellsFamiliesNumber(MEDArrayEdgeFamily,_ptrMesh->_connectivity->_constituent) ; - err = - getCellsFamiliesNumber(MEDArrayEdgeFamily, - _ptrMesh->_connectivity->_constituent) ; - MESSAGE(LOC << "error returned from getCellsFamiliesNumber for Edges in 2D " << err); - } - // EDGE in 3D - if (_ptrMesh->_connectivity->_constituent->_constituent != NULL) - { - MEDArrayEdgeFamily = new - (int*)[_ptrMesh->getNumberOfTypes(MED_EDGE)] ; + } + // EDGE in 3D + if (_ptrMesh->_connectivity->_constituent->_constituent != NULL) { + MEDArrayEdgeFamily = new (int*)[_ptrMesh->getNumberOfTypes(MED_EDGE)] ; myTypes = _ptrMesh->getTypes(MED_EDGE); for (int i=0;i<_ptrMesh->getNumberOfTypes(MED_EDGE);i++) - MEDArrayEdgeFamily[i] = new - int[_ptrMesh->getNumberOfElements(MED_EDGE,myTypes[i])] ; + MEDArrayEdgeFamily[i] = new int[_ptrMesh->getNumberOfElements(MED_EDGE,myTypes[i])] ; + err = getCellsFamiliesNumber(MEDArrayEdgeFamily,_ptrMesh->_connectivity->_constituent->_constituent) ; // we are in 3D ! - err = - getCellsFamiliesNumber(MEDArrayEdgeFamily, - _ptrMesh->_connectivity->_constituent->_constituent); - // we are in 3D ! - MESSAGE(LOC << "error returned from getCellsFamiliesNumber for Edges in 3D " << err); } + } + } + else + { + // node + int NumberOfNodes = _ptrMesh->getNumberOfNodes() ; + MEDArrayNodeFamily = new int[ NumberOfNodes ]; + err = MED_FR::MEDfamGridLire (_medIdt, + const_cast (_ptrMesh->_name.c_str()), + MEDArrayNodeFamily, + NumberOfNodes, + MED_FR::MED_NOEUD); + + // what about cell face and edge ? } -// } -// else -// { -// // node -// int NumberOfNodes = _ptrMesh->getNumberOfNodes() ; -// MEDArrayNodeFamily = new int[ NumberOfNodes ]; -// err = MED_FR::MEDfamGridLire (_medIdt, -// const_cast (_ptrMesh->_name.c_str()), -// MEDArrayNodeFamily, -// NumberOfNodes, -// MED_FR::MED_NOEUD); - -// // what about cell face and edge ? -// } // Creation of the families -// int NumberOfFamilies = MEDnFam(_medIdt,const_cast (_meshName.c_str()),0,MED_FR::MED_FAMILLE) ; - - int NumberOfFamilies = MED_FR::MEDnFam(_medIdt, const_cast - (_meshName.c_str())) ; - + int NumberOfFamilies = MEDnFam(_medIdt,const_cast (_meshName.c_str()),0,MED_FR::MED_FAMILLE) ; if ( NumberOfFamilies < 1 ) // at least family 0 must exist throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<"There is no FAMILY, FAMILY 0 must exists" )); @@ -1328,202 +1283,164 @@ int MED_MESH_RDONLY_DRIVER::getFAMILY() int numberOfFacesFamilies = 0 ; int numberOfEdgesFamilies = 0 ; - for (int i=0;i - // (_meshName.c_str()),i+1,MED_FR::MED_ATTR) ; - - int NumberOfAttributes = MED_FR::MEDnAttribut(_medIdt, - const_cast - (_meshName.c_str()), - (i+1)); - - if (NumberOfAttributes < 0) - throw MEDEXCEPTION("MED_MESH_RDONLY_DRIVER::getFAMILY() : NumberOfAttributes" ); + for (int i=0;i (_meshName.c_str()),i+1,MED_FR::MED_ATTR) ; + if (NumberOfAttributes < 0) + throw MEDEXCEPTION("MED_MESH_RDONLY_DRIVER::getFAMILY() : NumberOfAttributes" ); - // int NumberOfGroups = MEDnFam(_medIdt,const_cast - // (_meshName.c_str()),i+1,MED_FR::MED_GROUPE) ; - - int NumberOfGroups = MED_FR::MEDnGroupe(_medIdt, const_cast - (_meshName.c_str()),(i+1)) ; - - if (NumberOfGroups < 0) - throw MEDEXCEPTION("MED_MESH_RDONLY_DRIVER::getFAMILY() : NumberOfGroups" ); + int NumberOfGroups = MEDnFam(_medIdt,const_cast (_meshName.c_str()),i+1,MED_FR::MED_GROUPE) ; + if (NumberOfGroups < 0) + throw MEDEXCEPTION("MED_MESH_RDONLY_DRIVER::getFAMILY() : NumberOfGroups" ); - int FamilyIdentifier ; - string FamilyName(MED_TAILLE_NOM,'\0'); - int * AttributesIdentifier = new int[NumberOfAttributes] ; - int * AttributesValues = new int[NumberOfAttributes] ; - string AttributesDescription(MED_TAILLE_DESC*NumberOfAttributes,' ') ; - string GroupsNames(MED_TAILLE_LNOM*NumberOfGroups+1,'\0') ; - err = MED_FR::MEDfamInfo(_medIdt,const_cast - (_meshName.c_str()), - (i+1),const_cast - (FamilyName.c_str()), &FamilyIdentifier, - AttributesIdentifier,AttributesValues, - const_cast - (AttributesDescription.c_str()), - &NumberOfAttributes, const_cast - (GroupsNames.c_str()),&NumberOfGroups); - - - SCRUTE(GroupsNames); - SCRUTE(FamilyName); - SCRUTE(err); - SCRUTE(i); - - if (err != MED_VALID) - throw MEDEXCEPTION("MED_MESH_RDONLY_DRIVER::getFAMILY() : ERROR when get FAMILY informations" ); - - if (FamilyIdentifier != 0 ) - { - FAMILY * Family = new FAMILY(_ptrMesh,FamilyIdentifier,FamilyName, - NumberOfAttributes, - AttributesIdentifier, - AttributesValues, - AttributesDescription, - NumberOfGroups,GroupsNames, - MEDArrayNodeFamily, - MEDArrayCellFamily, - MEDArrayFaceFamily, - MEDArrayEdgeFamily) ; - - // All good ? - // if nothing found, delete Family - - - //MESSAGE(LOC << " Well is that OK now ?? " << (*Family)); - - if (Family->getNumberOfTypes() == 0) - { - MESSAGE(LOC<<"Nothing found for family "<getEntity()) - { - case MED_EN::MED_NODE : - NodeFamilyVector.push_back(Family) ; - numberOfNodesFamilies++ ; - break ; - case MED_EN::MED_CELL : - CellFamilyVector.push_back(Family) ; - numberOfCellsFamilies++ ; - break ; - case MED_EN::MED_FACE : - FaceFamilyVector.push_back(Family) ; - numberOfFacesFamilies++ ; - break ; - case MED_EN::MED_EDGE : - EdgeFamilyVector.push_back(Family) ; - numberOfEdgesFamilies++ ; - break ; - } - // MESSAGE(LOC << (*Family)); + int FamilyIdentifier ; + string FamilyName(MED_TAILLE_NOM,'\0 '); + int * AttributesIdentifier = new int[NumberOfAttributes] ; + int * AttributesValues = new int[NumberOfAttributes] ; + string AttributesDescription(MED_TAILLE_DESC*NumberOfAttributes,' ') ; + string GroupsNames(MED_TAILLE_LNOM*NumberOfGroups+1,'\0') ; + err = MED_FR::MEDfamInfo(_medIdt,const_cast (_meshName.c_str()), + i+1,const_cast (FamilyName.c_str()), + &FamilyIdentifier,AttributesIdentifier,AttributesValues, + const_cast (AttributesDescription.c_str()), + &NumberOfAttributes, + const_cast (GroupsNames.c_str()),&NumberOfGroups + ); + + + SCRUTE(GroupsNames); + SCRUTE(FamilyName); + SCRUTE(err); + SCRUTE(i); + + if (err != MED_VALID) + throw MEDEXCEPTION("MED_MESH_RDONLY_DRIVER::getFAMILY() : ERROR when get FAMILY informations" ); + if (FamilyIdentifier != 0 ) { + FAMILY * Family = new FAMILY(_ptrMesh,FamilyIdentifier,FamilyName, + NumberOfAttributes,AttributesIdentifier, + AttributesValues,AttributesDescription, + NumberOfGroups,GroupsNames, + MEDArrayNodeFamily, + MEDArrayCellFamily, + MEDArrayFaceFamily, + MEDArrayEdgeFamily + ) ; + // All good ? + // if nothing found, delete Family + + + //MESSAGE(LOC << " Well is that OK now ?? " << (*Family)); + + + + if (Family->getNumberOfTypes() == 0) { + MESSAGE(LOC<<"Nothing found for family "<getEntity()) { + case MED_EN::MED_NODE : + NodeFamilyVector.push_back(Family) ; + numberOfNodesFamilies++ ; + break ; + case MED_EN::MED_CELL : + CellFamilyVector.push_back(Family) ; + numberOfCellsFamilies++ ; + break ; + case MED_EN::MED_FACE : + FaceFamilyVector.push_back(Family) ; + numberOfFacesFamilies++ ; + break ; + case MED_EN::MED_EDGE : + EdgeFamilyVector.push_back(Family) ; + numberOfEdgesFamilies++ ; + break ; } - delete [] AttributesIdentifier ; - delete [] AttributesValues ; - } + // MESSAGE(LOC << (*Family)); - if (MEDArrayNodeFamily != NULL) - delete[] MEDArrayNodeFamily ; - if (MEDArrayCellFamily != NULL) - { - for (int i=0;i<_ptrMesh->getNumberOfTypes(MED_CELL);i++) - delete[] MEDArrayCellFamily[i] ; - delete[] MEDArrayCellFamily ; - } - if (MEDArrayFaceFamily != NULL) - { - for (int i=0;i<_ptrMesh->getNumberOfTypes(MED_FACE);i++) - delete[] MEDArrayFaceFamily[i] ; - delete[] MEDArrayFaceFamily ; - } - if (MEDArrayEdgeFamily != NULL) - { - for (int i=0;i<_ptrMesh->getNumberOfTypes(MED_EDGE);i++) - delete[] MEDArrayEdgeFamily[i] ; - delete[] MEDArrayEdgeFamily ; } - END_OF(LOC); - return MED_VALID ; + delete [] AttributesIdentifier ; + delete [] AttributesValues ; + } + + if (MEDArrayNodeFamily != NULL) + delete[] MEDArrayNodeFamily ; + if (MEDArrayCellFamily != NULL) { + for (int i=0;i<_ptrMesh->getNumberOfTypes(MED_CELL);i++) + delete[] MEDArrayCellFamily[i] ; + delete[] MEDArrayCellFamily ; + } + if (MEDArrayFaceFamily != NULL) { + for (int i=0;i<_ptrMesh->getNumberOfTypes(MED_FACE);i++) + delete[] MEDArrayFaceFamily[i] ; + delete[] MEDArrayFaceFamily ; + } + if (MEDArrayEdgeFamily != NULL) { + for (int i=0;i<_ptrMesh->getNumberOfTypes(MED_EDGE);i++) + delete[] MEDArrayEdgeFamily[i] ; + delete[] MEDArrayEdgeFamily ; } + END_OF(LOC); + return MED_VALID ; + } return MED_ERROR; } int MED_MESH_RDONLY_DRIVER::getNodesFamiliesNumber(int * MEDArrayNodeFamily) { const char * LOC = "MED_MESH_RDONLY_DRIVER::getNodesFamiliesNumber() : " ; - BEGIN_OF(LOC); - - if (_status==MED_OPENED) - { - int err = 0 ; - - err = MEDfamLire(_medIdt, const_cast - (_ptrMesh->_name.c_str()), MEDArrayNodeFamily, - _ptrMesh->getNumberOfNodes(), MED_FR::MED_NOEUD, - (enum MED_FR::med_geometrie_element) MED_NONE); - - if ( err != MED_VALID) - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) << "There is no family for the |"<< _ptrMesh->getNumberOfNodes() << "| nodes in mesh |" << _ptrMesh->_name.c_str() << "|")); - - END_OF(LOC); - return MED_VALID; + if (_status==MED_OPENED) { + int err = 0 ; + err = MEDfamLire(_medIdt,(const_cast (_ptrMesh->_name.c_str())), + MEDArrayNodeFamily, + _ptrMesh->getNumberOfNodes(), + MED_FR::MED_NOEUD,(enum MED_FR::med_geometrie_element) MED_NONE); + if ( err != MED_VALID) { + throw MEDEXCEPTION(LOCALIZED(STRING(LOC) << "There is no family for the |"<< _ptrMesh->getNumberOfNodes() + << "| nodes in mesh |" + << _ptrMesh->_name.c_str() << "|" )); } - + END_OF(LOC); + return MED_VALID; + } return MED_ERROR; } int MED_MESH_RDONLY_DRIVER::getCellsFamiliesNumber(int **MEDArrayFamily,CONNECTIVITY *Connectivity) { const char * LOC = "MED_MESH_RDONLY_DRIVER::getCellsFamiliesNumber " ; - BEGIN_OF(LOC); - if (_status==MED_OPENED) - { - int i, err = 0 ; - - SCRUTE(Connectivity->_numberOfTypes); - - for (i=0;i_numberOfTypes;i++) - { - int NumberOfCell = Connectivity->_count[i+1]-Connectivity->_count[i]; - - SCRUTE(NumberOfCell); - - err=MEDfamLire(_medIdt,const_cast (_ptrMesh->_name.c_str()), - MEDArrayFamily[i],NumberOfCell, - (MED_FR::med_entite_maillage) Connectivity->_entity, - (MED_FR::med_geometrie_element) - Connectivity->_geometricTypes[i]); + if (_status==MED_OPENED) { + int i, err = 0 ; + for (i=0;i_numberOfTypes;i++) { + int NumberOfCell = Connectivity->_count[i+1]-Connectivity->_count[i] ; + err=MEDfamLire(_medIdt,const_cast (_ptrMesh->_name.c_str()), + MEDArrayFamily[i],NumberOfCell, + (MED_FR::med_entite_maillage) Connectivity->_entity, + (MED_FR::med_geometrie_element) Connectivity->_geometricTypes[i]); + + // provisoire : si les faces ou les aretes sont des mailles !!! + if (err != MED_VALID) { + MESSAGE(LOC<<"search face/edge family on cell !!!"); + err=MEDfamLire(_medIdt,const_cast (_ptrMesh->_name.c_str()), + MEDArrayFamily[i],NumberOfCell, + MED_FR::MED_MAILLE, + (MED_FR::med_geometrie_element) Connectivity->_geometricTypes[i]); + } - // provisoire : si les faces ou les aretes sont des mailles !!! - if (err != MED_VALID) - { - MESSAGE(LOC<<"search face/edge family on cell !!!"); - err=MEDfamLire(_medIdt,const_cast - (_ptrMesh->_name.c_str()), - MEDArrayFamily[i],NumberOfCell, - MED_FR::MED_MAILLE, - (MED_FR::med_geometrie_element) - Connectivity->_geometricTypes[i]); - } - - if (err != MED_VALID) - throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" Family not found for entity "<_entity<<" and geometric type "<_geometricTypes[i])); - } - return MED_VALID; + if (err != MED_VALID) + throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" Family not found for entity "<_entity<<" and geometric type "<_geometricTypes[i])); + } + return MED_VALID; + } return MED_ERROR; } @@ -1582,7 +1499,6 @@ void MED_MESH_RDONLY_DRIVER::updateFamily() void MED_MESH_RDONLY_DRIVER::write( void ) const - throw (MEDEXCEPTION) { throw MEDEXCEPTION("MED_MESH_RDONLY_DRIVER::write : Can't write with a RDONLY driver !"); } @@ -1616,13 +1532,11 @@ GENDRIVER * MED_MESH_WRONLY_DRIVER::copy(void) const } void MED_MESH_WRONLY_DRIVER::read (void) - throw (MEDEXCEPTION) { throw MEDEXCEPTION("MED_MESH_WRONLY_DRIVER::read : Can't read with a WRONLY driver !"); } void MED_MESH_WRONLY_DRIVER::write(void) const - throw (MEDEXCEPTION) { const char * LOC = "void MED_MESH_WRONLY_DRIVER::write(void) const : "; BEGIN_OF(LOC); @@ -1722,37 +1636,26 @@ int MED_MESH_WRONLY_DRIVER::writeGRID() const // Test if the mesh <_meshName> already exists // If it doesn't exists create it - // If it already exists verify if its space and mesh dimensions are the same - // as <_ptrMesh->_spaceDimension>, <_ptrMesh->_meshDimension> respectively + // If it already exists verify if its dimension is the same as <_ptrMesh->_spaceDimension> // rem : <_meshName> is the driver meshName not _meshName> - - int spaceDimension = MED_FR::MEDdimEspaceLire(_medIdt, const_cast - (_meshName.c_str()) ); - - int meshDimension = MED_FR::MEDdimLire(_medIdt, const_cast - (_meshName.c_str()) ); - - if ((spaceDimension != MED_VALID) && (meshDimension != MED_VALID)) - { - err = MEDmaaCr(_medIdt, - const_cast (_meshName.c_str()), - _ptrMesh->_meshDimension,MED_FR::MED_STRUCTURE, - const_cast (_ptrMesh->_description.c_str())); - + int dim = MED_FR::MEDdimLire(_medIdt, const_cast (_meshName.c_str()) ); + if (dim < MED_VALID) + { + err = MEDgridCr(_medIdt, + const_cast (_meshName.c_str()), + _ptrMesh->_spaceDimension, + (MED_FR::med_grid_type) ptrGrid->getGridType()); if (err != MED_VALID) throw MEDEXCEPTION(LOCALIZED(STRING(LOC) << "Unable to create Grid")); else MESSAGE(LOC<<"Grid "<<_meshName<<" created in file "<<_fileName<<" !"); } - else if ((spaceDimension != _ptrMesh->_spaceDimension) && - (meshDimension != _ptrMesh->_meshDimension)) + else if (dim != _ptrMesh->_spaceDimension) throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Grid |" << _meshName.c_str() << "| already exists in file |" << _fileName << - "| with space dimension |" << spaceDimension << - "| and mesh dimension |" << meshDimension << - "| but the space dimension and the mesh dimension of the mesh we want to write are respectively |" - << _ptrMesh->_spaceDimension <<"|" << - _ptrMesh->_meshDimension <<"|" )) ; + "| with dimension |" << dim << + "| but the dimension of the mesh we want to write is |" + << _ptrMesh->_spaceDimension <<"|" )) ; // Recompose the <_spaceDimension> strings in 1 string int lengthString ; @@ -1767,7 +1670,7 @@ int MED_MESH_WRONLY_DRIVER::writeGRID() const tmp_unit.replace(i*MED_TAILLE_PNOM,i*MED_TAILLE_PNOM+lengthString,valueString,0,lengthString); } - // Pourquoi le stocker sous forme de chaîne ? + // Pourquoi le stocker sous forme de chaîne ? const string & coordinateSystem = _ptrMesh->_coordinate->_coordinateSystem; if (coordinateSystem == "CARTESIAN") rep = MED_FR::MED_CART; @@ -1785,76 +1688,70 @@ int MED_MESH_WRONLY_DRIVER::writeGRID() const ptrGrid->_jArrayLength, ptrGrid->_kArrayLength }; - med_type_grille gridType = ptrGrid->getGridType(); - // Write node coordinates for MED_BODY_FITTED grid - if (gridType == MED_EN::MED_GRILLE_STANDARD) - { - // Write Coordinates and families - double * coo = const_cast - (_ptrMesh->_coordinate->getCoordinates(MED_EN::MED_FULL_INTERLACE)); + if (ptrGrid->getGridType() == MED_EN::MED_BODY_FITTED) + { + + // Write Coordinates and families + double * coo = const_cast + (_ptrMesh->_coordinate->getCoordinates(MED_EN::MED_FULL_INTERLACE)); - int* structure = new int [meshDimension]; + // Write unused families + int * MEDArrayNodeFamily = new int[_ptrMesh->_numberOfNodes] ; + + err = MEDbodyFittedEcr (_medIdt, + const_cast (_ptrMesh->_name.c_str()), + _ptrMesh->_spaceDimension, + coo, + ArrayLen, + MED_FR::MED_FULL_INTERLACE, + rep, + const_cast (tmp_name.c_str()), + const_cast (tmp_unit.c_str()), + MEDArrayNodeFamily, + _ptrMesh->_numberOfNodes, + MED_FR::MED_REMP); + delete[] MEDArrayNodeFamily; - for (int idim = 0; idim < meshDimension; ++idim) - structure[idim] = ArrayLen [idim]; - + if (err != MED_VALID) + throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"error in MEDbodyFittedEcr()")); - err = MED_FR::MEDstructureCoordEcr(_medIdt, const_cast - (_meshName.c_str()), meshDimension, - structure); + } + else + { + // Write Arrays of Cartesian or Polar Grid + double * Array[] = { ptrGrid->_iArray, + ptrGrid->_jArray, + ptrGrid->_kArray }; + int idim; + for (idim = 0; idim < _ptrMesh->_spaceDimension; ++idim) + { + err = MEDgridEcr (_medIdt, + const_cast (_ptrMesh->_name.c_str()), + _ptrMesh->_spaceDimension, + Array [idim], + ArrayLen [idim], + idim, + MED_FR::MED_FULL_INTERLACE, + rep, + const_cast (tmp_name.c_str()), + const_cast (tmp_unit.c_str()), + MED_FR::MED_REMP); if (err != MED_VALID) - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"error in writing the structure of the grid |" << _meshName.c_str())); - - delete structure; - - err = MEDcoordEcr(_medIdt, const_cast (_meshName.c_str()), - _ptrMesh->_spaceDimension, - //const_cast ( _ptrMesh->_coordinate->_coordinate->get(MED_EN::MED_FULL_INTERLACE) ), - const_cast ( _ptrMesh->_coordinate->_coordinate.get(MED_EN::MED_FULL_INTERLACE) ), - MED_FR::MED_FULL_INTERLACE, _ptrMesh->_numberOfNodes, - // _ptrMesh->_coordinate->_numberOfNodes - rep, const_cast (tmp_name.c_str()), - const_cast (tmp_unit.c_str())); - - if (err != MED_VALID) - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Can't write coordinates of the grid |" << _meshName.c_str() << "| in file |" << _fileName - << "| with dimension |" << _ptrMesh->_spaceDimension <<"| and" - << " with units names |" << tmp_name - << "| and units |" << tmp_unit - << " |")) ; + throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Can't read grid coordinates for " + << idim << "-th dimention")); } - else if ((gridType == MED_EN::MED_GRILLE_CARTESIENNE) || - (gridType == MED_EN::MED_GRILLE_POLAIRE)) - { - // Write Arrays of Cartesian or Polar Grid - - double * Array[] = { ptrGrid->_iArray, - ptrGrid->_jArray, - ptrGrid->_kArray }; - for (int idim = 0; idim < _ptrMesh->_meshDimension; ++idim) - { - string str_name = string (tmp_name,idim*MED_TAILLE_PNOM, - MED_TAILLE_PNOM); - string str_unit = string (tmp_unit,idim*MED_TAILLE_PNOM, - MED_TAILLE_PNOM); - - err = MED_FR::MEDindicesCoordEcr(_medIdt, const_cast - (_ptrMesh->_name.c_str()), - _ptrMesh->_meshDimension, - Array[idim], ArrayLen[idim], - (idim+1), const_cast - (str_name.c_str()), - const_cast - (str_unit.c_str())); +// err = MEDfamGridEcr(_medIdt, +// const_cast (_ptrMesh->_name.c_str()), +// _ptrMesh->_MEDArrayNodeFamily, +// _ptrMesh->_numberOfNodes, +// MED_FR::MED_REMP, +// MED_FR::MED_NOEUD); + if (err != MED_VALID) + throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"error in MEDfamGridEcr()")); - if (err != MED_VALID) - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) << - "Can't write grid coordinates for " << - idim << "-th dimention")); - } } // end Write Cartesian or Polar Grid END_OF(LOC); @@ -1890,38 +1787,22 @@ int MED_MESH_WRONLY_DRIVER::writeCoordinates() const { // Test if the mesh <_meshName> already exists // If it doesn't exists create it - // If it already exists verify if its space and mesh dimensions are the same - // as <_ptrMesh->_spaceDimension>, <_ptrMesh->_meshDimension> respectively + // If it already exists verify if its dimension is the same as <_ptrMesh->_spaceDimension> // rem : <_meshName> is the driver meshName not _meshName> - - int spaceDimension = MED_FR::MEDdimEspaceLire(_medIdt, const_cast - (_meshName.c_str())); - - int meshDimension = MED_FR::MEDdimLire(_medIdt, const_cast - (_meshName.c_str()) ); - - if ((spaceDimension != MED_VALID) && (meshDimension != MED_VALID)) - { - err = MEDmaaCr(_medIdt, const_cast (_meshName.c_str()), - _ptrMesh->_meshDimension, MED_FR::MED_NON_STRUCTURE, - const_cast (_ptrMesh->_description.c_str())); - - if (err != MED_VALID) - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) << "Unable to create Mesh : |" << _meshName << "|")); - else + int dim = MED_FR::MEDdimLire(_medIdt, const_cast (_meshName.c_str()) ); + if (dim < MED_VALID) + if (MED_FR::MEDmaaCr(_medIdt,const_cast (_meshName.c_str()),_ptrMesh->_spaceDimension) != 0 ) + throw MEDEXCEPTION(LOCALIZED(STRING(LOC) << "Unable to create Mesh : |" << _meshName << "|")); + else + { MESSAGE(LOC<<"Mesh "<<_meshName<<" created in file "<<_fileName<<" !"); - } - else if ((spaceDimension != _ptrMesh->_spaceDimension) && - (meshDimension != _ptrMesh->_meshDimension)) - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Mesh |" << _meshName.c_str() << - "| already exists in file |" << _fileName << - "| with space dimension |" << spaceDimension << - "| and mesh dimension |" << meshDimension << - "| but the space dimension and the mesh dimension of the mesh we want to write are respectively |" - << _ptrMesh->_spaceDimension <<"|" << - _ptrMesh->_meshDimension << "|")) ; + } + else if (dim != _ptrMesh->_spaceDimension) + throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Mesh |" << _meshName.c_str() << "| already exists in file |" << _fileName + << "| with dimension |" << dim << "| but the dimension of the mesh we want to write is |" + << _ptrMesh->_spaceDimension <<"|" )) ; - // Pourquoi le stocker sous forme de chaîne ? + // Pourquoi le stocker sous forme de chaîne ? const string & coordinateSystem = _ptrMesh->_coordinate->_coordinateSystem; if (coordinateSystem == "CARTESIAN") rep = MED_FR::MED_CART; @@ -1934,26 +1815,17 @@ int MED_MESH_WRONLY_DRIVER::writeCoordinates() const { << _ptrMesh->_coordinate->_coordinateSystem << "|" )) ; -// err = MEDcoordEcr(_medIdt, const_cast (_meshName.c_str()), -// _ptrMesh->_spaceDimension, -// //const_cast ( _ptrMesh->_coordinate->_coordinate->get(MED_EN::MED_FULL_INTERLACE) ), -// const_cast ( _ptrMesh->_coordinate->_coordinate.get(MED_EN::MED_FULL_INTERLACE) ), -// MED_FR::MED_FULL_INTERLACE, -// _ptrMesh->_numberOfNodes, // _ptrMesh->_coordinate->_numberOfNodes -// MED_FR::MED_LECTURE_ECRITURE, -// rep, -// const_cast (tmp_name.c_str()), -// const_cast (tmp_unit.c_str()) -// ); - err = MEDcoordEcr(_medIdt, const_cast (_meshName.c_str()), _ptrMesh->_spaceDimension, //const_cast ( _ptrMesh->_coordinate->_coordinate->get(MED_EN::MED_FULL_INTERLACE) ), const_cast ( _ptrMesh->_coordinate->_coordinate.get(MED_EN::MED_FULL_INTERLACE) ), - MED_FR::MED_FULL_INTERLACE, _ptrMesh->_numberOfNodes, - // _ptrMesh->_coordinate->_numberOfNodes - rep, const_cast (tmp_name.c_str()), - const_cast (tmp_unit.c_str())); + MED_FR::MED_FULL_INTERLACE, + _ptrMesh->_numberOfNodes, // _ptrMesh->_coordinate->_numberOfNodes + MED_FR::MED_REMP, + rep, + const_cast (tmp_name.c_str()), + const_cast (tmp_unit.c_str()) + ); if (err<0) throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Can't write coordinates of mesh |" << _meshName.c_str() << "| in file |" << _fileName @@ -1973,15 +1845,15 @@ int MED_MESH_WRONLY_DRIVER::writeCoordinates() const { if (_ptrMesh->_arePresentOptionnalNodesNumbers==1) { - err = MEDnumEcr(_medIdt, const_cast (_meshName.c_str()), + err = MEDnumEcr(_medIdt,const_cast (_meshName.c_str()), const_cast (_ptrMesh->_coordinate->getNodesNumbers() ), - _ptrMesh->_numberOfNodes, MED_FR::MED_NOEUD, - MED_FR::med_geometrie_element(0) ); + _ptrMesh->_numberOfNodes, MED_FR::MED_REMP, + MED_FR::MED_NOEUD, MED_FR::med_geometrie_element(0) ); + - if (err != MED_VALID) - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Can't write optionnal numbers of mesh |" << - _meshName.c_str() << "| in file |" << - _fileName << " |")) ; + if (err<0) + throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Can't write optionnal numbers of mesh |" << _meshName.c_str() + << "| in file |" << _fileName << " |")) ; } ////////////////////////////////////////////////////////////////////////////////////// @@ -2064,19 +1936,11 @@ int MED_MESH_WRONLY_DRIVER::writeConnectivities(medEntityMesh entity) const { ////////////////////////////////////////////////////////////////////////////////////// -// err = MEDconnEcr( _medIdt, const_cast ( _meshName.c_str()), _ptrMesh->_spaceDimension, -// connectivityArray, MED_FR::MED_FULL_INTERLACE , numberOfElements, -// MED_FR::MED_LECTURE_ECRITURE, -// (MED_FR::med_entite_maillage ) entity, -// (MED_FR::med_geometrie_element) types[i], MED_FR::MED_NOD ); - - err = MEDconnEcr(_medIdt, const_cast ( _meshName.c_str()), - _ptrMesh->_spaceDimension, connectivityArray, - MED_FR::MED_FULL_INTERLACE , numberOfElements, - (MED_FR::med_entite_maillage ) entity, - (MED_FR::med_geometrie_element) types[i], - MED_FR::MED_NOD); - + err = MEDconnEcr( _medIdt, const_cast ( _meshName.c_str()), _ptrMesh->_spaceDimension, + connectivityArray, MED_FR::MED_FULL_INTERLACE , numberOfElements, + MED_FR::MED_REMP, + (MED_FR::med_entite_maillage ) entity, + (MED_FR::med_geometrie_element) types[i], MED_FR::MED_NOD ); delete[] connectivityArray ; if (err<0) // ETENDRE LES EXPLICATIONS @@ -2097,26 +1961,16 @@ int MED_MESH_WRONLY_DRIVER::writeConnectivities(medEntityMesh entity) const { const int * connectivity = _ptrMesh->getConnectivity(MED_EN::MED_FULL_INTERLACE, MED_DESCENDING, entity, types[i]); // Pour l'instant la class utilise le multi..... -// err = MED_FR::MEDconnEcr( _medIdt, -// const_cast ( _meshName.c_str()), -// _ptrMesh->_spaceDimension, -// const_cast (connectivity), -// MED_FR::MED_FULL_INTERLACE, -// numberOfElements, -// MED_FR::MED_LECTURE_ECRITURE, -// (MED_FR::med_entite_maillage ) entity, -// (MED_FR::med_geometrie_element) types[i], -// MED_FR::MED_DESC ); - - err = MED_FR::MEDconnEcr(_medIdt, - const_cast ( _meshName.c_str()), - _ptrMesh->_spaceDimension, - const_cast (connectivity), - MED_FR::MED_FULL_INTERLACE, - numberOfElements, - (MED_FR::med_entite_maillage ) entity, - (MED_FR::med_geometrie_element) types[i], - MED_FR::MED_DESC ); + err = MED_FR::MEDconnEcr( _medIdt, + const_cast ( _meshName.c_str()), + _ptrMesh->_spaceDimension, + const_cast (connectivity), + MED_FR::MED_FULL_INTERLACE, + numberOfElements, + MED_FR::MED_REMP, + (MED_FR::med_entite_maillage ) entity, + (MED_FR::med_geometrie_element) types[i], + MED_FR::MED_DESC ); if (err<0) // ETENDRE LES EXPLICATIONS throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Can't write connectivities of mesh |" << _meshName.c_str() << "| in file |" << _fileName @@ -2177,24 +2031,21 @@ int MED_MESH_WRONLY_DRIVER::writeFamilyNumbers() const { MEDArrayNodeFamily[Number[j]-1]=FamilyIdentifier ; } } - for(int j=0; jgetIsAGrid() ) - - err = MEDfamEcr(_medIdt, const_cast ( _meshName.c_str() ), - MEDArrayNodeFamily, NumberOfNodes, MED_FR::MED_NOEUD, - (enum MED_FR::med_geometrie_element) MED_NONE); - -// else -// err = MEDfamGridEcr(_medIdt, -// const_cast (_ptrMesh->_name.c_str()), -// MEDArrayNodeFamily, -// NumberOfNodes, -// MED_FR::MED_LECTURE_ECRITURE, -// MED_FR::MED_NOEUD); + if ( !_ptrMesh->getIsAGrid() ) + err = MEDfamEcr(_medIdt, const_cast ( _meshName.c_str() ), + MEDArrayNodeFamily, NumberOfNodes,MED_FR::MED_REMP , + MED_FR::MED_NOEUD, + (enum MED_FR::med_geometrie_element) MED_NONE); + else + err = MEDfamGridEcr(_medIdt, + const_cast (_ptrMesh->_name.c_str()), + MEDArrayNodeFamily, + NumberOfNodes, + MED_FR::MED_REMP, + MED_FR::MED_NOEUD); if ( err != MED_VALID) throw MEDEXCEPTION(LOCALIZED(STRING(LOC) << "Can't write node family for the |"<< NumberOfNodes @@ -2256,11 +2107,11 @@ int MED_MESH_WRONLY_DRIVER::writeFamilyNumbers() const { for (int i=0; i ( _meshName.c_str() ), - (MEDArrayFamily+typeCount[i]-1), - (typeCount[i+1]-typeCount[i]), + MEDArrayFamily+typeCount[i]-1,typeCount[i+1]-typeCount[i], + MED_FR::MED_REMP , (MED_FR::med_entite_maillage) entity, - (MED_FR::med_geometrie_element) types[i]); - + (MED_FR::med_geometrie_element) types[i] +); MESSAGE("OK "<getNumberOfElements(entity, types[i]) @@ -2324,10 +2175,11 @@ int MED_MESH_WRONLY_DRIVER::writeFamilyNumbers() const { const int * typeCount = _ptrMesh->getGlobalNumberingIndex(entity) ; for (int i=0; i ( _meshName.c_str() ), familyArray+typeCount[i]-1, typeNumberOfElements, + MED_FR::MED_REMP , (MED_FR::med_entite_maillage) entity, (MED_FR::med_geometrie_element) types[i]); @@ -2393,13 +2245,14 @@ int MED_MESH_WRONLY_DRIVER::writeFamilyNumbers() const { const int * typeCount = _ptrMesh->getGlobalNumberingIndex(entity) ; for (int i=0; i ( _meshName.c_str() ), familyArray+typeCount[i]-1, typeNumberOfElements, + MED_FR::MED_REMP , (MED_FR::med_entite_maillage) entity, (MED_FR::med_geometrie_element) types[i]); - + if ( err != MED_VALID) throw MEDEXCEPTION(LOCALIZED(STRING(LOC) << "Can't write family for the |"<< _ptrMesh->getNumberOfElements(entity, types[i]) << "| edges of geometric type |" << MED_FR::geoNames[ (MED_FR::med_geometrie_element) types[i]] <<"|in mesh |" @@ -2438,7 +2291,7 @@ int MED_MESH_WRONLY_DRIVER::writeFamilies(vector & families ) const { string attributeDescription = families[i]->getAttributeDescription(j+1); if ( attributeDescription.size() > MED_TAILLE_DESC ) - throw MEDEXCEPTION( LOCALIZED(STRING(LOC) << "The size of the attribute description n° |" << j+1 << "| of the family |" << families[i]->getName() + throw MEDEXCEPTION( LOCALIZED(STRING(LOC) << "The size of the attribute description n° |" << j+1 << "| of the family |" << families[i]->getName() << "| with identifier |" << families[i]->getIdentifier() << "| is |" << attributeDescription.size() <<"| and is more than |" << MED_TAILLE_DESC << "|")) ; @@ -2454,7 +2307,7 @@ int MED_MESH_WRONLY_DRIVER::writeFamilies(vector & families ) const { string groupName = families[i]->getGroupName(j+1); if ( groupName.size() > MED_TAILLE_LNOM ) - throw MEDEXCEPTION( LOCALIZED(STRING(LOC) << "The size of the group name n° |" << j+1 << "| of the family |" << families[i]->getName() + throw MEDEXCEPTION( LOCALIZED(STRING(LOC) << "The size of the group name n° |" << j+1 << "| of the family |" << families[i]->getName() << "| with identifier |" << families[i]->getIdentifier() << "| is |" << groupName.size() <<"| and is more than |" << MED_TAILLE_LNOM << "|")) ; @@ -2542,12 +2395,10 @@ GENDRIVER * MED_MESH_RDWR_DRIVER::copy(void) const } void MED_MESH_RDWR_DRIVER::write(void) const - throw (MEDEXCEPTION) { MED_MESH_WRONLY_DRIVER::write(); } void MED_MESH_RDWR_DRIVER::read (void) - throw (MEDEXCEPTION) { MED_MESH_RDONLY_DRIVER::read(); } diff --git a/src/MEDMEM/MEDMEM_MedMeshDriver.hxx b/src/MEDMEM/MEDMEM_MedMeshDriver.hxx index 348a3337c..94c1b5906 100644 --- a/src/MEDMEM/MEDMEM_MedMeshDriver.hxx +++ b/src/MEDMEM/MEDMEM_MedMeshDriver.hxx @@ -59,8 +59,8 @@ public : */ virtual ~MED_MESH_DRIVER() ; - void open() throw (MEDEXCEPTION); - void close() throw (MEDEXCEPTION); + void open(); + void close(); virtual void write( void ) const = 0 ; virtual void read ( void ) = 0 ; @@ -117,11 +117,11 @@ public : /*! Return a MEDEXCEPTION : it is the read-only driver. */ - void write( void ) const throw (MEDEXCEPTION); + void write( void ) const; /*! Read MESH in the specified file. */ - void read ( void ) throw (MEDEXCEPTION); + void read ( void ); private: int getCOORDINATE(); @@ -172,11 +172,11 @@ public : /*! Write MESH in the specified file. */ - void write( void ) const throw (MEDEXCEPTION); + void write( void ) const; /*! Return a MEDEXCEPTION : it is the write-only driver. */ - void read ( void ) throw (MEDEXCEPTION); + void read ( void ); private: int writeCoordinates () const; @@ -222,11 +222,11 @@ public : /*! Write MESH in the specified file. */ - void write(void) const throw (MEDEXCEPTION); + void write(void) const; /*! Read MESH in the specified file. */ - void read (void) throw (MEDEXCEPTION); + void read (void); private: GENDRIVER * copy(void) const ; diff --git a/src/MEDMEM/MEDMEM_Mesh.cxx b/src/MEDMEM/MEDMEM_Mesh.cxx index 3a617e1a4..435890dc9 100644 --- a/src/MEDMEM/MEDMEM_Mesh.cxx +++ b/src/MEDMEM/MEDMEM_Mesh.cxx @@ -147,8 +147,6 @@ void MESH::init() { string _name = "NOT DEFINED"; // A POSITIONNER EN FCT DES IOS ? - string _decription = "NOT DEFINED"; // A POSITIONNER EN FCT DES IOS ? - _coordinate = (COORDINATE *) NULL; _connectivity = (CONNECTIVITY *) NULL; @@ -170,8 +168,7 @@ MESH::MESH():_coordinate(NULL),_connectivity(NULL), _isAGrid(false) { MESH::MESH(MESH &m) { - _name = m._name; - _description = m._description; + _name=m._name; _isAGrid = m._isAGrid; if (m._coordinate != NULL) @@ -2085,16 +2082,14 @@ FIELD* MESH::getBarycenter(const SUPPORT * Support) const throw (MEDEXCE bool MESH::isEmpty() const { - bool notempty = _name != "" || _description != "" || - _coordinate != NULL || _connectivity != NULL || - _spaceDimension !=MED_INVALID || - _meshDimension !=MED_INVALID || - _numberOfNodes !=MED_INVALID || _groupNode.size() != 0 || - _familyNode.size() != 0 || _groupCell.size() != 0 || - _familyCell.size() != 0 || _groupFace.size() != 0 || - _familyFace.size() != 0 || _groupEdge.size() != 0 || - _familyEdge.size() != 0 || _isAGrid != 0 ; - return !notempty; + bool notempty = _name != "" || _coordinate != NULL || _connectivity != NULL || + _spaceDimension !=MED_INVALID || _meshDimension !=MED_INVALID || + _numberOfNodes !=MED_INVALID || _groupNode.size() != 0 || + _familyNode.size() != 0 || _groupCell.size() != 0 || + _familyCell.size() != 0 || _groupFace.size() != 0 || + _familyFace.size() != 0 || _groupEdge.size() != 0 || + _familyEdge.size() != 0 || _isAGrid != 0 ; + return !notempty; } void MESH::read(int index) diff --git a/src/MEDMEM/MEDMEM_Mesh.hxx b/src/MEDMEM/MEDMEM_Mesh.hxx index 94531af2c..d4a4e2deb 100644 --- a/src/MEDMEM/MEDMEM_Mesh.hxx +++ b/src/MEDMEM/MEDMEM_Mesh.hxx @@ -98,7 +98,6 @@ protected: protected : string _name; // A POSITIONNER EN FCT DES IOS ? - string _description; mutable COORDINATE * _coordinate; mutable CONNECTIVITY * _connectivity; @@ -192,9 +191,8 @@ public : inline void setName(string name); - inline void setDescription(string description); + inline string getName() const; - inline string getDescription() const; inline int getSpaceDimension() const; inline int getMeshDimension() const; inline bool getIsAGrid(); @@ -396,18 +394,6 @@ inline string MESH::getName() const return _name; } -/*! Set the MESH description */ -inline void MESH::setDescription(string description) -{ - _description=description; //NOM interne à la classe -} - -/*! Get the MESH description */ -inline string MESH::getDescription() const -{ - return _description; -} - /*! Get the dimension of the space */ inline int MESH::getSpaceDimension() const { diff --git a/src/MEDMEM/MEDMEM_Meshing.cxx b/src/MEDMEM/MEDMEM_Meshing.cxx index 355677673..e04c642c3 100644 --- a/src/MEDMEM/MEDMEM_Meshing.cxx +++ b/src/MEDMEM/MEDMEM_Meshing.cxx @@ -15,7 +15,7 @@ using namespace std; #include "MEDMEM_Group.hxx" using namespace MEDMEM; -/*! Create an empty %MESH. */ +/*! Create an empty MESH. */ MESHING::MESHING(): MESH() { MESSAGE("MESHING::MESHING()"); @@ -40,7 +40,7 @@ void MESHING::setSpaceDimension(const int SpaceDimension) // _meshDimension = MeshDimension ; // } -/*! Set the number of nodes used in the %MESH */ +/*! Set the number of nodes used in the MESH */ void MESHING::setNumberOfNodes(const int NumberOfNodes) { _numberOfNodes = NumberOfNodes ; @@ -53,8 +53,8 @@ void MESHING::setNumberOfNodes(const int NumberOfNodes) - "CYLINDRICAL" - "SPHERICAL" The interlacing mode are : - - %MED_NO_INTERLACE : X1 X2 Y1 Y2 Z1 Z2 - - %MED_FULL_INTERLACE : X1 Y1 Z1 X2 Y2 Z2 + - MED_NO_INTERLACE : X1 X2 Y1 Y2 Z1 Z2 + - MED_FULL_INTERLACE : X1 Y1 Z1 X2 Y2 Z2 */ void MESHING::setCoordinates(const int SpaceDimension, const int NumberOfNodes, @@ -76,10 +76,7 @@ void MESHING::setCoordinates(const int SpaceDimension, _coordinate->setCoordinatesSystem(System); } -/*! Set the system in which coordinates are given - - "CARTESIAN" - - "CYLINDRICAL" - - "SPHERICAL". */ +/*! Set the system in which coordinates are given (CARTESIAN,CYLINDRICAL,SPHERICAL) __??MED_CART??__. */ void MESHING::setCoordinatesSystem(const string System) throw (MEDEXCEPTION) { @@ -89,7 +86,7 @@ void MESHING::setCoordinatesSystem(const string System) } /*! Set the coordinate names array ("x ","y ","z ") - of size n*%MED_TAILLE_PNOM + of size n*MED_TAILLE_PNOM */ void MESHING::setCoordinatesNames(const string * name) { @@ -100,7 +97,7 @@ void MESHING::setCoordinatesNames(const string * name) /*! Set the (i+1)^th component of coordinate names array - ("x ","y ","z ") of size n*%MED_TAILLE_PNOM + ("x ","y ","z ") of size n*MED_TAILLE_PNOM */ void MESHING::setCoordinateName(const string name, const int i) { @@ -108,7 +105,7 @@ void MESHING::setCoordinateName(const string name, const int i) } /*! Set the coordinate unit names array ("cm ","cm ","cm ") - of size n*%MED_TAILLE_PNOM + of size n*MED_TAILLE_PNOM */ void MESHING::setCoordinatesUnits(const string * units) { @@ -119,7 +116,7 @@ void MESHING::setCoordinatesUnits(const string * units) /*! Set the (i+1)^th component of the coordinate unit names array - ("cm ","cm ","cm ") of size n*%MED_TAILLE_PNOM + ("cm ","cm ","cm ") of size n*MED_TAILLE_PNOM */ void MESHING::setCoordinateUnit(const string unit, const int i) { @@ -182,7 +179,7 @@ void MESHING::setNumberOfTypes(const int NumberOfTypes, REM : Don't use MED_NODE and MED_ALL_ENTITIES - If entity is not defined, throws an exception. + If entity is not defined, throw an exception. */ void MESHING::setTypes(const medGeometryElement * Types, const medEntityMesh entity) diff --git a/src/MEDMEM/MEDMEM_Meshing.hxx b/src/MEDMEM/MEDMEM_Meshing.hxx index 867b62e8d..164ed112c 100644 --- a/src/MEDMEM/MEDMEM_Meshing.hxx +++ b/src/MEDMEM/MEDMEM_Meshing.hxx @@ -11,7 +11,7 @@ using namespace MED_EN; /*! - This class %MESHING is a special class to set a %MESH object. + This class MESHING is a special class to set a MESH object. */ namespace MEDMEM { diff --git a/src/MEDMEM/MEDMEM_PointerOf.hxx b/src/MEDMEM/MEDMEM_PointerOf.hxx index a5f0bdce3..be3201043 100644 --- a/src/MEDMEM/MEDMEM_PointerOf.hxx +++ b/src/MEDMEM/MEDMEM_PointerOf.hxx @@ -6,252 +6,214 @@ #include "MEDMEM_Exception.hxx" /*! - The template class PointerOf embedding a standard pointer (_pointer) is in - charge of managing the pointed memory.\n - - the object PointerOf is the memory owner if a size is given at object - construction. In these cases, memory will be desallocated at object - destruction. In all other cases, the desallocator will only nullify pointers. + The template class PointerOf embedding a standard pointer (_pointer) is in charge of + managing the pointed memory.\n + + the object PointerOf is the memory owner if a size is given at object construction. + In these cases, memory will be desallocated at object destruction. In all other cases, + the desallocator will only nullify pointers. */ namespace MEDMEM { template class PointerOf { protected : - /*! - pointer to the pointed memory - */ - - T* _pointer ; - - /*! - boolean setted to true if memory has to be desallocated - */ - - bool _done ; + /*! pointer to the pointed memory */ + T* _pointer ; + /*! boolean setted to true if memory has to be desallocated */ + bool _done ; public : - PointerOf() ; - ~PointerOf() ; - PointerOf( const int &size ) ; - PointerOf( const T *pointer ) ; - PointerOf( const int &size, const T *pointer ) ; - PointerOf( const PointerOf & pointerOf ) ; - PointerOf( const int &size, const PointerOf & pointerOf ) ; - operator T*() ; - operator const T*() const ; - void set( const int &size ) ; - void set( const T *pointer ) ; - void set( const int &size, const T *pointer ) ; - PointerOf& operator=( const PointerOf &pointer ) ; + PointerOf() ; + ~PointerOf() ; + PointerOf( const int &size ) ; + PointerOf( const T *pointer ) ; + PointerOf( const int &size, const T *pointer ) ; + PointerOf( const PointerOf & pointerOf ) ; + PointerOf( const int &size, const PointerOf & pointerOf ) ; + operator T*() ; + operator const T*() const ; + void set( const int &size ) ; + void set( const T *pointer ) ; + void set( const int &size, const T *pointer ) ; + PointerOf& operator=( const PointerOf &pointer ) ; } ; } ; -/* - Implementation -*/ +// ------------------------------------------------------------ // +// // +// Implementation // +// // +// ------------------------------------------------------------ // using namespace MEDMEM; -/*! - Creates a null T* pointer and sets the boolean (for desallocation) to false. -*/ - +/*! Creates a null T* pointer and sets the boolean (for desallocation) to false. */ template PointerOf::PointerOf() : _pointer(0), _done(false) { - BEGIN_OF("PointerOf::PointerOf() empty constructor"); - END_OF("PointerOf::PointerOf() empty constructor"); } -/* ! - Creates a standard T* pointer to the pointed memory. \n - The boolean for desallocation is setted to false. \n - Be aware : \n - - The "old" PointerOf always has propriety of the pointed memory. \n - - If the "old" PointerOf is detroyed, the "new" PointerOf points - a desallocated memory zone. -*/ - +/*! Creates a standard T* pointer to the pointed memory. \n + The boolean for desallocation is setted to false. \n + Be aware : \n + - The "old" PointerOf always has propriety of the pointed memory. \n + - If the "old" PointerOf is detroyed, the "new" PointerOf points + a desallocated memory zone. */ template PointerOf::PointerOf(const PointerOf & pointerOf) : _pointer((T*)(const T* const)pointerOf), _done(false) { - BEGIN_OF("PointerOf::PointerOf(const PointerOf & pointerOf)"); - MESSAGE("Warning ! No Propriety Transfer"); - END_OF ("PointerOf::PointerOf(const PointerOf & pointerOf)"); + BEGIN_OF("PointerOf::PointerOf(const PointerOf & pointerOf)"); + MESSAGE("Warning ! No Propriety Transfer"); + END_OF ("PointerOf::PointerOf(const PointerOf & pointerOf)"); } /*! Duplicate array of size size pointed in pointerOf. */ - template PointerOf::PointerOf( const int &size, const PointerOf & pointerOf) : _pointer((size,(T*)pointerOf)) { } -/*! - If size <= 0, creates a null "T*" pointer\n - Else allocates memory and sets desallocation boolean to true./n - Memory will be desallocated when erasing this PointerOf -*/ - +/*! If size <= 0, creates a null "T*" pointer\n + Else allocates memory and sets desallocation boolean to true./n + Memory will be desallocated when erasing this PointerOf*/ template PointerOf::PointerOf( const int &size ) { - if (size <= 0) - { - _pointer=(T*)NULL; - _done=false; - } - else - { - _pointer = new T[ size ] ; - _done=true; - } + if (size <= 0) + { + _pointer=(T*)NULL; + _done=false; + } + else + { + _pointer = new T[ size ] ; + _done=true; + } } /*! Creates a standard pointer to the memory zone pointed by T*. /n - T* owner is in charged of memory desallocation. /n - Memory will not be released when erasing this PointerOf -*/ - + T* owner is in charged of memory desallocation. /n + Memory will not be released when erasing this PointerOf*/ template PointerOf::PointerOf( const T* pointer ) : _pointer( (T*)pointer ), _done(false) { } -/*! - If size <= 0, return an exception\n - Else duplicate array and sets desallocation boolean to true./n - Memory will be desallocated when erasing this PointerOf -*/ - +/*! If size <= 0, return an exception\n + Else duplicate array and sets desallocation boolean to true./n + Memory will be desallocated when erasing this PointerOf*/ template PointerOf::PointerOf( const int &size, const T* pointer) { if (size <= 0) throw MEDEXCEPTION("PointerOf( const int,const T*) : array size <= 0"); - + _pointer = new T[ size ] ; memcpy(_pointer,pointer,size*sizeof(T)); _done=true; } -/*! - The destuctor desallocates memory if necessary (that is if the attribute - _done equals true).\n - The attribute _pointer is nullified -*/ - +/*! The destuctor desallocates memory if necessary (that is if the attribute _done equals true).\n + The attribute _pointer is nullified */ template PointerOf::~PointerOf() { - if ( _pointer ) - { - if( _done ) - { - MESSAGE("PointerOf::~PointerOf() --> deleting _pointer") ; - delete [] _pointer ; - _done = false ; - } - else + if ( _pointer ) { - MESSAGE("_pointer is only nullified") ; + if( _done ) + { + MESSAGE("PointerOf::~PointerOf() --> deleting _pointer") ; + delete [] _pointer ; + _done = false ; + } + else + { + MESSAGE("_pointer is only nullified") ; + } + _pointer = 0 ; } - _pointer = 0 ; - } } -/*! - Creates a standard pointer (T*) to the pointed memory. \n - The boolean for desallocation is setted to false. \n - Be aware : \n - - The "right" PointerOf always has propriety of the pointed memory. \n - - If the "right" PointerOf is detroyed, the "left" PointerOf points - a desallocated memory zone. - - it works the same way as PointerOf(const PointerOf & pointerOf) -*/ - +/*! Creates a standard pointer (T*) to the pointed memory. \n + The boolean for desallocation is setted to false. \n + Be aware : \n + - The "right" PointerOf always has propriety of the pointed memory. \n + - If the "right" PointerOf is detroyed, the "left" PointerOf points + a desallocated memory zone. + - it works the same way as PointerOf(const PointerOf & pointerOf) */ template PointerOf& PointerOf::operator=( const PointerOf &pointer ) { - BEGIN_OF("PointerOf::operator=( const PointerOf &pointer )") ; - if ( &pointer != this ) - { - this->set( pointer._pointer ) ; - } - END_OF("PointerOf::operator=( const PointerOf &pointer )") ; - return *this ; + BEGIN_OF("PointerOf::operator=( const PointerOf &pointer )") ; + if ( &pointer != this ) + { + this->set( pointer._pointer ) ; + } + END_OF("PointerOf::operator=( const PointerOf &pointer )") ; + return *this ; } -/*! - Returns _pointer. -*/ - +/*! Returns _pointer.*/ template PointerOf::operator T*() { - return _pointer ; + return _pointer ; } -/*! - Returns _pointer. -*/ +/*! Returns _pointer.*/ template PointerOf::operator const T*() const { - return _pointer ; + return _pointer ; } -/*! - If necessary, released memory holded by PointerOf/n. - Else allocates memory and sets desallocation boolean to true./n - Can be used in order to "nullify" an existing PointerOf/n - Memory will be desallocated when erasing this PointerOf -*/ +/*! If necessary, released memory holded by PointerOf/n. + Else allocates memory and sets desallocation boolean to true./n + Can be used in order to "nullify" an existing PointerOf/n + Memory will be desallocated when erasing this PointerOf*/ template void PointerOf::set( const int &size ) { - if ( _pointer && _done ) - { - delete [] _pointer ; - _pointer=0 ; - } - if (size <= 0) - { - _pointer=(T*)NULL; - } - else - { - _pointer = new T[ size ] ; - } - _done = true ; + if ( _pointer && _done ) + { + delete [] _pointer ; + _pointer=0 ; + } + if (size <= 0) + { + _pointer=(T*)NULL; + } + else + { + _pointer = new T[ size ] ; + } + _done = true ; + return ; } /*! If necessary, released memory holded by PointerOf/n. Then, sets _pointer to the memory zone pointed by T*. /n T* owner is in charged of memory desallocation. /n memory will not be released when erasing this PointerOf*/ - template void PointerOf::set( const T *pointer ) { - MESSAGE( "BEGIN PointerOf::set( const T *pointer )" ) ; - SCRUTE(pointer) ; - SCRUTE(_done) ; - if ( _pointer && _done ) - { - MESSAGE("PointerOf::set --> deleting _pointer") ; - delete [] _pointer ; - _pointer=0 ; - _done=false ; - } - _pointer=(T*)pointer ; - _done=false ; - MESSAGE( "END PointerOf::set( const T *pointer )" ) ; + MESSAGE( "BEGIN PointerOf::set( const T *pointer )" ) ; + SCRUTE(pointer) ; + SCRUTE(_done) ; + if ( _pointer && _done ) + { + MESSAGE("PointerOf::set --> deleting _pointer") ; + delete [] _pointer ; + _pointer=0 ; + _done=false ; + } + _pointer=(T*)pointer ; + _done=false ; + MESSAGE( "END PointerOf::set( const T *pointer )" ) ; + return ; } -/*! - If necessary, released memory holded by PointerOf/n. - If size <= 0, return an exception\n. - Else allocates memory and sets desallocation boolean to true./n - Can be used in order to "nullify" an existing PointerOf/n - Memory will be desallocated when erasing this PointerOf -*/ - +/*! If necessary, released memory holded by PointerOf/n. + If size <= 0, return an exception\n. + Else allocates memory and sets desallocation boolean to true./n + Can be used in order to "nullify" an existing PointerOf/n + Memory will be desallocated when erasing this PointerOf*/ template void PointerOf::set( const int &size, const T *pointer) { if ( _pointer && _done ) @@ -265,6 +227,8 @@ template void PointerOf::set( const int &size, const T *pointer) _pointer = new T[ size ] ; memcpy(_pointer,pointer,size*sizeof(T)); _done=true; + + return ; } # endif /* # if ! defined( __PointerOf_HXX__ ) */ diff --git a/src/MEDMEM/MEDMEM_Support.cxx b/src/MEDMEM/MEDMEM_Support.cxx index 72ae57846..f91b836de 100644 --- a/src/MEDMEM/MEDMEM_Support.cxx +++ b/src/MEDMEM/MEDMEM_Support.cxx @@ -155,12 +155,13 @@ ostream & MEDMEM::operator<<(ostream &os, const SUPPORT &my) medGeometryElement * types = my._geometricType; for (int j=0;j "; +// for (int k=0; k + +#else + +#ifndef __MEDMEM_UTILITIES +#define __MEDMEM_UTILITIES + +# include +# include +using namespace std; + +/* --- INFOS is always defined (without _DEBUG_): to be used for warnings, with release version --- */ + +# define HEREWEARE {cout<V2_2 + typedef enum {MED_CARTESIAN, MED_POLAR, MED_BODY_FITTED} med_grid_type; -// typedef enum {MED_LECT,MED_ECRI,MED_REMP} med_mode_acces; V2_1->V2_2 + typedef enum {MED_LECT,MED_ECRI,MED_REMP} med_mode_acces; - typedef enum {MED_LECTURE, MED_LECTURE_ECRITURE, MED_LECTURE_AJOUT, - MED_CREATION} med_mode_acces; - - typedef enum {MED_NON_STRUCTURE, MED_STRUCTURE} med_maillage; - - typedef enum {MED_GRILLE_CARTESIENNE, MED_GRILLE_POLAIRE, - MED_GRILLE_STANDARD} med_type_grille; - - typedef enum {MED_COOR, MED_CONN, MED_NOM, MED_NUM, MED_FAM, MED_COOR_IND1, - MED_COOR_IND2,MED_COOR_IND3} med_table; + typedef enum {MED_COOR, MED_CONN, MED_NOM, MED_NUM, MED_FAM} med_table; - typedef enum {MED_REEL64=6, MED_INT32=24,MED_INT64=26, - MED_INT=28} med_type_champ; + typedef enum {MED_REEL64=6, MED_INT32=24,MED_INT64=26, MED_INT} med_type_champ; #define MED_NBR_GEOMETRIE_MAILLE 15 #define MED_NBR_GEOMETRIE_FACE 4 @@ -104,20 +87,14 @@ typedef enum {MED_COMP, MED_DTYPE} med_dim_champ; typedef enum {MED_HDF_VERSION, MED_VERSION, MED_FICH_DES} med_fich_info; #define MED_NOPG 1 /* -> pas de point de Gauss */ -#define MED_NOGAUSS "" /* -> pas de point de Gauss */ -#define MED_NOGAUSSi MED_NOM_BLANC /* Variable Interne */ #define MED_NOPFL "" /* -> pas de profils utilisateur */ -#define MED_NOPFLi MED_NOM_BLANC /* Variable Interne */ -#define MED_NOLIEN "" -#define MED_NOLIENi MED_NOM_BLANC /* Variable Interne */ +#define MED_NOPFLi " " /* Variable Interne */ #define MED_NOPF 0 /* -> pas de profils pour _MEDdataseNnumEcrire */ #define MED_NOPDT -1 /* rem: pas de pas de temps negatifs */ #define MED_NONOR -1 /* rem: pas de n°ordre negatif */ #define MED_DIM1 1 /* PAS */ //#define MED_ALL 0 !!!!! NB: WARNING MED_ALL deja utilise dans l'enum medGeometryElement !!!!!!!! #define MED_ALL 0 -#define MED_NOREF "" -#define MED_DEFAUT "" /* Toutes les donnees champs ou maillage pour le montage */ #if defined(SUN4SOL2) || defined(PCLINUX) || defined(OSF1) || defined(IRIX64_32) || defined(RS6000) /* interface C/FORTRAN */ @@ -209,17 +186,14 @@ typedef double med_float; #define MED_VALID 0 //#define MED_NULL NULL -//#define MED_RDONLY MED_LECT V2_1->V2_2 -#define MED_RDONLY MED_LECTURE +#define MED_RDONLY MED_LECT // rem: MED_WRONLY=MED_ECR n'empêche malheureusement pas de lire le fichier // mais permet de conserver l'existant. Attention à la création d'objet // ne prenant pas de paramètre de type mode d'accès il faut tester si il // est déjà présent dans le fichier. Si MED_WRONLY=MED_REMP le fichier est // réinitialisé. Cf une évolution de MED. - //#define MED_WRONLY MED_ECRI V2_1->V2_2 -#define MED_WRONLY MED_LECTURE_AJOUT - //#define MED_RDWR MED_ECRI V2_1->V2_2 -#define MED_RDWR MED_LECTURE_ECRITURE +#define MED_WRONLY MED_ECRI +#define MED_RDWR MED_ECRI // Fin #define FAUX 0 diff --git a/src/MEDMEM/Makefile.in b/src/MEDMEM/Makefile.in index f06fce522..a2cc4993a 100644 --- a/src/MEDMEM/Makefile.in +++ b/src/MEDMEM/Makefile.in @@ -115,11 +115,11 @@ CPPFLAGS+=$(MED2_INCLUDES) $(HDF5_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome CXXFLAGS+=-ftemplate-depth-42 -I${KERNEL_ROOT_DIR}/include/salome #LDFLAGS+=$(MED2_LIBS) $(HDF5_LIBS) -lSalomeLoggerServer -L${KERNEL_ROOT_DIR}/lib/salome # change motivated by the bug KERNEL4778. -LDFLAGS+=$(MED2_LIBS) $(HDF5_LIBS) -lSALOMELocalTrace -L${KERNEL_ROOT_DIR}/lib/salome +LDFLAGS+=$(MED2_LIBS) $(HDF5_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome -lSALOMELocalTrace #LDFLAGSFORBIN+=$(MED2_LIBS) $(HDF5_LIBS) -lSalomeLoggerServer -L${KERNEL_ROOT_DIR}/lib/salome # change motivated by the bug KERNEL4778. -LDFLAGSFORBIN+=$(MED2_LIBS) $(HDF5_LIBS) -lSALOMELocalTrace -L${KERNEL_ROOT_DIR}/lib/salome +LDFLAGSFORBIN+=$(MED2_LIBS) $(HDF5_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome -lSALOMELocalTrace LIBSFORBIN= diff --git a/src/MEDMEM/create_grid.c b/src/MEDMEM/create_grid.c index ea274cf05..dd2cc7291 100644 --- a/src/MEDMEM/create_grid.c +++ b/src/MEDMEM/create_grid.c @@ -1,12 +1,12 @@ /*---------------------------------------------------------------------------- - MED MEDMEM : MED files in memory +MED MEDMEM : MED files in memory - Copyright (C) 2003 CEA/DEN, EDF R&D + Copyright (C) 2003 CEA/DEN, EDF R&D File : create_grid.c - Module : MED +Module : MED ----------------------------------------------------------------------------*/ /****************************************************************************** @@ -32,8 +32,8 @@ int main (int argc, char **argv) { - /* Ecriture d'un premier maillage non structure (test14 + test8) - ************************************************************** */ +/* Ecriture d'un premier maillage non structure (test14 + test8) + ************************************************************* */ med_err ret; med_idt fid; @@ -41,8 +41,6 @@ int main (int argc, char **argv) med_int mdim = 2; /* nom du maillage de longueur maxi MED_TAILLE_NOM */ char maa[MED_TAILLE_NOM+1] = "maa1"; - /* description du maillage de longueur maxi MED_TAIIL_DESC */ - char maadesc[MED_TAILLE_DESC+1] = "Example de maillage structure 2D"; /* le nombre de noeuds */ med_int nnoe = 4; /* table des coordonnees @@ -51,15 +49,12 @@ int main (int argc, char **argv) med_int nbr[2] = {2, 2}; /* tables des noms et des unites des coordonnees profil : (dimension*MED_TAILLE_PNOM+1) */ - char nomcoo[2*MED_TAILLE_PNOM+1] = "x y "; - char unicoo[2*MED_TAILLE_PNOM+1] = "cm cm "; - - char nomcooi[MED_TAILLE_PNOM+1] = "x "; - char unicooi[MED_TAILLE_PNOM+1] = "cm "; + char nomcoo[2*MED_TAILLE_PNOM+1] = "x y "; + char unicoo[2*MED_TAILLE_PNOM+1] = "cm cm "; /* tables des noms, numeros, numeros de familles des noeuds autant d'elements que de noeuds - les noms ont pout longueur MED_TAILLE_PNOM */ - char nomnoe[4*MED_TAILLE_PNOM+1] = "nom1 nom2 nom3 nom4 "; + char nomnoe[4*MED_TAILLE_PNOM+1] = "nom1 nom2 nom3 nom4 "; med_int numnoe[4] = {1,2,3,4}; med_int nufano[4] = {0,1,2,2}; char nomfam[MED_TAILLE_NOM+1]; @@ -70,15 +65,10 @@ int main (int argc, char **argv) med_int attval; med_int ngro; char gro[MED_TAILLE_LNOM+1]; - int i, ip1; + int i; int nfame = 1; int nfamn = 2; - med_int famNodeStd[4]; - med_int famElmtStd[1]; - med_int famFaceStd[4]; - med_int famNodeCart[16]; - med_int famElmtCart[9]; - med_int famFaceCart[24]; + med_int fam[16]; /* les elements: */ @@ -86,33 +76,33 @@ int main (int argc, char **argv) med_int quad4[4] = { 1, 2, 4, 3 }; - char nomquad4[MED_TAILLE_PNOM*1+1] = "quad1 "; + char nomquad4[MED_TAILLE_PNOM*1+1] = "quad1 "; med_int numquad4[1] = {1}; med_int nufaquad4[1] = {-1}; - fid = MEDouvrir("test19.med",MED_LECTURE_ECRITURE); + fid = MEDouvrir("test19.med",MED_REMP); if (fid < 0) ret = -1; else ret = 0; - printf("MEDouvrir : %d\n",ret); + printf("%d\n",ret); /* creation du maillage maa de dimension 2 */ if (ret == 0) - ret = MEDmaaCr(fid,maa,mdim,MED_NON_STRUCTURE,maadesc); - printf("MEDmaaCr : %d\n",ret); + ret = MEDmaaCr(fid,maa,mdim); + printf("%d\n",ret); /* ecriture des noeuds d'un maillage MED : - des coo en mode MED_FULL_INTERLACE : (X1,Y1,X2,Y2,X3,Y3,...) - dans un repere cartesien + dans un repere cartesien - des noms (optionnel dans un fichier MED) - des numeros (optionnel dans un fichier MED) - des numeros de familles des noeuds */ if (ret == 0) ret = MEDnoeudsEcr(fid,maa,mdim,coo,MED_FULL_INTERLACE,MED_CART, nomcoo,unicoo,nomnoe,MED_VRAI,numnoe,MED_VRAI, - nufano,nnoe); - printf("MEDnoeudsEcr : %d\n",ret); + nufano,nnoe,MED_ECRI); + printf("%d\n",ret); /* ecriture des mailles MED_QUAD4 : - connectivite @@ -122,18 +112,18 @@ int main (int argc, char **argv) if (ret == 0) ret = MEDelementsEcr(fid,maa,mdim,quad4,MED_FULL_INTERLACE, nomquad4,MED_FAUX,numquad4,MED_VRAI,nufaquad4,nquad4, - MED_MAILLE,MED_QUAD4,MED_NOD); - printf("MEDelementsEcr : %d\n",ret); + MED_MAILLE,MED_QUAD4,MED_NOD,MED_ECRI); + printf("%d \n",ret); /* ecriture des familles */ /* Conventions : - toujours creer une famille de numero 0 ne comportant aucun attribut - ni groupe (famille de reference pour les noeuds ou les elements - qui ne sont rattaches a aucun groupe ni attribut) + ni groupe (famille de reference pour les noeuds ou les elements + qui ne sont rattaches a aucun groupe ni attribut) - les numeros de familles de noeuds sont > 0 - les numeros de familles des elements sont < 0 - rien d'imposer sur les noms de familles - */ + */ /* la famille 0 */ if (ret == 0) @@ -143,7 +133,7 @@ int main (int argc, char **argv) ret = MEDfamCr(fid,maa,nomfam,numfam,&attide,&attval,attdes,0, gro,0); } - printf("MEDfamCr : %d \n",ret); + printf("%d \n",ret); /* on cree pour correspondre aux cas tests precedents, 3 familles d'elements (-1,-2,-3) et deux familles de noeuds (1,2) */ @@ -172,7 +162,7 @@ int main (int argc, char **argv) } } - if (ret == 0) + if (ret == 0) { nfamn = 2; for (i=0;i #include +#define MED_NOPG 1 /* -> pas de point de Gauss */ +#define MED_NOPFL "" /* -> pas de profils utilisateur */ +#define MED_NOPFLi " " /* Variable Interne */ +#define MED_NOPF 0 /* -> pas de profils pour _MEDdataseNnumEcrire */ +#define MED_NOPDT -1 /* rem: pas de pas de temps negatifs */ +#define MED_NONOR -1 /* rem: pas de n°ordre negatif */ +#define MED_DIM1 1 /* PAS */ + +#define MED_ALL 0 + int main (int argc, char **argv) { med_err ret; med_idt fid; char maa[MED_TAILLE_NOM+1] = "maa1"; - char maadesc[MED_TAILLE_DESC+1] = "Example de maillage non structure 3D"; med_int mdim = 3; med_int nnoe = 19; med_float coo[57] = { @@ -30,8 +39,8 @@ int main (int argc, char **argv) 1.0, -1.0, 4.0, 0.0, 0.0, 5.0 }; - char nomcoo[3*MED_TAILLE_PNOM+1] = "x y z "; - char unicoo[3*MED_TAILLE_PNOM+1] = "cm cm cm "; + char nomcoo[3*MED_TAILLE_PNOM+1] = "x y z "; + char unicoo[3*MED_TAILLE_PNOM+1] = "cm cm cm "; /* char nomnoe[19*MED_TAILLE_PNOM+1] = "nom1 nom2 nom3 nom4";*/ char *nomnoe ; med_int numnoe[19] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}; @@ -61,7 +70,7 @@ int main (int argc, char **argv) 7,8,9,10,2, 15,18,17,16,19 }; - char nompyra5[MED_TAILLE_PNOM*2+1] = "pyra1 pyra2 "; + char nompyra5[MED_TAILLE_PNOM*2+1] = "pyra1 pyra2 "; med_int numpyra5[2] = {13,16}; med_int nufapyra5[2] = {0,-3}; @@ -70,7 +79,7 @@ int main (int argc, char **argv) 11,12,13,14,7,8,9,10, 15,16,17,18,11,12,13,14 }; - char nomhexa8[MED_TAILLE_PNOM*2+1] = "hexa1 hexa2 "; + char nomhexa8[MED_TAILLE_PNOM*2+1] = "hexa1 hexa2 "; med_int numhexa8[2] = {14,15}; med_int nufahexa8[2] = {0,0}; @@ -93,32 +102,32 @@ int main (int argc, char **argv) Some fields : 2 on nodes : one int and one double , one on cells : double */ char champ1[MED_TAILLE_NOM+1]="fieldnodeint" ; - char champ1_comp[MED_TAILLE_PNOM+1]="comp1 " ; - char champ1_unit[MED_TAILLE_PNOM+1]="M " ; + char champ1_comp[MED_TAILLE_PNOM+1]="comp1 " ; + char champ1_unit[MED_TAILLE_PNOM+1]="M " ; med_int fieldnodeint[19] = {1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7}; char champ2[MED_TAILLE_NOM+1]="fieldnodedouble" ; - char champ2_comp[MED_TAILLE_PNOM+1]="comp1 " ; - char champ2_unit[MED_TAILLE_PNOM+1]="J " ; + char champ2_comp[MED_TAILLE_PNOM+1]="comp1 " ; + char champ2_unit[MED_TAILLE_PNOM+1]="J " ; med_float fieldnodedouble1[19] = {1.,1.,1.,2.,2.,2.,3.,3.,3.,4.,4.,4.,5.,5.,5.,6.,6.,6.,7.}; med_float fieldnodedouble2[19] = {1.,2.,2.,2.,3.,3.,3.,4.,4.,4.,5.,5.,5.,6.,6.,6.,7.,7.,7.}; char champ3[MED_TAILLE_NOM+1]="fieldcelldoublevector" ; - char champ3_comp[MED_TAILLE_PNOM*3+1]="comp1 comp2 comp3 " ; - char champ3_unit[MED_TAILLE_PNOM*3+1]="m/s m/s m/s " ; + char champ3_comp[MED_TAILLE_PNOM*3+1]="comp1 comp2 comp3 " ; + char champ3_unit[MED_TAILLE_PNOM*3+1]="m/s m/s m/s " ; med_float fieldcelldouble1[12*3] = {1.,1.,1.,2.,2.,2.,3.,3.,3.,4.,4.,4.,0.,0.,0.,1.,1.,1.,0.,0.,0.,1.,1.,1.,1.,1.,1.,0.,0.,0.,1.,1.,1.,0.,0.,0.}; med_float fieldcelldouble2[2*3] = {5.,5.,0.,1.,0.,1.}; med_float fieldcelldouble3[2*3] = {6.,6.,1.,0.,1.,0.}; char champ4[MED_TAILLE_NOM+1]="fieldcelldoublescalar" ; - char champ4_comp[MED_TAILLE_PNOM+1]="comp1 " ; - char champ4_unit[MED_TAILLE_PNOM+1]="m/s " ; + char champ4_comp[MED_TAILLE_PNOM+1]="comp1 " ; + char champ4_unit[MED_TAILLE_PNOM+1]="m/s " ; med_float fieldcelldouble4[12] = {1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.}; med_float fieldcelldouble5[2] = {2.,2.}; med_float fieldcelldouble6[2] = {3.,3.}; /***************************************************************************/ - fid = MEDouvrir("pointe.med",MED_LECTURE_ECRITURE); + fid = MEDouvrir("pointe.med",MED_REMP); if (fid < 0) ret = -1; else @@ -127,7 +136,7 @@ int main (int argc, char **argv) /***************************************************************************/ if (ret == 0) - ret = MEDmaaCr(fid,maa,mdim,MED_NON_STRUCTURE,maadesc); + ret = MEDmaaCr(fid,maa,mdim); printf("MEDmaaCr : %d\n",ret); if (ret == 0) ret = MEDunvCr(fid,maa); @@ -137,7 +146,7 @@ int main (int argc, char **argv) if (ret == 0) ret = MEDnoeudsEcr(fid,maa,mdim,coo,MED_FULL_INTERLACE,MED_CART, nomcoo,unicoo,nomnoe,MED_FAUX,numnoe,MED_VRAI, - nufano,nnoe); + nufano,nnoe,MED_ECRI); printf("MEDnoeudsEcr : %d\n",ret); @@ -150,7 +159,7 @@ int main (int argc, char **argv) if (ret == 0) ret = MEDelementsEcr(fid,maa,mdim,tet4,MED_FULL_INTERLACE, nomtet4,MED_FAUX,numtet4,MED_VRAI,nufatet4,ntet4, - MED_MAILLE,MED_TETRA4,MED_NOD); + MED_MAILLE,MED_TETRA4,MED_NOD,MED_ECRI); printf("MEDelementsEcr : %d \n",ret); /* ecriture des mailles MED_PYRA5 : @@ -161,7 +170,7 @@ int main (int argc, char **argv) if (ret == 0) ret = MEDelementsEcr(fid,maa,mdim,pyra5,MED_FULL_INTERLACE, nompyra5,MED_VRAI,numpyra5,MED_VRAI,nufapyra5,npyra5, - MED_MAILLE,MED_PYRA5,MED_NOD); + MED_MAILLE,MED_PYRA5,MED_NOD,MED_ECRI); printf("MEDelementsEcr : %d \n",ret); /* ecriture des mailles MED_HEXA8 : @@ -172,7 +181,7 @@ int main (int argc, char **argv) if (ret == 0) ret = MEDelementsEcr(fid,maa,mdim,hexa8,MED_FULL_INTERLACE, nomhexa8,MED_FAUX,numhexa8,MED_VRAI,nufahexa8,nhexa8, - MED_MAILLE,MED_HEXA8,MED_NOD); + MED_MAILLE,MED_HEXA8,MED_NOD,MED_ECRI); printf("MEDelementsEcr : %d \n",ret); /***************************************************************************/ @@ -294,9 +303,9 @@ int main (int argc, char **argv) printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ1, (unsigned char *)fieldnodeint, - MED_NO_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - MED_NOPDT," ", 0., MED_NONOR); + MED_NO_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); } @@ -304,78 +313,78 @@ int main (int argc, char **argv) if (ret == 0) { - ret = MEDchampCr(fid,champ2,MED_FLOAT64,champ2_comp,champ2_unit,1); + ret = MEDchampCr(fid,champ2,MED_REEL64,champ2_comp,champ2_unit,1); printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble1, - MED_NO_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - 1,"S ", 1.1 , MED_NONOR); + MED_NO_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, 1,"S ", 1.1 , MED_NONOR); printf("MEDchampEcr1 : %d \n",ret); ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble2, - MED_NO_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - 2,"S ", 1.2 , MED_NONOR); + MED_NO_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, 2,"S ", 1.2 , MED_NONOR); printf("MEDchampEcr2 : %d \n",ret); } } - // on met champ2 sans pas de temps pour pouvoir le lire aussi par defaut ! + /* on met champ2 sans pas de temps pour pouvoir le lire aussi par defaut !*/ if (ret == 0) { /* ret = MEDchampCr(fid,champ2,MED_REEL64,champ2_comp,champ2_unit,1); */ /* printf("MEDchampCr : %d \n",ret); */ if (ret == 0) { ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble1, - MED_NO_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - MED_NOPDT," ", 0. , MED_NONOR); + MED_NO_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, MED_NOPDT," ", 0. , MED_NONOR); printf("MEDchampEcr : %d \n",ret); } } if (ret == 0) { - ret = MEDchampCr(fid,champ3,MED_FLOAT64,champ3_comp,champ3_unit,3); + ret = MEDchampCr(fid,champ3,MED_REEL64,champ3_comp,champ3_unit,3); printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ3, (unsigned char *)fieldcelldouble1, - MED_NO_INTERLACE, ntet4, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_MAILLE, MED_TETRA4, - MED_NOPDT," ", 0., MED_NONOR); + MED_NO_INTERLACE, ntet4, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_MAILLE, + MED_TETRA4, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); ret = MEDchampEcr(fid, maa, champ3, (unsigned char *)fieldcelldouble3, - MED_NO_INTERLACE, nhexa8, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_MAILLE, MED_HEXA8, - MED_NOPDT," ", 0., MED_NONOR); + MED_NO_INTERLACE, nhexa8, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_MAILLE, + MED_HEXA8, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); ret = MEDchampEcr(fid, maa, champ3, (unsigned char *)fieldcelldouble2, - MED_NO_INTERLACE, npyra5, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_MAILLE, MED_PYRA5, - MED_NOPDT," ", 0., MED_NONOR); + MED_NO_INTERLACE, npyra5, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_MAILLE, + MED_PYRA5, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); } } if (ret == 0) { - ret = MEDchampCr(fid,champ4,MED_FLOAT64,champ4_comp,champ4_unit,1); + ret = MEDchampCr(fid,champ4,MED_REEL64,champ4_comp,champ4_unit,1); printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ4, (unsigned char *)fieldcelldouble4, - MED_NO_INTERLACE, ntet4, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_MAILLE, MED_TETRA4, - MED_NOPDT," ", 0., MED_NONOR); + MED_NO_INTERLACE, ntet4, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_MAILLE, + MED_TETRA4, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); ret = MEDchampEcr(fid, maa, champ4, (unsigned char *)fieldcelldouble6, - MED_NO_INTERLACE, nhexa8, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_MAILLE, MED_HEXA8, - MED_NOPDT," ", 0., MED_NONOR); + MED_NO_INTERLACE, nhexa8, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_MAILLE, + MED_HEXA8, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); ret = MEDchampEcr(fid, maa, champ4, (unsigned char *)fieldcelldouble5, - MED_NO_INTERLACE, npyra5, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_MAILLE, MED_PYRA5, - MED_NOPDT," ", 0., MED_NONOR); + MED_NO_INTERLACE, npyra5, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_MAILLE, + MED_PYRA5, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); } } diff --git a/src/MEDMEM/create_mesh_c2q4.c b/src/MEDMEM/create_mesh_c2q4.c index 011a38259..5639bfe08 100644 --- a/src/MEDMEM/create_mesh_c2q4.c +++ b/src/MEDMEM/create_mesh_c2q4.c @@ -14,7 +14,6 @@ int main (int argc, char **argv) med_err ret; med_idt fid; char maa[MED_TAILLE_NOM+1] = "carre_en_quad4"; - char maadesc[MED_TAILLE_DESC+1] = "Example de maillage non structure 2D"; med_int mdim = 2; med_int nnoe = 9; /* @@ -31,8 +30,8 @@ int main (int argc, char **argv) 0.5, 1.0, 1.0, 1.0 }; - char nomcoo[2*MED_TAILLE_PNOM+1] = "x y "; - char unicoo[2*MED_TAILLE_PNOM+1] = "cm cm "; + char nomcoo[2*MED_TAILLE_PNOM+1] = "x y "; + char unicoo[2*MED_TAILLE_PNOM+1] = "cm cm "; /* char nomnoe[19*MED_TAILLE_PNOM+1] = "nom1 nom2 nom3 nom4";*/ char *nomnoe ; med_int numnoe[9] = {1,2,3,4,5,6,7,8,9}; @@ -47,7 +46,7 @@ int main (int argc, char **argv) 7, 8, 5, 4, 8, 9, 6, 5 }; - char nomquad4[MED_TAILLE_PNOM*4+1] = "quad1 quad2 quad3 quad4 "; + char nomquad4[MED_TAILLE_PNOM*4+1] = "quad1 quad2 quad3 quad4 "; med_int numquad4[4] = {1,2,3,4}; med_int nufaquad4[4] = {-1,-1,0,0}; @@ -67,43 +66,43 @@ int main (int argc, char **argv) Some fields : 2 on nodes : one int and one double , one on cells : double */ char champ1[MED_TAILLE_NOM+1]="fieldnodeint" ; - char champ1_comp[MED_TAILLE_PNOM+1]="comp1 " ; - char champ1_unit[MED_TAILLE_PNOM+1]="M " ; + char champ1_comp[MED_TAILLE_PNOM+1]="comp1 " ; + char champ1_unit[MED_TAILLE_PNOM+1]="M " ; med_int fieldnodeint[9] = {1,1,3,2,2,3,4,4,5}; char champ2[MED_TAILLE_NOM+1]="fieldnodedouble" ; - char champ2_comp[MED_TAILLE_PNOM+1]="comp1 " ; - char champ2_unit[MED_TAILLE_PNOM+1]="J " ; + char champ2_comp[MED_TAILLE_PNOM+1]="comp1 " ; + char champ2_unit[MED_TAILLE_PNOM+1]="J " ; med_float fieldnodedouble1[9] = {1.,3.,4.,1.,3.,4.,3.,2.,5.}; med_float fieldnodedouble2[9] = {1.,2.,2.,3.,3.,3.,4.,4.,5.}; char champ3[MED_TAILLE_NOM+1]="fieldcelldouble" ; - char champ3_comp[MED_TAILLE_PNOM*2+1]="comp1 comp2 " ; - char champ3_unit[MED_TAILLE_PNOM*2+1]="M/S m/s " ; + char champ3_comp[MED_TAILLE_PNOM*2+1]="comp1 comp2 " ; + char champ3_unit[MED_TAILLE_PNOM*2+1]="M/S m/s " ; med_float fieldcelldouble[4*2] = {0.,1.,1.,1.,1.,2.,2.,3.}; /***************************************************************************/ - fid = MEDouvrir("carre_en_quad4.med",MED_LECTURE_ECRITURE); + fid = MEDouvrir("carre_en_quad4.med",MED_REMP); if (fid < 0) ret = -1; else ret = 0; - printf("MEDouvrir : %d\n",ret); + printf("%d\n",ret); /***************************************************************************/ if (ret == 0) - ret = MEDmaaCr(fid,maa,mdim,MED_NON_STRUCTURE,maadesc); - printf("MEDmaaCr : %d\n",ret); + ret = MEDmaaCr(fid,maa,mdim); + printf("%d\n",ret); if (ret == 0) ret = MEDunvCr(fid,maa); - printf("MEDunvCr : %d\n",ret); + printf("%d\n",ret); /***************************************************************************/ if (ret == 0) ret = MEDnoeudsEcr(fid,maa,mdim,coo,MED_FULL_INTERLACE,MED_CART, nomcoo,unicoo,nomnoe,MED_FAUX,numnoe,MED_VRAI, - nufano,nnoe); - printf("MEDnoeudsEcr : %d\n",ret); + nufano,nnoe,MED_ECRI); + printf("%d\n",ret); /* ecriture des mailles MED_QUAD4 : - connectivite @@ -113,8 +112,8 @@ int main (int argc, char **argv) if (ret == 0) ret = MEDelementsEcr(fid,maa,mdim,quad4,MED_FULL_INTERLACE, nomquad4,MED_FAUX,numquad4,MED_VRAI,nufaquad4,nquad4, - MED_MAILLE,MED_QUAD4,MED_NOD); - printf("MEDelementsEcr : %d \n",ret); + MED_MAILLE,MED_QUAD4,MED_NOD,MED_ECRI); + printf("%d \n",ret); /***************************************************************************/ /* ecriture des familles */ @@ -135,7 +134,7 @@ int main (int argc, char **argv) ret = MEDfamCr(fid,maa,nomfam,numfam,&attide,&attval,attdes,0, gro,0); } - printf("MEDfamCr : %d \n",ret); + printf("%d \n",ret); /* on cree : - 1 familles d'elements de dimension (d) @@ -168,9 +167,9 @@ int main (int argc, char **argv) printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ1, (unsigned char *)fieldnodeint, - MED_NO_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - MED_NOPDT," ", 0., MED_NONOR); + MED_NO_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); } @@ -178,41 +177,41 @@ int main (int argc, char **argv) if (ret == 0) { - ret = MEDchampCr(fid,champ2,MED_FLOAT64,champ2_comp,champ2_unit,1); + ret = MEDchampCr(fid,champ2,MED_REEL64,champ2_comp,champ2_unit,1); printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble1, - MED_NO_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - 1,"S ", 1.1 , MED_NONOR); + MED_NO_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, 1,"S ", 1.1 , MED_NONOR); printf("MEDchampEcr1 : %d \n",ret); ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble2, - MED_NO_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - 2,"S ", 1.2 , MED_NONOR); + MED_NO_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, 2,"S ", 1.2 , MED_NONOR); printf("MEDchampEcr2 : %d \n",ret); } } - // on met champ2 sans pas de temps pour pouvoir le lire aussi par defaut ! + /* on met champ2 sans pas de temps pour pouvoir le lire aussi par defaut ! */ if (ret == 0) { ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble1, - MED_NO_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - MED_NOPDT," ", 0. , MED_NONOR); + MED_NO_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, MED_NOPDT," ", 0. , MED_NONOR); printf("MEDchampEcr : %d \n",ret); } if (ret == 0) { - ret = MEDchampCr(fid,champ3,MED_FLOAT64,champ3_comp,champ3_unit,2); + ret = MEDchampCr(fid,champ3,MED_REEL64,champ3_comp,champ3_unit,2); printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ3, (unsigned char *)fieldcelldouble, - MED_NO_INTERLACE, nquad4, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_MAILLE, MED_QUAD4, - MED_NOPDT," ", 0., MED_NONOR); + MED_NO_INTERLACE, nquad4, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_MAILLE, + MED_QUAD4, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); } } @@ -220,7 +219,7 @@ int main (int argc, char **argv) /***************************************************************************/ ret = MEDfermer(fid); - printf("MEDfermer : %d\n",ret); + printf("%d\n",ret); return 0; } diff --git a/src/MEDMEM/create_mesh_c2q4s2.c b/src/MEDMEM/create_mesh_c2q4s2.c index bc899cac4..f57a3996d 100644 --- a/src/MEDMEM/create_mesh_c2q4s2.c +++ b/src/MEDMEM/create_mesh_c2q4s2.c @@ -14,7 +14,6 @@ int main (int argc, char **argv) med_err ret; med_idt fid; char maa[MED_TAILLE_NOM+1] = "carre_en_quad4_seg2"; - char maadesc[MED_TAILLE_DESC+1] = "Example de maillage non structure 2D"; med_int mdim = 2; med_int nnoe = 9; /* @@ -31,8 +30,8 @@ int main (int argc, char **argv) 0.5, 1.0, 1.0, 1.0 }; - char nomcoo[2*MED_TAILLE_PNOM+1] = "x y "; - char unicoo[2*MED_TAILLE_PNOM+1] = "cm cm "; + char nomcoo[2*MED_TAILLE_PNOM+1] = "x y "; + char unicoo[2*MED_TAILLE_PNOM+1] = "cm cm "; /* char nomnoe[19*MED_TAILLE_PNOM+1] = "nom1 nom2 nom3 nom4";*/ char *nomnoe ; med_int numnoe[9] = {1,2,3,4,5,6,7,8,9}; @@ -47,7 +46,7 @@ int main (int argc, char **argv) 7, 8, 5, 4, 8, 9, 6, 5 }; - char nomquad4[MED_TAILLE_PNOM*4+1] = "quad1 quad2 quad3 quad4 "; + char nomquad4[MED_TAILLE_PNOM*4+1] = "quad1 quad2 quad3 quad4 "; med_int numquad4[4] = {1,2,3,4}; med_int nufaquad4[4] = {-10,-10,0,0}; @@ -64,7 +63,7 @@ int main (int argc, char **argv) 2, 5, 5, 8 }; - char nomseg2[MED_TAILLE_PNOM*6+1] = "seg1 seg2 seg3 seg4 seg5 seg6 "; + char nomseg2[MED_TAILLE_PNOM*6+1] = "seg1 seg2 seg3 seg4 seg5 seg6 "; med_int numseg2[6] = {1,2,3,4,5,6}; med_int nufaseg2[6] = {-1,-2,-1,-1,-2,-2}; @@ -84,43 +83,43 @@ int main (int argc, char **argv) Some fields : 2 on nodes : one int and one double , one on cells : double */ char champ1[MED_TAILLE_NOM+1]="fieldnodeint" ; - char champ1_comp[MED_TAILLE_PNOM+1]="comp1 " ; - char champ1_unit[MED_TAILLE_PNOM+1]="M " ; + char champ1_comp[MED_TAILLE_PNOM+1]="comp1 " ; + char champ1_unit[MED_TAILLE_PNOM+1]="M " ; med_int fieldnodeint[9] = {1,1,3,2,2,3,4,4,5}; char champ2[MED_TAILLE_NOM+1]="fieldnodedouble" ; - char champ2_comp[MED_TAILLE_PNOM+1]="comp1 " ; - char champ2_unit[MED_TAILLE_PNOM+1]="J " ; + char champ2_comp[MED_TAILLE_PNOM+1]="comp1 " ; + char champ2_unit[MED_TAILLE_PNOM+1]="J " ; med_float fieldnodedouble1[9] = {1.,3.,4.,1.,3.,4.,3.,2.,5.}; med_float fieldnodedouble2[9] = {1.,2.,2.,3.,3.,3.,4.,4.,5.}; char champ3[MED_TAILLE_NOM+1]="fieldcelldouble" ; - char champ3_comp[MED_TAILLE_PNOM*2+1]="comp1 comp2 " ; - char champ3_unit[MED_TAILLE_PNOM*2+1]="M/S m/s " ; + char champ3_comp[MED_TAILLE_PNOM*2+1]="comp1 comp2 " ; + char champ3_unit[MED_TAILLE_PNOM*2+1]="M/S m/s " ; med_float fieldcelldouble[4*2] = {0.,1.,1.,1.,1.,2.,2.,3.}; /***************************************************************************/ - fid = MEDouvrir("carre_en_quad4_seg2.med",MED_LECTURE_ECRITURE); + fid = MEDouvrir("carre_en_quad4_seg2.med",MED_REMP); if (fid < 0) ret = -1; else ret = 0; - printf("MEDouvrir : %d\n",ret); + printf("%d\n",ret); /***************************************************************************/ if (ret == 0) - ret = MEDmaaCr(fid,maa,mdim,MED_NON_STRUCTURE,maadesc); - printf("MEDmaaCr : %d\n",ret); + ret = MEDmaaCr(fid,maa,mdim); + printf("%d\n",ret); if (ret == 0) ret = MEDunvCr(fid,maa); - printf("MEDunvCr : %d\n",ret); + printf("%d\n",ret); /***************************************************************************/ if (ret == 0) ret = MEDnoeudsEcr(fid,maa,mdim,coo,MED_FULL_INTERLACE,MED_CART, nomcoo,unicoo,nomnoe,MED_FAUX,numnoe,MED_VRAI, - nufano,nnoe); - printf("MEDnoeudsEcr : %d\n",ret); + nufano,nnoe,MED_ECRI); + printf("%d\n",ret); /* ecriture des mailles MED_QUAD4 : - connectivite @@ -130,8 +129,8 @@ int main (int argc, char **argv) if (ret == 0) ret = MEDelementsEcr(fid,maa,mdim,quad4,MED_FULL_INTERLACE, nomquad4,MED_FAUX,numquad4,MED_VRAI,nufaquad4,nquad4, - MED_MAILLE,MED_QUAD4,MED_NOD); - printf("MEDelementsEcr : %d \n",ret); + MED_MAILLE,MED_QUAD4,MED_NOD,MED_ECRI); + printf("%d \n",ret); /* ecriture des mailles MED_SEG2 : - connectivite @@ -141,8 +140,8 @@ int main (int argc, char **argv) if (ret == 0) ret = MEDelementsEcr(fid,maa,mdim,seg2,MED_FULL_INTERLACE, nomseg2,MED_FAUX,numseg2,MED_VRAI,nufaseg2,nseg2, - MED_ARETE,MED_SEG2,MED_NOD); - printf("MEDelementsEcr : %d \n",ret); + MED_ARETE,MED_SEG2,MED_NOD,MED_ECRI); + printf("%d \n",ret); /***************************************************************************/ /* ecriture des familles */ @@ -232,9 +231,9 @@ int main (int argc, char **argv) printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ1, (unsigned char *)fieldnodeint, - MED_NO_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - MED_NOPDT," ", 0., MED_NONOR); + MED_NO_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); } @@ -242,41 +241,41 @@ int main (int argc, char **argv) if (ret == 0) { - ret = MEDchampCr(fid,champ2,MED_FLOAT64,champ2_comp,champ2_unit,1); + ret = MEDchampCr(fid,champ2,MED_REEL64,champ2_comp,champ2_unit,1); printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble1, - MED_NO_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - 1,"S ", 1.1 , MED_NONOR); + MED_NO_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, 1,"S ", 1.1 , MED_NONOR); printf("MEDchampEcr1 : %d \n",ret); ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble2, - MED_NO_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - 2,"S ", 1.2 , MED_NONOR); + MED_NO_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, 2,"S ", 1.2 , MED_NONOR); printf("MEDchampEcr2 : %d \n",ret); } } - // on met champ2 sans pas de temps pour pouvoir le lire aussi par defaut ! + /* on met champ2 sans pas de temps pour pouvoir le lire aussi par defaut !*/ if (ret == 0) { ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble1, - MED_NO_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - MED_NOPDT," ", 0. , MED_NONOR); + MED_NO_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, MED_NOPDT," ", 0. , MED_NONOR); printf("MEDchampEcr : %d \n",ret); } if (ret == 0) { - ret = MEDchampCr(fid,champ3,MED_FLOAT64,champ3_comp,champ3_unit,2); + ret = MEDchampCr(fid,champ3,MED_REEL64,champ3_comp,champ3_unit,2); printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ3, (unsigned char *)fieldcelldouble, - MED_NO_INTERLACE, nquad4, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_MAILLE, MED_QUAD4, - MED_NOPDT," ", 0., MED_NONOR); + MED_NO_INTERLACE, nquad4, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_MAILLE, + MED_QUAD4, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); } } diff --git a/src/MEDMEM/create_mesh_c2q4s2_wrong.c b/src/MEDMEM/create_mesh_c2q4s2_wrong.c index 65812328a..b25fd727e 100644 --- a/src/MEDMEM/create_mesh_c2q4s2_wrong.c +++ b/src/MEDMEM/create_mesh_c2q4s2_wrong.c @@ -14,7 +14,6 @@ int main (int argc, char **argv) med_err ret; med_idt fid; char maa[MED_TAILLE_NOM+1] = "carre_en_quad4_seg2_wrong"; - char maadesc[MED_TAILLE_DESC+1] = "Example de maillage non structure 2D"; med_int mdim = 2; med_int nnoe = 9; /* @@ -31,8 +30,8 @@ int main (int argc, char **argv) 0.5, 1.0, 1.0, 1.0 }; - char nomcoo[2*MED_TAILLE_PNOM+1] = "x y "; - char unicoo[2*MED_TAILLE_PNOM+1] = "cm cm "; + char nomcoo[2*MED_TAILLE_PNOM+1] = "x y "; + char unicoo[2*MED_TAILLE_PNOM+1] = "cm cm "; /* char nomnoe[19*MED_TAILLE_PNOM+1] = "nom1 nom2 nom3 nom4";*/ char *nomnoe ; med_int numnoe[9] = {1,2,3,4,5,6,7,8,9}; @@ -47,7 +46,7 @@ int main (int argc, char **argv) 7, 8, 5, 4, 8, 9, 6, 5 }; - char nomquad4[MED_TAILLE_PNOM*4+1] = "quad1 quad2 quad3 quad4 "; + char nomquad4[MED_TAILLE_PNOM*4+1] = "quad1 quad2 quad3 quad4 "; med_int numquad4[4] = {1,2,3,4}; med_int nufaquad4[4] = {-10,-10,0,0}; @@ -68,7 +67,7 @@ int main (int argc, char **argv) 2, 5, 5, 8 }; - char nomseg2[MED_TAILLE_PNOM*6+1] = "seg1 seg2 seg3 seg4 seg5 seg6 "; + char nomseg2[MED_TAILLE_PNOM*6+1] = "seg1 seg2 seg3 seg4 seg5 seg6 "; med_int numseg2[6] = {1,2,3,4,5,6}; med_int nufaseg2[6] = {-1,-2,-1,-1,-2,-2}; @@ -88,43 +87,43 @@ int main (int argc, char **argv) Some fields : 2 on nodes : one int and one double , one on cells : double */ char champ1[MED_TAILLE_NOM+1]="fieldnodeint" ; - char champ1_comp[MED_TAILLE_PNOM+1]="comp1 " ; - char champ1_unit[MED_TAILLE_PNOM+1]="M " ; + char champ1_comp[MED_TAILLE_PNOM+1]="comp1 " ; + char champ1_unit[MED_TAILLE_PNOM+1]="M " ; med_int fieldnodeint[9] = {1,1,3,2,2,3,4,4,5}; char champ2[MED_TAILLE_NOM+1]="fieldnodedouble" ; - char champ2_comp[MED_TAILLE_PNOM+1]="comp1 " ; - char champ2_unit[MED_TAILLE_PNOM+1]="J " ; + char champ2_comp[MED_TAILLE_PNOM+1]="comp1 " ; + char champ2_unit[MED_TAILLE_PNOM+1]="J " ; med_float fieldnodedouble1[9] = {1.,3.,4.,1.,3.,4.,3.,2.,5.}; med_float fieldnodedouble2[9] = {1.,2.,2.,3.,3.,3.,4.,4.,5.}; char champ3[MED_TAILLE_NOM+1]="fieldcelldouble" ; - char champ3_comp[MED_TAILLE_PNOM*2+1]="comp1 comp2 " ; - char champ3_unit[MED_TAILLE_PNOM*2+1]="M/S m/s " ; + char champ3_comp[MED_TAILLE_PNOM*2+1]="comp1 comp2 " ; + char champ3_unit[MED_TAILLE_PNOM*2+1]="M/S m/s " ; med_float fieldcelldouble[4*2] = {0.,1.,1.,1.,1.,2.,2.,3.}; /***************************************************************************/ - fid = MEDouvrir("carre_en_quad4_seg2_wrong.med",MED_LECTURE_ECRITURE); + fid = MEDouvrir("carre_en_quad4_seg2_wrong.med",MED_REMP); if (fid < 0) ret = -1; else ret = 0; - printf("MEDouvrir : %d\n",ret); + printf("%d\n",ret); /***************************************************************************/ if (ret == 0) - ret = MEDmaaCr(fid,maa,mdim,MED_NON_STRUCTURE,maadesc); - printf("MEDmaaCr : %d\n",ret); + ret = MEDmaaCr(fid,maa,mdim); + printf("%d\n",ret); if (ret == 0) ret = MEDunvCr(fid,maa); - printf("MEDunvCr : %d\n",ret); + printf("%d\n",ret); /***************************************************************************/ if (ret == 0) ret = MEDnoeudsEcr(fid,maa,mdim,coo,MED_FULL_INTERLACE,MED_CART, nomcoo,unicoo,nomnoe,MED_FAUX,numnoe,MED_VRAI, - nufano,nnoe); - printf("MEDnoeudsEcr : %d\n",ret); + nufano,nnoe,MED_ECRI); + printf("%d\n",ret); /* ecriture des mailles MED_QUAD4 : - connectivite @@ -134,8 +133,8 @@ int main (int argc, char **argv) if (ret == 0) ret = MEDelementsEcr(fid,maa,mdim,quad4,MED_FULL_INTERLACE, nomquad4,MED_FAUX,numquad4,MED_VRAI,nufaquad4,nquad4, - MED_MAILLE,MED_QUAD4,MED_NOD); - printf("MEDelementsEcr : %d \n",ret); + MED_MAILLE,MED_QUAD4,MED_NOD,MED_ECRI); + printf("%d \n",ret); /* ecriture des mailles MED_SEG2 : - connectivite @@ -145,8 +144,8 @@ int main (int argc, char **argv) if (ret == 0) ret = MEDelementsEcr(fid,maa,mdim,seg2,MED_FULL_INTERLACE, nomseg2,MED_FAUX,numseg2,MED_VRAI,nufaseg2,nseg2, - MED_ARETE,MED_SEG2,MED_NOD); - printf("MEDelementsEcr : %d \n",ret); + MED_ARETE,MED_SEG2,MED_NOD,MED_ECRI); + printf("%d \n",ret); /***************************************************************************/ /* ecriture des familles */ @@ -236,9 +235,9 @@ int main (int argc, char **argv) printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ1, (unsigned char *)fieldnodeint, - MED_NO_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - MED_NOPDT," ", 0., MED_NONOR); + MED_NO_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); } @@ -246,41 +245,41 @@ int main (int argc, char **argv) if (ret == 0) { - ret = MEDchampCr(fid,champ2,MED_FLOAT64,champ2_comp,champ2_unit,1); + ret = MEDchampCr(fid,champ2,MED_REEL64,champ2_comp,champ2_unit,1); printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble1, - MED_NO_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - 1,"S ", 1.1 , MED_NONOR); + MED_NO_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, 1,"S ", 1.1 , MED_NONOR); printf("MEDchampEcr1 : %d \n",ret); ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble2, - MED_NO_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - 2,"S ", 1.2 , MED_NONOR); + MED_NO_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, 2,"S ", 1.2 , MED_NONOR); printf("MEDchampEcr2 : %d \n",ret); } } - // on met champ2 sans pas de temps pour pouvoir le lire aussi par defaut ! + /* on met champ2 sans pas de temps pour pouvoir le lire aussi par defaut !*/ if (ret == 0) { ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble1, - MED_NO_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - MED_NOPDT," ", 0. , MED_NONOR); + MED_NO_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, MED_NOPDT," ", 0. , MED_NONOR); printf("MEDchampEcr : %d \n",ret); } if (ret == 0) { - ret = MEDchampCr(fid,champ3,MED_FLOAT64,champ3_comp,champ3_unit,2); + ret = MEDchampCr(fid,champ3,MED_REEL64,champ3_comp,champ3_unit,2); printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ3, (unsigned char *)fieldcelldouble, - MED_NO_INTERLACE, nquad4, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_MAILLE, MED_QUAD4, - MED_NOPDT," ", 0., MED_NONOR); + MED_NO_INTERLACE, nquad4, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_MAILLE, + MED_QUAD4, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); } } diff --git a/src/MEDMEM/create_mesh_c3h8.c b/src/MEDMEM/create_mesh_c3h8.c index 8cd1adeba..c172f97a1 100644 --- a/src/MEDMEM/create_mesh_c3h8.c +++ b/src/MEDMEM/create_mesh_c3h8.c @@ -14,7 +14,6 @@ int main (int argc, char **argv) med_err ret; med_idt fid; char maa[MED_TAILLE_NOM+1] = "CUBE_EN_HEXA8"; - char maadesc[MED_TAILLE_DESC+1] = "Example de maillage non structure 3D"; med_int mdim = 3; med_int nnoe = 27; /* @@ -49,8 +48,8 @@ int main (int argc, char **argv) 0.5, 1.0, 1.0, 1.0, 1.0, 1.0 }; - char nomcoo[3*MED_TAILLE_PNOM+1] = "x y z "; - char unicoo[3*MED_TAILLE_PNOM+1] = "cm cm cm "; + char nomcoo[3*MED_TAILLE_PNOM+1] = "x y z "; + char unicoo[3*MED_TAILLE_PNOM+1] = "cm cm cm "; /* char nomnoe[19*MED_TAILLE_PNOM+1] = "nom1 nom2 nom3 nom4";*/ char *nomnoe ; med_int numnoe[27] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27}; @@ -69,7 +68,7 @@ int main (int argc, char **argv) 16, 25, 26, 17, 13, 22, 23, 14, 17, 26, 27, 18, 14, 23, 24, 15 }; - char nomhexa8[MED_TAILLE_PNOM*8+1] = "hexa1 hexa2 hexa3 hexa4 hexa5 hexa6 hexa7 hexa8 "; + char nomhexa8[MED_TAILLE_PNOM*8+1] = "hexa1 hexa2 hexa3 hexa4 hexa5 hexa6 hexa7 hexa8 "; med_int numhexa8[8] = {1,2,3,4,5,6,7,8}; med_int nufahexa8[8] = {-1,-1,-1,-1,-2,-2,-2,-2}; @@ -91,43 +90,43 @@ int main (int argc, char **argv) */ char champ1[MED_TAILLE_NOM+1]="fieldnodeint" ; - char champ1_comp[MED_TAILLE_PNOM+1]="comp1 " ; - char champ1_unit[MED_TAILLE_PNOM+1]="M " ; + char champ1_comp[MED_TAILLE_PNOM+1]="comp1 " ; + char champ1_unit[MED_TAILLE_PNOM+1]="M " ; med_int fieldnodeint[27] = {1,1,3,2,2,3,4,4,5,1,1,3,2,2,3,4,4,5,1,1,3,2,2,3,4,4,5}; char champ2[MED_TAILLE_NOM+1]="fieldnodedouble" ; - char champ2_comp[MED_TAILLE_PNOM+1]="comp1 " ; - char champ2_unit[MED_TAILLE_PNOM+1]="J " ; + char champ2_comp[MED_TAILLE_PNOM+1]="comp1 " ; + char champ2_unit[MED_TAILLE_PNOM+1]="J " ; med_float fieldnodedouble1[27] = {1.,3.,4.,1.,3.,4.,3.,2.,5.,1.,3.,4.,1.,3.,4.,3.,2.,5.,1.,3.,4.,1.,3.,4.,3.,2.,5.}; med_float fieldnodedouble2[27] = {1.,2.,2.,3.,3.,3.,4.,4.,5.,1.,2.,2.,3.,3.,3.,4.,4.,5.,1.,2.,2.,3.,3.,3.,4.,4.,5.}; char champ3[MED_TAILLE_NOM+1]="fieldcelldouble" ; - char champ3_comp[MED_TAILLE_PNOM*3+1]="comp1 comp2 comp3 " ; - char champ3_unit[MED_TAILLE_PNOM*3+1]="M/S m/s m/s " ; + char champ3_comp[MED_TAILLE_PNOM*3+1]="comp1 comp2 comp3 " ; + char champ3_unit[MED_TAILLE_PNOM*3+1]="M/S m/s m/s " ; med_float fieldcelldouble[8*3] = {0.,1.,1.,1.,1.,2.,2.,3.,0.,1.,1.,1.,1.,2.,2.,3.,0.,1.,1.,1.,1.,2.,2.,3.}; /***************************************************************************/ - fid = MEDouvrir("cube_hexa8.med",MED_LECTURE_ECRITURE); + fid = MEDouvrir("cube_hexa8.med",MED_REMP); if (fid < 0) ret = -1; else ret = 0; - printf("MEDouvrir : %d\n",ret); + printf("%d\n",ret); /***************************************************************************/ if (ret == 0) - ret = MEDmaaCr(fid,maa,mdim,MED_NON_STRUCTURE,maadesc); - printf("MEDmaaCr : %d\n",ret); + ret = MEDmaaCr(fid,maa,mdim); + printf("%d\n",ret); if (ret == 0) ret = MEDunvCr(fid,maa); - printf("MEDunvCr : %d\n",ret); + printf("%d\n",ret); /***************************************************************************/ if (ret == 0) ret = MEDnoeudsEcr(fid,maa,mdim,coo,MED_FULL_INTERLACE,MED_CART, nomcoo,unicoo,nomnoe,MED_FAUX,numnoe,MED_VRAI, - nufano,nnoe); - printf("MEDnoeudsEcr : %d\n",ret); + nufano,nnoe,MED_ECRI); + printf("%d\n",ret); /* ecriture des mailles MED_HEXA8 : - connectivite @@ -137,8 +136,8 @@ int main (int argc, char **argv) if (ret == 0) ret = MEDelementsEcr(fid,maa,mdim,hexa8,MED_FULL_INTERLACE, nomhexa8,MED_FAUX,numhexa8,MED_VRAI,nufahexa8,nhexa8, - MED_MAILLE,MED_HEXA8,MED_NOD); - printf("MEDelementsEcr : %d \n",ret); + MED_MAILLE,MED_HEXA8,MED_NOD,MED_ECRI); + printf("%d \n",ret); /***************************************************************************/ /* ecriture des familles */ @@ -225,9 +224,9 @@ int main (int argc, char **argv) printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ1, (unsigned char *)fieldnodeint, - MED_FULL_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - MED_NOPDT," ", 0., MED_NONOR); + MED_FULL_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); } @@ -235,41 +234,41 @@ int main (int argc, char **argv) if (ret == 0) { - ret = MEDchampCr(fid,champ2,MED_FLOAT64,champ2_comp,champ2_unit,1); + ret = MEDchampCr(fid,champ2,MED_REEL64,champ2_comp,champ2_unit,1); printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble1, - MED_FULL_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - 1,"S ", 1.1 , MED_NONOR); + MED_FULL_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, 1,"S ", 1.1 , MED_NONOR); printf("MEDchampEcr1 : %d \n",ret); ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble2, - MED_FULL_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - 2,"S ", 1.2 , MED_NONOR); + MED_FULL_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, 2,"S ", 1.2 , MED_NONOR); printf("MEDchampEcr2 : %d \n",ret); } } - // on met champ2 sans pas de temps pour pouvoir le lire aussi par defaut ! + /* on met champ2 sans pas de temps pour pouvoir le lire aussi par defaut !*/ if (ret == 0) { ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble1, - MED_FULL_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - MED_NOPDT," ", 0. , MED_NONOR); + MED_FULL_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, MED_NOPDT," ", 0. , MED_NONOR); printf("MEDchampEcr : %d \n",ret); } if (ret == 0) { - ret = MEDchampCr(fid,champ3,MED_FLOAT64,champ3_comp,champ3_unit,3); + ret = MEDchampCr(fid,champ3,MED_REEL64,champ3_comp,champ3_unit,3); printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ3, (unsigned char *)fieldcelldouble, - MED_FULL_INTERLACE, nhexa8, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_MAILLE, MED_HEXA8, - MED_NOPDT," ", 0., MED_NONOR); + MED_FULL_INTERLACE, nhexa8, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_MAILLE, + MED_HEXA8, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); } } diff --git a/src/MEDMEM/create_mesh_c3h8q4.c b/src/MEDMEM/create_mesh_c3h8q4.c index f1ecfa234..fae981737 100644 --- a/src/MEDMEM/create_mesh_c3h8q4.c +++ b/src/MEDMEM/create_mesh_c3h8q4.c @@ -14,7 +14,6 @@ int main (int argc, char **argv) med_err ret; med_idt fid; char maa[MED_TAILLE_NOM+1] = "CUBE_EN_HEXA8_QUAD4"; - char maadesc[MED_TAILLE_DESC+1] = "Example de maillage non structure 3D"; med_int mdim = 3; med_int nnoe = 27; /* @@ -49,8 +48,8 @@ int main (int argc, char **argv) 0.5, 1.0, 1.0, 1.0, 1.0, 1.0 }; - char nomcoo[3*MED_TAILLE_PNOM+1] = "x y z "; - char unicoo[3*MED_TAILLE_PNOM+1] = "cm cm cm "; + char nomcoo[3*MED_TAILLE_PNOM+1] = "x y z "; + char unicoo[3*MED_TAILLE_PNOM+1] = "cm cm cm "; /* char nomnoe[19*MED_TAILLE_PNOM+1] = "nom1 nom2 nom3 nom4";*/ char *nomnoe ; med_int numnoe[27] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27}; @@ -69,7 +68,7 @@ int main (int argc, char **argv) 16, 25, 26, 17, 13, 22, 23, 14, 17, 26, 27, 18, 14, 23, 24, 15 }; - char nomhexa8[MED_TAILLE_PNOM*8+1] = "hexa1 hexa2 hexa3 hexa4 hexa5 hexa6 hexa7 hexa8 "; + char nomhexa8[MED_TAILLE_PNOM*8+1] = "hexa1 hexa2 hexa3 hexa4 hexa5 hexa6 hexa7 hexa8 "; med_int numhexa8[8] = {1,2,3,4,5,6,7,8}; med_int nufahexa8[8] = {-1,-1,-1,-1,-2,-2,-2,-2}; @@ -89,7 +88,7 @@ int main (int argc, char **argv) 7, 8, 5, 4 }; - char nomquad4[MED_TAILLE_PNOM*8+1] = "quad1 quad2 quad3 quad4 quad5 quad6 quad7 quad8 "; + char nomquad4[MED_TAILLE_PNOM*8+1] = "quad1 quad2 quad3 quad4 quad5 quad6 quad7 quad8 "; med_int numquad4[8] = {1,2,3,4,5,6,7,8}; med_int nufaquad4[8] = {-3,-3,-3,-3,-4, -4, -4 , -4}; @@ -111,43 +110,43 @@ int main (int argc, char **argv) */ char champ1[MED_TAILLE_NOM+1]="fieldnodeint" ; - char champ1_comp[MED_TAILLE_PNOM+1]="comp1 " ; - char champ1_unit[MED_TAILLE_PNOM+1]="M " ; + char champ1_comp[MED_TAILLE_PNOM+1]="comp1 " ; + char champ1_unit[MED_TAILLE_PNOM+1]="M " ; med_int fieldnodeint[27] = {1,1,3,2,2,3,4,4,5,1,1,3,2,2,3,4,4,5,1,1,3,2,2,3,4,4,5}; char champ2[MED_TAILLE_NOM+1]="fieldnodedouble" ; - char champ2_comp[MED_TAILLE_PNOM+1]="comp1 " ; - char champ2_unit[MED_TAILLE_PNOM+1]="J " ; + char champ2_comp[MED_TAILLE_PNOM+1]="comp1 " ; + char champ2_unit[MED_TAILLE_PNOM+1]="J " ; med_float fieldnodedouble1[27] = {1.,3.,4.,1.,3.,4.,3.,2.,5.,1.,3.,4.,1.,3.,4.,3.,2.,5.,1.,3.,4.,1.,3.,4.,3.,2.,5.}; med_float fieldnodedouble2[27] = {1.,2.,2.,3.,3.,3.,4.,4.,5.,1.,2.,2.,3.,3.,3.,4.,4.,5.,1.,2.,2.,3.,3.,3.,4.,4.,5.}; char champ3[MED_TAILLE_NOM+1]="fieldcelldouble" ; - char champ3_comp[MED_TAILLE_PNOM*3+1]="comp1 comp2 comp3 " ; - char champ3_unit[MED_TAILLE_PNOM*3+1]="M/S m/s m/s " ; + char champ3_comp[MED_TAILLE_PNOM*3+1]="comp1 comp2 comp3 " ; + char champ3_unit[MED_TAILLE_PNOM*3+1]="M/S m/s m/s " ; med_float fieldcelldouble[8*3] = {0.,1.,1.,1.,1.,2.,2.,3.,0.,1.,1.,1.,1.,2.,2.,3.,0.,1.,1.,1.,1.,2.,2.,3.}; /***************************************************************************/ - fid = MEDouvrir("cube_hexa8_quad4.med",MED_LECTURE_ECRITURE); + fid = MEDouvrir("cube_hexa8_quad4.med",MED_REMP); if (fid < 0) ret = -1; else ret = 0; - printf("MEDouvrir : %d\n",ret); + printf("%d\n",ret); /***************************************************************************/ if (ret == 0) - ret = MEDmaaCr(fid,maa,mdim,MED_NON_STRUCTURE,maadesc); - printf("MEDmaaCr : %d\n",ret); + ret = MEDmaaCr(fid,maa,mdim); + printf("%d\n",ret); if (ret == 0) ret = MEDunvCr(fid,maa); - printf("MEDunvCr : %d\n",ret); + printf("%d\n",ret); /***************************************************************************/ if (ret == 0) ret = MEDnoeudsEcr(fid,maa,mdim,coo,MED_FULL_INTERLACE,MED_CART, nomcoo,unicoo,nomnoe,MED_FAUX,numnoe,MED_VRAI, - nufano,nnoe); - printf("MEDnoeudsEcr : %d\n",ret); + nufano,nnoe,MED_ECRI); + printf("%d\n",ret); /* ecriture des mailles MED_HEXA8 : - connectivite @@ -157,8 +156,8 @@ int main (int argc, char **argv) if (ret == 0) ret = MEDelementsEcr(fid,maa,mdim,hexa8,MED_FULL_INTERLACE, nomhexa8,MED_FAUX,numhexa8,MED_VRAI,nufahexa8,nhexa8, - MED_MAILLE,MED_HEXA8,MED_NOD); - printf("MEDelementsEcr : %d \n",ret); + MED_MAILLE,MED_HEXA8,MED_NOD,MED_ECRI); + printf("%d \n",ret); /* ecriture des mailles MED_QUAD4 : - connectivite @@ -168,8 +167,8 @@ int main (int argc, char **argv) if (ret == 0) ret = MEDelementsEcr(fid,maa,mdim,quad4,MED_FULL_INTERLACE, nomquad4,MED_FAUX,numquad4,MED_VRAI,nufaquad4,nquad4, - MED_FACE,MED_QUAD4,MED_NOD); - printf("MEDelementsEcr : %d \n",ret); + MED_FACE,MED_QUAD4,MED_NOD,MED_ECRI); + printf("%d \n",ret); /***************************************************************************/ /* ecriture des familles */ @@ -282,9 +281,9 @@ int main (int argc, char **argv) printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ1, (unsigned char *)fieldnodeint, - MED_FULL_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - MED_NOPDT," ", 0., MED_NONOR); + MED_FULL_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); } @@ -292,41 +291,41 @@ int main (int argc, char **argv) if (ret == 0) { - ret = MEDchampCr(fid,champ2,MED_FLOAT64,champ2_comp,champ2_unit,1); + ret = MEDchampCr(fid,champ2,MED_REEL64,champ2_comp,champ2_unit,1); printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble1, - MED_FULL_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - 1,"S ", 1.1 , MED_NONOR); + MED_FULL_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, 1,"S ", 1.1 , MED_NONOR); printf("MEDchampEcr1 : %d \n",ret); ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble2, - MED_FULL_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - 2,"S ", 1.2 , MED_NONOR); + MED_FULL_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, 2,"S ", 1.2 , MED_NONOR); printf("MEDchampEcr2 : %d \n",ret); } } - // on met champ2 sans pas de temps pour pouvoir le lire aussi par defaut ! + /* on met champ2 sans pas de temps pour pouvoir le lire aussi par defaut !*/ if (ret == 0) { ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble1, - MED_FULL_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - MED_NOPDT," ", 0. , MED_NONOR); + MED_FULL_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, MED_NOPDT," ", 0. , MED_NONOR); printf("MEDchampEcr : %d \n",ret); } if (ret == 0) { - ret = MEDchampCr(fid,champ3,MED_FLOAT64,champ3_comp,champ3_unit,3); + ret = MEDchampCr(fid,champ3,MED_REEL64,champ3_comp,champ3_unit,3); printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ3, (unsigned char *)fieldcelldouble, - MED_FULL_INTERLACE, nhexa8, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_MAILLE, MED_HEXA8, - MED_NOPDT," ", 0., MED_NONOR); + MED_FULL_INTERLACE, nhexa8, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_MAILLE, + MED_HEXA8, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); } } diff --git a/src/MEDMEM/create_mesh_c3h8q4_wrong.c b/src/MEDMEM/create_mesh_c3h8q4_wrong.c index 884d4bf26..a5f6caca0 100644 --- a/src/MEDMEM/create_mesh_c3h8q4_wrong.c +++ b/src/MEDMEM/create_mesh_c3h8q4_wrong.c @@ -14,7 +14,6 @@ int main (int argc, char **argv) med_err ret; med_idt fid; char maa[MED_TAILLE_NOM+1] = "CUBE_EN_HEXA8_QUAD4_WRONG"; - char maadesc[MED_TAILLE_DESC+1] = "Example de maillage non structure 3D"; med_int mdim = 3; med_int nnoe = 27; /* @@ -49,8 +48,8 @@ int main (int argc, char **argv) 0.5, 1.0, 1.0, 1.0, 1.0, 1.0 }; - char nomcoo[3*MED_TAILLE_PNOM+1] = "x y z "; - char unicoo[3*MED_TAILLE_PNOM+1] = "cm cm cm "; + char nomcoo[3*MED_TAILLE_PNOM+1] = "x y z "; + char unicoo[3*MED_TAILLE_PNOM+1] = "cm cm cm "; /* char nomnoe[19*MED_TAILLE_PNOM+1] = "nom1 nom2 nom3 nom4";*/ char *nomnoe ; med_int numnoe[27] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27}; @@ -69,7 +68,7 @@ int main (int argc, char **argv) 16, 25, 26, 17, 13, 22, 23, 14, 17, 26, 27, 18, 14, 23, 24, 15 }; - char nomhexa8[MED_TAILLE_PNOM*8+1] = "hexa1 hexa2 hexa3 hexa4 hexa5 hexa6 hexa7 hexa8 "; + char nomhexa8[MED_TAILLE_PNOM*8+1] = "hexa1 hexa2 hexa3 hexa4 hexa5 hexa6 hexa7 hexa8 "; med_int numhexa8[8] = {1,2,3,4,5,6,7,8}; med_int nufahexa8[8] = {-1,-1,-1,-1,-2,-2,-2,-2}; @@ -93,7 +92,7 @@ int main (int argc, char **argv) 7, 8, 5, 4 }; - char nomquad4[MED_TAILLE_PNOM*8+1] = "quad1 quad2 quad3 quad4 quad5 quad6 quad7 quad8 "; + char nomquad4[MED_TAILLE_PNOM*8+1] = "quad1 quad2 quad3 quad4 quad5 quad6 quad7 quad8 "; med_int numquad4[8] = {1,2,3,4,5,6,7,8}; med_int nufaquad4[8] = {-3,-3,-3,-3,-4, -4, -4 , -4}; @@ -115,43 +114,43 @@ int main (int argc, char **argv) */ char champ1[MED_TAILLE_NOM+1]="fieldnodeint" ; - char champ1_comp[MED_TAILLE_PNOM+1]="comp1 " ; - char champ1_unit[MED_TAILLE_PNOM+1]="M " ; + char champ1_comp[MED_TAILLE_PNOM+1]="comp1 " ; + char champ1_unit[MED_TAILLE_PNOM+1]="M " ; med_int fieldnodeint[27] = {1,1,3,2,2,3,4,4,5,1,1,3,2,2,3,4,4,5,1,1,3,2,2,3,4,4,5}; char champ2[MED_TAILLE_NOM+1]="fieldnodedouble" ; - char champ2_comp[MED_TAILLE_PNOM+1]="comp1 " ; - char champ2_unit[MED_TAILLE_PNOM+1]="J " ; + char champ2_comp[MED_TAILLE_PNOM+1]="comp1 " ; + char champ2_unit[MED_TAILLE_PNOM+1]="J " ; med_float fieldnodedouble1[27] = {1.,3.,4.,1.,3.,4.,3.,2.,5.,1.,3.,4.,1.,3.,4.,3.,2.,5.,1.,3.,4.,1.,3.,4.,3.,2.,5.}; med_float fieldnodedouble2[27] = {1.,2.,2.,3.,3.,3.,4.,4.,5.,1.,2.,2.,3.,3.,3.,4.,4.,5.,1.,2.,2.,3.,3.,3.,4.,4.,5.}; char champ3[MED_TAILLE_NOM+1]="fieldcelldouble" ; - char champ3_comp[MED_TAILLE_PNOM*3+1]="comp1 comp2 comp3 " ; - char champ3_unit[MED_TAILLE_PNOM*3+1]="M/S m/s m/s " ; + char champ3_comp[MED_TAILLE_PNOM*3+1]="comp1 comp2 comp3 " ; + char champ3_unit[MED_TAILLE_PNOM*3+1]="M/S m/s m/s " ; med_float fieldcelldouble[8*3] = {0.,1.,1.,1.,1.,2.,2.,3.,0.,1.,1.,1.,1.,2.,2.,3.,0.,1.,1.,1.,1.,2.,2.,3.}; /***************************************************************************/ - fid = MEDouvrir("cube_hexa8_quad4_wrong.med",MED_LECTURE_ECRITURE); + fid = MEDouvrir("cube_hexa8_quad4_wrong.med",MED_REMP); if (fid < 0) ret = -1; else ret = 0; - printf("MEDouvrir : %d\n",ret); + printf("%d\n",ret); /***************************************************************************/ if (ret == 0) - ret = MEDmaaCr(fid,maa,mdim,MED_NON_STRUCTURE,maadesc); - printf("MEDmaaCr : %d\n",ret); + ret = MEDmaaCr(fid,maa,mdim); + printf("%d\n",ret); if (ret == 0) ret = MEDunvCr(fid,maa); - printf("MEDunvCr : %d\n",ret); + printf("%d\n",ret); /***************************************************************************/ if (ret == 0) ret = MEDnoeudsEcr(fid,maa,mdim,coo,MED_FULL_INTERLACE,MED_CART, nomcoo,unicoo,nomnoe,MED_FAUX,numnoe,MED_VRAI, - nufano,nnoe); - printf("MEDnoeudsEcr : %d\n",ret); + nufano,nnoe,MED_ECRI); + printf("%d\n",ret); /* ecriture des mailles MED_HEXA8 : - connectivite @@ -161,8 +160,8 @@ int main (int argc, char **argv) if (ret == 0) ret = MEDelementsEcr(fid,maa,mdim,hexa8,MED_FULL_INTERLACE, nomhexa8,MED_FAUX,numhexa8,MED_VRAI,nufahexa8,nhexa8, - MED_MAILLE,MED_HEXA8,MED_NOD); - printf("MEDelementsEcr : %d \n",ret); + MED_MAILLE,MED_HEXA8,MED_NOD,MED_ECRI); + printf("%d \n",ret); /* ecriture des mailles MED_QUAD4 : - connectivite @@ -172,8 +171,8 @@ int main (int argc, char **argv) if (ret == 0) ret = MEDelementsEcr(fid,maa,mdim,quad4,MED_FULL_INTERLACE, nomquad4,MED_FAUX,numquad4,MED_VRAI,nufaquad4,nquad4, - MED_FACE,MED_QUAD4,MED_NOD); - printf("MEDelementsEcr : %d \n",ret); + MED_FACE,MED_QUAD4,MED_NOD,MED_ECRI); + printf("%d \n",ret); /***************************************************************************/ /* ecriture des familles */ @@ -286,9 +285,9 @@ int main (int argc, char **argv) printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ1, (unsigned char *)fieldnodeint, - MED_FULL_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - MED_NOPDT," ", 0., MED_NONOR); + MED_FULL_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); } @@ -296,41 +295,41 @@ int main (int argc, char **argv) if (ret == 0) { - ret = MEDchampCr(fid,champ2,MED_FLOAT64,champ2_comp,champ2_unit,1); + ret = MEDchampCr(fid,champ2,MED_REEL64,champ2_comp,champ2_unit,1); printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble1, - MED_FULL_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - 1,"S ", 1.1 , MED_NONOR); + MED_FULL_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, 1,"S ", 1.1 , MED_NONOR); printf("MEDchampEcr1 : %d \n",ret); ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble2, - MED_FULL_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - 2,"S ", 1.2 , MED_NONOR); + MED_FULL_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, 2,"S ", 1.2 , MED_NONOR); printf("MEDchampEcr2 : %d \n",ret); } } - // on met champ2 sans pas de temps pour pouvoir le lire aussi par defaut ! + /* on met champ2 sans pas de temps pour pouvoir le lire aussi par defaut !*/ if (ret == 0) { ret = MEDchampEcr(fid, maa, champ2, (unsigned char *)fieldnodedouble1, - MED_FULL_INTERLACE, nnoe, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_NOEUD, 0, - MED_NOPDT," ", 0. , MED_NONOR); + MED_FULL_INTERLACE, nnoe, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_NOEUD, + 0, MED_NOPDT," ", 0. , MED_NONOR); printf("MEDchampEcr : %d \n",ret); } if (ret == 0) { - ret = MEDchampCr(fid,champ3,MED_FLOAT64,champ3_comp,champ3_unit,3); + ret = MEDchampCr(fid,champ3,MED_REEL64,champ3_comp,champ3_unit,3); printf("MEDchampCr : %d \n",ret); if (ret == 0) { ret = MEDchampEcr(fid, maa, champ3, (unsigned char *)fieldcelldouble, - MED_FULL_INTERLACE, nhexa8, MED_NOGAUSS, MED_ALL, - MED_NOPFL, MED_NO_PFLMOD, MED_MAILLE, MED_HEXA8, - MED_NOPDT," ", 0., MED_NONOR); + MED_FULL_INTERLACE, nhexa8, + MED_NOPG, MED_ALL, MED_NOPFL, MED_ECRI, MED_MAILLE, + MED_HEXA8, MED_NOPDT," ", 0., MED_NONOR); printf("MEDchampEcr : %d \n",ret); } } diff --git a/src/MEDMEM_I/MEDMEM_FieldOf_i.hxx b/src/MEDMEM_I/MEDMEM_FieldOf_i.hxx index 6704a9ee4..e53095e87 100644 --- a/src/MEDMEM_I/MEDMEM_FieldOf_i.hxx +++ b/src/MEDMEM_I/MEDMEM_FieldOf_i.hxx @@ -509,23 +509,40 @@ template void FIELDOF_i::addInStudy(SALOMEDS::Study_ptr myStudy, ASSERT(SINGLETON_::IsAlreadyExisting()) ; CORBA::ORB_var &orb = init(0,0); + int iterationNumber = _fieldTptr->getIterationNumber(); + SCRUTE(iterationNumber); + + int orderNumber = _fieldTptr->getOrderNumber(); + SCRUTE(orderNumber); + ostringstream iterationName ; - iterationName<<"("<<_fieldTptr->getIterationNumber()<<","<<_fieldTptr->getOrderNumber()<<")"; + iterationName<<"(" << iterationNumber << "," << orderNumber << ")"; // string supportName = _support->getName(); string supportName = (_fieldTptr->getSupport())->getName(); // string meshName = (_support->getMesh())->getName(); string meshName = ((_fieldTptr->getSupport())->getMesh())->getName(); + string meshNameStudy = meshName; char * fieldEntryName; - int lenName = strlen(iterationName.str().c_str()) + 4 + strlen(supportName.c_str()) + 4 + - strlen(meshName.c_str()); + int lenName = strlen(iterationName.str().c_str()) + 4 + + strlen(supportName.c_str()) + 4 + strlen(meshName.c_str()) + 1; fieldEntryName = new char[lenName]; fieldEntryName = strcpy(fieldEntryName,iterationName.str().c_str()); fieldEntryName = strcat(fieldEntryName,"_ON_"); fieldEntryName = strcat(fieldEntryName,supportName.c_str()); fieldEntryName = strcat(fieldEntryName,"_OF_"); - fieldEntryName = strcat(fieldEntryName,meshName.c_str()); + + for (string::size_type pos=0; posFindOrCreateAttribute(newObj, "AttributeName"); aName = SALOMEDS::AttributeName::_narrow(anAttr); @@ -539,12 +556,14 @@ template void FIELDOF_i::addInStudy(SALOMEDS::Study_ptr myStudy, myBuilder->CommitCommand(); _FieldId = newObj->GetID(); + MESSAGE("Computing path to Support"); + char * supportEntryPath; - lenName = 13 + 15 + strlen(meshName.c_str()) + 1 + strlen(supportName.c_str()); + lenName = 28 + 15 + strlen(meshName.c_str()) + 1 + + strlen(supportName.c_str()) + 1; supportEntryPath = new char[lenName]; - supportEntryPath = strcpy(supportEntryPath,"/Med/MEDMESH/"); - supportEntryPath = strcat(supportEntryPath,"MEDSUPPORTS_OF_"); - supportEntryPath = strcat(supportEntryPath,meshName.c_str()); + supportEntryPath = strcpy(supportEntryPath,"/Med/MEDMESH/MEDSUPPORTS_OF_"); + supportEntryPath = strcat(supportEntryPath,meshNameStudy.c_str()); supportEntryPath = strcat(supportEntryPath,"/"); supportEntryPath = strcat(supportEntryPath,supportName.c_str()); @@ -567,14 +586,17 @@ template void FIELDOF_i::addInStudy(SALOMEDS::Study_ptr myStudy, MESSAGE("supportObject is OK and is now going to be referenced !"); SALOMEDS::SObject_var newObjSupport = myBuilder->NewObject(newObj); myBuilder->Addreference(newObjSupport,supportObject); + MESSAGE(" OUF !!!"); } myBuilder->CommitCommand(); - MESSAGE("FIELDOF_i::addInStudy _FieldId="<< _FieldId); + delete [] supportEntryPath; + delete [] fieldEntryName; - END_OF(" FIELDOF_i::addInStudy"); + MESSAGE("FIELDOF_i::addInStudy"); + //END_OF("FIELDOF_i::addInStudy"); } //============================================================================= /*! diff --git a/src/MEDMEM_I/MEDMEM_Med_i.cxx b/src/MEDMEM_I/MEDMEM_Med_i.cxx index 16946a5ad..0f925ea36 100644 --- a/src/MEDMEM_I/MEDMEM_Med_i.cxx +++ b/src/MEDMEM_I/MEDMEM_Med_i.cxx @@ -168,7 +168,7 @@ void MED_i::init(SALOMEDS::Study_ptr myStudy,driverTypes driverType, const strin break; } - case MED_FR::MED_FLOAT64: + case MED_FR::MED_REEL64: { ((FIELD*)myField)->read(); FIELDDOUBLE_i * myFieldDoubleI @@ -210,6 +210,10 @@ void MED_i::initWithFieldType(SALOMEDS::Study_ptr myStudy,driverTypes driverType BEGIN_OF(LOC); // we create all IOR from _med + + SCRUTE(driverType); + SCRUTE(fileName) + _med = new ::MED(driverType,fileName); int numberOfMeshes = _med->getNumberOfMeshes(); @@ -422,12 +426,39 @@ void MED_i::initWithFieldType(SALOMEDS::Study_ptr myStudy,driverTypes driverType SCRUTE(numberOfFields); for (int i=0; i myIteration = _med->getFieldIteration (fieldsNames[i]); + int numberOfIteration = myIteration.size(); + + SCRUTE(numberOfIteration); + + for (int j=0; j myIteration = _med->getFieldIteration (fieldsNames[i]); int numberOfIteration = myIteration.size(); + + SCRUTE(numberOfIteration); + for (int j=0; jgetField(fieldsNames[i],myIteration[j].dt,myIteration[j].it); + int dt = myIteration[j].dt; + int it = myIteration[j].it; + + MESSAGE("Treatement of " << fieldsNames[i] << " dt = " << dt << " it = " << it); + + ::FIELD_ * myField = _med->getField(fieldsNames[i],dt,it); + string meshName = myField->getSupport()->getMesh()->getName(); medEntityMesh myEntity = myField->getSupport()->getEntity(); map >::const_iterator @@ -449,8 +480,8 @@ void MED_i::initWithFieldType(SALOMEDS::Study_ptr myStudy,driverTypes driverType med_type_champ type = myField->getValueType(); DT_IT_ dtIt; - dtIt.dt = myIteration[j].dt; - dtIt.it = myIteration[j].it; + dtIt.dt = dt; + dtIt.it = it; switch (type) { @@ -471,7 +502,7 @@ void MED_i::initWithFieldType(SALOMEDS::Study_ptr myStudy,driverTypes driverType break; } - case MED_FR::MED_FLOAT64: + case MED_FR::MED_REEL64: { ((FIELD*)myField)->read(); FIELDDOUBLE_i * myFieldDoubleI @@ -498,6 +529,9 @@ void MED_i::initWithFieldType(SALOMEDS::Study_ptr myStudy,driverTypes driverType } } } + + + MESSAGE("Here we are i="<< i); } @@ -871,6 +905,44 @@ SALOME_MED::long_array * MED_i::getFieldIteration(const char* fieldName,CORBA::L } } //============================================================================= +/*! + * CORBA: Accessor for the list of Corba equivalent DT_IT_ (see MEDMEM direcrtory) + * of a given field by its name (sequence of two by iteration number long integers). + */ +//============================================================================= +SALOME_MED::long_array * MED_i::getFieldIterations(const char* fieldName) + throw (SALOME::SALOME_Exception) +{ + if (_med==NULL) + THROW_SALOME_CORBA_EXCEPTION("No associated Med object",\ + SALOME::INTERNAL_ERROR); + + SALOME_MED::long_array_var myseq = new SALOME_MED::long_array; + try + { + deque fieldIteration = _med->getFieldIteration(string(fieldName)); + int numberOfIteration = fieldIteration.size(); + int size = 2*numberOfIteration; + + myseq->length(size); + + for (int i=0; igetName() ; + string meshNameStudy = meshName; + + for (string::size_type pos=0; posFindObject(meshName.c_str()); @@ -549,13 +555,13 @@ void SUPPORT_i::addInStudy (SALOMEDS::Study_ptr myStudy, SALOME_MED::SUPPORT_ptr THROW_SALOME_CORBA_EXCEPTION("SObject Mesh in Support not Found",SALOME::INTERNAL_ERROR); // perhaps add MESH automatically ? - MESSAGE("Add a support Object under /MED/MESH/MESHNAME"); + MESSAGE("Add a support Object under /Med/MESH/MESHNAME"); char * medsupfatherName; int lenName = 15 + strlen(meshName.c_str()); medsupfatherName = new char[lenName]; medsupfatherName = strcpy(medsupfatherName,"MEDSUPPORTS_OF_"); - medsupfatherName = strcat(medsupfatherName,meshName.c_str()); + medsupfatherName = strcat(medsupfatherName,meshNameStudy.c_str()); SCRUTE(medsupfatherName); @@ -574,16 +580,20 @@ void SUPPORT_i::addInStudy (SALOMEDS::Study_ptr myStudy, SALOME_MED::SUPPORT_ptr string supportName = _support->getName(); + SCRUTE(supportName); + + SCRUTE(meshNameStudy); + char * supportEntryPath; - lenName = 13 + 15 + strlen(meshName.c_str()) + 1 + strlen(supportName.c_str()); + lenName = 13 + 15 + strlen(meshName.c_str()) + 1 + strlen(supportName.c_str())+1; supportEntryPath = new char[lenName]; - supportEntryPath = strcpy(supportEntryPath,"/MED/MEDMESH/"); + supportEntryPath = strcpy(supportEntryPath,"/Med/MEDMESH/"); supportEntryPath = strcat(supportEntryPath,"MEDSUPPORTS_OF_"); - supportEntryPath = strcat(supportEntryPath,meshName.c_str()); + supportEntryPath = strcat(supportEntryPath,meshNameStudy.c_str()); supportEntryPath = strcat(supportEntryPath,"/"); supportEntryPath = strcat(supportEntryPath,supportName.c_str()); - SCRUTE(supportEntryPath); + //SCRUTE(supportEntryPath); MESSAGE("supportEntryPath in support " << supportEntryPath << " length " << lenName); diff --git a/src/MEDMEM_I/Makefile.in b/src/MEDMEM_I/Makefile.in index 9fe98e567..0c0ba7c63 100644 --- a/src/MEDMEM_I/Makefile.in +++ b/src/MEDMEM_I/Makefile.in @@ -28,7 +28,7 @@ top_srcdir=@top_srcdir@ top_builddir=../.. srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl:${KERNEL_ROOT_DIR}/idl/salome +VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl MACHINE=PCLINUX diff --git a/src/MEDMEM_SWIG/Makefile.in b/src/MEDMEM_SWIG/Makefile.in index 457d0cc32..78a657e02 100644 --- a/src/MEDMEM_SWIG/Makefile.in +++ b/src/MEDMEM_SWIG/Makefile.in @@ -69,7 +69,7 @@ EXPORT_PYSCRIPTS = libMEDMEM_Swig.py \ CPPFLAGS+= $(PYTHON_INCLUDES) $(MED2_INCLUDES) $(HDF5_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome CXXFLAGS+=-ftemplate-depth-42 -I${KERNEL_ROOT_DIR}/include/salome -LIBS= $(PYTHON_LIBS) +LIBS= $(PYTHON_LIBS) #LDFLAGS+= -lmedmem $(MED2_LIBS) $(HDF5_LIBS) -lSalomeLoggerServer -L${KERNEL_ROOT_DIR}/lib/salome # change motivated by the bug KERNEL4778. LDFLAGS+= -lmedmem $(MED2_LIBS) $(HDF5_LIBS) -lSALOMELocalTrace -L${KERNEL_ROOT_DIR}/lib/salome diff --git a/src/MEDMEM_SWIG/libMEDMEM_Swig.i b/src/MEDMEM_SWIG/libMEDMEM_Swig.i index d6adb29d3..405eba3c1 100644 --- a/src/MEDMEM_SWIG/libMEDMEM_Swig.i +++ b/src/MEDMEM_SWIG/libMEDMEM_Swig.i @@ -207,20 +207,11 @@ enum of the C++ MED used in the Python API */ -typedef enum {MED_NON_STRUCTURE, MED_STRUCTURE} med_maillage; - -typedef enum {MED_GRILLE_CARTESIENNE, MED_GRILLE_POLAIRE, - MED_GRILLE_STANDARD} med_type_grille; +typedef enum {MED_CARTESIAN, MED_POLAR, MED_BODY_FITTED} med_grid_type; typedef enum {MED_FULL_INTERLACE, MED_NO_INTERLACE} medModeSwitch; -/* typedef enum {MED_LECT, MED_ECRI, MED_REMP} med_mode_acces; - V2_1->V2_2 -*/ - -typedef enum {MED_LECTURE, MED_LECTURE_ECRITURE, MED_LECTURE_AJOUT, - MED_CREATION} med_mode_acces; typedef enum {MED_CELL, MED_FACE, MED_EDGE, MED_NODE, MED_ALL_ENTITIES} medEntityMesh; @@ -229,8 +220,8 @@ typedef enum {MED_NONE=0, MED_POINT1=1, MED_SEG2=102, MED_SEG3=103, MED_TRIA3=203, MED_QUAD4=204, MED_TRIA6=206, MED_QUAD8=208, MED_TETRA4=304, MED_PYRA5=305, MED_PENTA6=306, MED_HEXA8=308, MED_TETRA10=310, MED_PYRA13=313, - MED_PENTA15=315, MED_HEXA20=320, MED_POLYGONE=400, - MED_POLYEDRE=500, MED_ALL_ELEMENTS=999} medGeometryElement; + MED_PENTA15=315, MED_HEXA20=320, + MED_ALL_ELEMENTS=999} medGeometryElement; typedef enum {MED_NODAL, MED_DESCENDING} medConnectivity ; @@ -238,7 +229,7 @@ typedef enum {MED_DRIVER=0, GIBI_DRIVER=1, PORFLOW_DRIVER = 2, VTK_DRIVER=254, NO_DRIVER=255} driverTypes; typedef enum {MED_REEL64=6, MED_INT32=24, MED_INT64=26, - MED_INT=28} med_type_champ; + MED_INT} med_type_champ; typedef struct { int dt; int it; } DT_IT_; @@ -1533,15 +1524,13 @@ class GRID : public MESH int getFaceNumber(const int Axis, const int i, const int j=0, const int k=0) const ; -/* med_grid_type getGridType(); */ - med_type_grille getGridType(); + med_grid_type getGridType(); int getArrayLength( const int Axis ); const double getArrayValue (const int Axis, const int i); -/* void setGridType(med_grid_type gridType); */ - void setGridType(med_type_grille gridType); + void setGridType(med_grid_type gridType); %extend { GRID(driverTypes driverType, const char * fileName="", const char * meshName="") diff --git a/src/MEDMEM_SWIG/med_test_grid.py b/src/MEDMEM_SWIG/med_test_grid.py index 53c29d804..437d72dad 100755 --- a/src/MEDMEM_SWIG/med_test_grid.py +++ b/src/MEDMEM_SWIG/med_test_grid.py @@ -61,7 +61,7 @@ if K != 0: grid_type = grid.getGridType() print "grid_type =", grid_type -if grid_type != MED_GRILLE_CARTESIENNE: +if grid_type != MED_CARTESIAN: raise RuntimeError, "Wrong grid type" spaceDim = grid.getSpaceDimension() @@ -256,7 +256,7 @@ if K != 0: grid_type = grid.getGridType() print "grid_type =", grid_type -if grid_type != MED_GRILLE_STANDARD: +if grid_type != MED_BODY_FITTED: raise RuntimeError, "Wrong grid type" spaceDim = grid.getSpaceDimension() diff --git a/src/MEDMEM_SWIG/testMedMemGeneral.py b/src/MEDMEM_SWIG/testMedMemGeneral.py index 9d64fec29..e5db5c693 100755 --- a/src/MEDMEM_SWIG/testMedMemGeneral.py +++ b/src/MEDMEM_SWIG/testMedMemGeneral.py @@ -237,8 +237,8 @@ for i in range(nbOfFiles): meshDriver.close() print "The mesh stored in the file ",file," is perhaps a GRID." try: - print "... of MED_GRILLE_CARTESIENNE type ?" - type = MED_GRILLE_CARTESIENNE + print "... of MED_CARTESIAN type ?" + type = MED_CARTESIAN mesh = GRID() mesh.setGridType(type) if (extensionFile == "med"): @@ -258,9 +258,9 @@ for i in range(nbOfFiles): except: meshDriver.close() try: - print "... of MED_GRILLE_POLAIRE type ?" + print "... of MED_POLAR type ?" mesh = GRID() - type = MED_GRILLE_POLAIRE + type = MED_POLAR mesh.setGridType(type) if (extensionFile == "med"): meshDriver = MED_MESH_RDONLY_DRIVER(file,mesh) @@ -275,9 +275,9 @@ for i in range(nbOfFiles): meshDriver.read() except: meshDriver.close() - print "... of MED_GRILLE_STANDARD type ?" + print "... of MED_BODY_FITTED type ?" mesh = GRID() - type = MED_GRILLE_STANDARD + type = MED_BODY_FITTED mesh.setGridType(type) if (extensionFile == "med"): meshDriver = MED_MESH_RDONLY_DRIVER(file,mesh) diff --git a/src/MedCorba_Swig/Makefile.in b/src/MedCorba_Swig/Makefile.in index 351dbb555..58439815f 100644 --- a/src/MedCorba_Swig/Makefile.in +++ b/src/MedCorba_Swig/Makefile.in @@ -28,7 +28,7 @@ top_srcdir=@top_srcdir@ top_builddir=../.. srcdir=@srcdir@ -VPATH=.:$(srcdir):$(top_srcdir)/idl:$(top_builddir)/idl:${KERNEL_ROOT_DIR}/idl/salome +VPATH=.:$(srcdir):$(top_srcdir)/idl:$(top_builddir)/idl @COMMENCE@ @@ -44,7 +44,7 @@ LIB_SERVER_IDL = MED.idl LIB_CLIENT_IDL= SALOME_Component.idl SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Exception.idl -EXPORT_PYSCRIPTS = libMedCorba_Swig.py medcorba_test.py batchmode_medcorba_test.py +EXPORT_PYSCRIPTS = libMedCorba_Swig.py medcorba_test.py batchmode_medcorba_test.py batchmode_medcorba_test1.py EXPORT_HEADERS = libMedCorba_Swig.i diff --git a/src/MedCorba_Swig/batchmode_medcorba_test.py b/src/MedCorba_Swig/batchmode_medcorba_test.py index a3784cfe1..55d2acafa 100755 --- a/src/MedCorba_Swig/batchmode_medcorba_test.py +++ b/src/MedCorba_Swig/batchmode_medcorba_test.py @@ -17,8 +17,8 @@ from random import * import os -filePath=os.environ["MED_ROOT_DIR"] -filePath=filePath+"/share/salome/resources/" +filePath=os.environ["KERNEL_ROOT_DIR"] +filePath=filePath+"/examples/" #============================================================================== @@ -75,6 +75,48 @@ def getMeshObjectFromStudy(meshName): print "ERROR: ",objNameInStudy," has been found in the Study but with the wrong type" return myObj + +#============================================================================== + +def getFieldDoubleObjectFromStudy(number,subnumber): + mySO = batchmode_salome.myStudy.FindObject("MEDFIELD") + mysub = mySO.FindSubObject(number)[1] + if mysub: + mysubsub = mysub.FindSubObject(subnumber)[1] + if mysubsub: + Builder = batchmode_salome.myStudy.NewBuilder() + anAttr = Builder.FindOrCreateAttribute(mysubsub, "AttributeIOR") + obj = batchmode_salome.orb.string_to_object(anAttr.Value()) + myObj = obj._narrow(SALOME_MED.FIELDDOUBLE) + return myObj + else: + print "ERROR: No FieldDouble Object stored in this Study" + return None + else: + print "ERROR: No FieldDouble Object stored in this Study" + return None + + +#============================================================================== + +def getFieldIntObjectFromStudy(number,subnumber): + mySO = batchmode_salome.myStudy.FindObject("MEDFIELD") + mysub = mySO.FindSubObject(number)[1] + if mysub: + mysubsub = mysub.FindSubObject(subnumber)[1] + if mysubsub: + Builder = batchmode_salome.myStudy.NewBuilder() + anAttr = Builder.FindOrCreateAttribute(mysubsub, "AttributeIOR") + obj = batchmode_salome.orb.string_to_object(anAttr.Value()) + myObj = obj._narrow(SALOME_MED.FIELDINT) + return myObj + else: + print "ERROR: No FieldInt Object stored in this Study" + return None + else: + print "ERROR: No FieldInt Object stored in this Study" + return None + #============================================================================== def getMedObjectFromStudy(file): diff --git a/src/MedCorba_Swig/batchmode_medcorba_test1.py b/src/MedCorba_Swig/batchmode_medcorba_test1.py new file mode 100644 index 000000000..acac18ba4 --- /dev/null +++ b/src/MedCorba_Swig/batchmode_medcorba_test1.py @@ -0,0 +1,133 @@ +# MED MedCorba_Swig : binding of MED CORBA objects woth Python +# +# Copyright (C) 2003 CEA/DEN, EDF R&D +# +# +# +# File : batchmode_medcorba_test.py +# Module : MED + +import batchmode_salome + +import SALOME_MED + +from libMedCorba_Swig import * + +from random import * + +import os + +filePath=os.environ["KERNEL_ROOT_DIR"] +filePath=filePath+"/examples/" + +#============================================================================== + +def AnalyzeField(field): + name = field.getName() + desc = field.getDescription() + nbComp = field.getNumberOfComponents() + itNum = field.getIterationNumber() + ordNum = field.getOrderNumber() + + print "Analysis of the field ",name," with the description ",desc + print "iteration number ",itNum," order Number ",ordNum + print "It has ",nbComp," component(s)" + + fieldValue = field.getValue(SALOME_MED.MED_FULL_INTERLACE) + fieldSupport = field.getSupport() + fieldMesh = fieldSupport.getMesh() + fieldEntity = fieldSupport.getEntity() + bool = fieldSupport.isOnAllElements() + + if bool: + print "The support of this field is on all entities ",fieldEntity," of the mesh ",fieldMesh.getName() + if fieldEntity == SALOME_MED.MED_NODE: + nbValByComp = fieldMesh.getNumberOfNodes() + else: + nbValByComp = fieldMesh.getNumberOfElements(fieldEntity,SALOME_MED.MED_ALL_ELEMENTS) + print "and its dimension (number of values by component of the field) is ",nbValByComp + else: + print "The support of this field is partially on entities ",fieldEntity," of the mesh ",fieldMesh.getName() + nbValByComp = fieldSupport.getNumberOfElements(SALOME_MED.MED_ALL_ELEMENTS) + print "and its dimension (number of values by component of the field) is ",nbValByComp + + for i in range(nbComp): + compName = field.getComponentName(i+1) + compUnit = field.getComponentUnit(i+1) + print "The ",(i+1),"-th component ",compName," with the unit ",compUnit + + for i in range(nbValByComp): + print " * ",fieldValue[i*nbComp:(i+1)*nbComp] + +#============================================================================== + +def getMeshObjectFromStudy(number): + mySO = batchmode_salome.myStudy.FindObject("MEDMESH") + mysub = mySO.FindSubObject(number)[1] + if mysub: + Builder = batchmode_salome.myStudy.NewBuilder() + anAttr = Builder.FindOrCreateAttribute(mysub, "AttributeIOR") + obj = batchmode_salome.orb.string_to_object(anAttr.Value()) + myObj = obj._narrow(SALOME_MED.MESH) + return myObj + else: + print "ERROR: No Mesh Object stored in this Study" + return None + + +#============================================================================== + +def getFieldDoubleObjectFromStudy(number,subnumber): + mySO = batchmode_salome.myStudy.FindObject("MEDFIELD") + mysub = mySO.FindSubObject(number)[1] + if mysub: + mysubsub = mysub.FindSubObject(subnumber)[1] + if mysubsub: + Builder = batchmode_salome.myStudy.NewBuilder() + anAttr = Builder.FindOrCreateAttribute(mysubsub, "AttributeIOR") + obj = batchmode_salome.orb.string_to_object(anAttr.Value()) + anAttr = Builder.FindOrCreateAttribute(mysubsub, "AttributeName") + myObj = obj._narrow(SALOME_MED.FIELDDOUBLE) + return myObj + else: + print "ERROR: No FieldDouble Object stored in this Study" + return None + else: + print "ERROR: No FieldDouble Object stored in this Study" + return None + + +#============================================================================== + +def getFieldIntObjectFromStudy(number,subnumber): + mySO = batchmode_salome.myStudy.FindObject("MEDFIELD") + mysub = mySO.FindSubObject(number)[1] + if mysub: + mysubsub = mysub.FindSubObject(subnumber)[1] + if mysubsub: + Builder = batchmode_salome.myStudy.NewBuilder() + anAttr = Builder.FindOrCreateAttribute(mysubsub, "AttributeIOR") + obj = batchmode_salome.orb.string_to_object(anAttr.Value()) + myObj = obj._narrow(SALOME_MED.FIELDINT) + return myObj + else: + print "ERROR: No FieldInt Object stored in this Study" + return None + else: + print "ERROR: No FieldInt Object stored in this Study" + return None + +#============================================================================== + +def getMedObjectFromStudy(): + mySO = batchmode_salome.myStudy.FindObject("Objet MED") + Builder = batchmode_salome.myStudy.NewBuilder() + anAttr = Builder.FindOrCreateAttribute(mySO, "AttributeIOR") + obj = batchmode_salome.orb.string_to_object(anAttr.Value()) + myObj = obj._narrow(SALOME_MED.MED) + return myObj + +studyCurrent = batchmode_salome.myStudyName +studyCurrentId = batchmode_salome.myStudyId + +med_comp = batchmode_salome.lcc.FindOrLoadComponent("FactoryServer", "MED") diff --git a/src/MedCorba_Swig/libMedCorba_Swig.i b/src/MedCorba_Swig/libMedCorba_Swig.i index 3c6755ebe..15041dd22 100644 --- a/src/MedCorba_Swig/libMedCorba_Swig.i +++ b/src/MedCorba_Swig/libMedCorba_Swig.i @@ -429,7 +429,8 @@ SALOME_MED::MESH_ptr createCorbaMesh(MESH * mesh); SCRUTE(field); - field->setName("Corba Double Field"); + // MT : Keep the local field name + // field->setName("Corba Double Field"); field->setDescription("Got From A Local One"); @@ -471,7 +472,8 @@ SALOME_MED::MESH_ptr createCorbaMesh(MESH * mesh); SCRUTE(field); - field->setName("Corba Integer Field"); + // MT : Keep the local field name + // field->setName("Corba Integer Field"); field->setDescription("Got From A Local One"); -- 2.39.2