From 59b5d513e4786c7cc89ae1116d3bf6d9ba3756aa Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Thu, 16 Oct 2008 14:45:11 +0000 Subject: [PATCH] fix for pyramids --- Geo/MElement.h | 1 + Post/PViewDataList.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Geo/MElement.h b/Geo/MElement.h index 9979f8eb99..ce3c8a8f41 100644 --- a/Geo/MElement.h +++ b/Geo/MElement.h @@ -2598,6 +2598,7 @@ class MPyramid : public MElement { } int faces_pyramid(const int face, const int vert) const { + // only triangular faces static const int f[4][3] = { {0, 1, 4}, {3, 0, 4}, diff --git a/Post/PViewDataList.cpp b/Post/PViewDataList.cpp index b15988e9cc..d21a975c7a 100644 --- a/Post/PViewDataList.cpp +++ b/Post/PViewDataList.cpp @@ -309,9 +309,9 @@ void PViewDataList::_setLast(int ele) else _setLast(ele - _index[19], 3, 6, 9, 9, TI, NbTI); } else{ // pyramids - if(ele < _index[21]) _setLast(ele - _index[20], 3, 5, 1, 15, SY, NbSY); - else if(ele < _index[22]) _setLast(ele - _index[21], 3, 5, 3, 15, VY, NbVY); - else _setLast(ele - _index[22], 3, 5, 9, 15, TY, NbTY); + if(ele < _index[21]) _setLast(ele - _index[20], 3, 5, 1, 8, SY, NbSY); + else if(ele < _index[22]) _setLast(ele - _index[21], 3, 5, 3, 8, VY, NbVY); + else _setLast(ele - _index[22], 3, 5, 9, 8, TY, NbTY); } } -- GitLab