diff --git a/Geo/MHexahedron.h b/Geo/MHexahedron.h index d2f460d102aaefa319befcce232d5b11649ced5d..871881b8ee24c2098e9f2855fa1112236cb7cb7e 100644 --- a/Geo/MHexahedron.h +++ b/Geo/MHexahedron.h @@ -499,20 +499,38 @@ class MHexahedronN : public MHexahedron { { v.resize((_order+1)*(_order+1)); MHexahedron::_getFaceVertices(num, v); +// static const int f[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} +// }; + // this is the local edge number indexed from 1. A minus sign is used to indicate that the nodes of the edge must be inverted in order to obtain a MQuandrangleN static const int f[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} + {2,-6,-4,-1}, + {1,5,-9,-3}, + {3,10,-8,-2}, + {4,7,-11,-5}, + {6,8,-12,-7}, + {9,11,12,-10} }; int count = 4; for (int i = 0; i < 4; i++){ - for (int j = 0; j < _order - 1; j++) v[count++] = _vs[(_order-1)*f[num][i]+j]; + if(f[num][i]>0) + { + int edge_num = f[num][i]-1; + for (int j = 0; j < _order - 1; j++) v[count++] = _vs[(_order-1)*edge_num+j]; + } + else + { + int edge_num = -f[num][i]-1; + for (int j = _order-2; j > - 1; j--) v[count++] = _vs[(_order-1)*edge_num+j]; + } } int N = _order - 1; - int start = 8 + 12 * N + num * (_order - 1) * (_order - 1); + int start = 12 * N + num * (_order - 1) * (_order - 1);// -8 as _vs has not the 8 first order nodes for (int i = 0; i < (_order - 1) * (_order - 1); i++){ v[count++] = _vs[start + i]; } diff --git a/contrib/Netgen/libsrc/occ/occgeom.cpp b/contrib/Netgen/libsrc/occ/occgeom.cpp index a363607b645ef914a16d81deef2e21076959614d..964688bd65195309259977a4a2d4102017fec138 100644 --- a/contrib/Netgen/libsrc/occ/occgeom.cpp +++ b/contrib/Netgen/libsrc/occ/occgeom.cpp @@ -574,7 +574,7 @@ namespace netgen cout << "Edges : " << nnre << " (" << nre << ")" << endl; cout << "Vertices : " << nnrv << " (" << nrv << ")" << endl; cout << endl; - cout << "Totol surface area : " << newsurfacecont << " (" << surfacecont << ")" << endl; + cout << "Total surface area : " << newsurfacecont << " (" << surfacecont << ")" << endl; cout << endl; }