Skip to content
Snippets Groups Projects
Commit d5edb2a0 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

No commit message

No commit message
parent f27fc0c2
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <gmsh@onelab.info>.
#include <limits>
#include "MHexahedron.h"
#include "Numeric.h"
......
......@@ -15,9 +15,16 @@
void MPrism::getEdgeRep(bool curved, int num, double *x, double *y, double *z,
SVector3 *n)
{
static const int f[9] = {0, 1, 2, 0, 2, 3, 1, 1, 1};
MEdge e(getEdge(num));
_getEdgeRep(e.getVertex(0), e.getVertex(1), x, y, z, n, f[num]);
MVertex *v0 = _v[edges_prism(num, 0)];
MVertex *v1 = _v[edges_prism(num, 1)];
x[0] = v0->x(); y[0] = v0->y(); z[0] = v0->z();
x[1] = v1->x(); y[1] = v1->y(); z[1] = v1->z();
// just one of the potential normals - did not bother computing the normal of
// one of the faces - don't use MElement::_getEdgeRep as it uses MFace, which
// is slow
double nn[3];
normal2points(x[0], y[0], z[0], x[1], y[1], z[1], nn);
n[0] = n[1] = SVector3(nn[0], nn[1], nn[2]);
}
int MPrism::getVolumeSign()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment