From a3908d8ba22d19cf521559bf263962d185ff6cca Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Fri, 14 Mar 2014 14:48:42 +0000
Subject: [PATCH] use same simplex decomposition in graphics as for levelset
 plugin

---
 Post/PViewVertexArrays.cpp | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/Post/PViewVertexArrays.cpp b/Post/PViewVertexArrays.cpp
index cf2598384e..c6305ce718 100644
--- a/Post/PViewVertexArrays.cpp
+++ b/Post/PViewVertexArrays.cpp
@@ -772,8 +772,10 @@ static void addScalarHexahedron(PView *p, double **xyz,
 
   const int iq[6][4] = {{0, 3, 2, 1}, {0, 1, 5, 4}, {0, 4, 7, 3},
                         {1, 2, 6, 5}, {2, 3, 7, 6}, {4, 5, 6, 7}};
-  const int is[6][4] = {{0, 1, 3, 4}, {1, 3, 4, 5}, {3, 4, 5, 7},
-                        {1, 2, 3, 6}, {3, 1, 6, 5}, {6, 3, 5, 7}};
+  //const int is[6][4] = {{0, 1, 3, 4}, {1, 3, 4, 5}, {3, 4, 5, 7},
+  //                      {1, 2, 3, 6}, {3, 1, 6, 5}, {6, 3, 5, 7}};
+  const int is[6][4] = {{0,1,3,7}, {0,4,1,7}, {1,4,5,7},
+                        {1,2,3,7}, {1,6,2,7}, {1,5,6,7}};
 
   if(opt->boundary > 0){
     opt->boundary--;
@@ -804,7 +806,8 @@ static void addScalarPrism(PView *p, double **xyz, double **val, bool pre)
   PViewOptions *opt = p->getOptions();
   const int iq[3][4] = {{0, 1, 4, 3}, {0, 3, 5, 2}, {1, 2, 5, 4}};
   const int it[2][3] = {{0, 2, 1}, {3, 4, 5}};
-  const int is[3][4] = {{0, 1, 2, 3}, {3, 4, 5, 2}, {1, 2, 4, 3}};
+  // const int is[3][4] = {{0, 1, 2, 3}, {3, 4, 5, 2}, {1, 2, 4, 3}};
+  const int is[3][4] = {{0,1,2,4}, {0,2,4,5}, {0,3,4,5}};
 
   if(opt->boundary > 0){
     opt->boundary--;
@@ -836,7 +839,8 @@ static void addScalarPyramid(PView *p, double **xyz,
   PViewOptions *opt = p->getOptions();
 
   const int it[4][3] = {{0, 1, 4}, {3, 0, 4}, {1, 2, 4}, {2, 3, 4}};
-  const int is[2][4] = {{0, 1, 2, 4}, {2, 3, 0, 4}};
+  //const int is[2][4] = {{0, 1, 2, 4}, {2, 3, 0, 4}};
+  const int is[2][4] = {{0,1,3,4}, {1,2,3,4}};
 
   if(opt->boundary > 0){
     opt->boundary--;
-- 
GitLab