From a954a7e60822377794753f6aba9b960eeca90f7a Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Wed, 14 Dec 2016 13:39:35 +0000
Subject: [PATCH] Fix for HEX20 and HEX27 in MED format (patch from Nicolas
 Tardieu)

---
 Geo/GModelIO_MED.cpp | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/Geo/GModelIO_MED.cpp b/Geo/GModelIO_MED.cpp
index e0c8264a4f..3d0f0837f5 100644
--- a/Geo/GModelIO_MED.cpp
+++ b/Geo/GModelIO_MED.cpp
@@ -130,15 +130,13 @@ int med2mshNodeIndex(med_geometrie_element med, int k)
     return map[k];
   }
   case MED_HEXA20: {
-    static const int map[20] = {0, 3, 2, 1, 4, 7, 6, 5,
-                                9, 13, 11, 8, 17, 19, 18, 16, 10, 15, 14, 12};
+    static const int map[20] = {0,1,3,2,4,5,6,7,8,9,10,11,16,17,18,19,12,13,14,15};
     return map[k];
   }
 #if (MED_MAJOR_NUM == 3)
   case MED_HEXA27: {
-    static const int map[27] = {0, 3, 2, 1, 4, 7, 6, 5,
-                                9, 13, 11, 8, 17, 19, 18, 16, 10, 15, 14, 12,
-                                20, 22, 24, 23, 21, 25, 26};
+    static const int map[27] = {0,1,3,2,4,5,6,7,8,9,10,11,16,17,18,19,12,13,14,15,
+                                20, 22, 21, 23, 24, 25, 26};
     return map[k];
   }
 #endif
-- 
GitLab