Skip to content
Snippets Groups Projects
Commit caf7a0dd authored by Gauthier Becker's avatar Gauthier Becker
Browse files

Fix a bug in MHexahedron::getFaceVertices() and overload the isInside() method...

Fix a bug in MHexahedron::getFaceVertices() and overload the isInside() method in MTetrahedron10 and MTetrahedronN to account for the curvature of the element
parent 39137a30
No related branches found
No related tags found
No related merge requests found
...@@ -511,9 +511,9 @@ class MHexahedronN : public MHexahedron { ...@@ -511,9 +511,9 @@ class MHexahedronN : public MHexahedron {
for (int i = 0; i < 4; i++){ for (int i = 0; i < 4; i++){
for (int j = 0; j < _order - 1; j++) v[count++] = _vs[(_order-1)*f[num][i]+j]; for (int j = 0; j < _order - 1; j++) v[count++] = _vs[(_order-1)*f[num][i]+j];
} }
for (int i = 0; i < (_order + 1) * (_order + 1); i++){ int N = _order - 1;
int N = _order - 1; int start = 8 + 12 * N + num * (_order - 1) * (_order - 1);
int start = 8 + 12 * N + num * (_order - 1) * (_order - 1); for (int i = 0; i < (_order - 1) * (_order - 1); i++){
v[count++] = _vs[start + i]; v[count++] = _vs[start + i];
} }
} }
......
...@@ -128,7 +128,7 @@ class MTetrahedron : public MElement { ...@@ -128,7 +128,7 @@ class MTetrahedron : public MElement {
virtual double getInnerRadius(); virtual double getInnerRadius();
virtual double getCircumRadius(); virtual double getCircumRadius();
virtual double etaShapeMeasure(); virtual double etaShapeMeasure();
void xyz2uvw(double xyz[3], double uvw[3]) const; virtual void xyz2uvw(double xyz[3], double uvw[3]) const;
virtual const nodalBasis* getFunctionSpace(int o=-1) const; virtual const nodalBasis* getFunctionSpace(int o=-1) const;
virtual const JacobianBasis* getJacobianFuncSpace(int o=-1) const; virtual const JacobianBasis* getJacobianFuncSpace(int o=-1) const;
virtual void getNode(int num, double &u, double &v, double &w) const virtual void getNode(int num, double &u, double &v, double &w) const
...@@ -273,6 +273,10 @@ class MTetrahedron10 : public MTetrahedron { ...@@ -273,6 +273,10 @@ class MTetrahedron10 : public MTetrahedron {
{ {
num < 4 ? MTetrahedron::getNode(num, u, v, w) : MElement::getNode(num, u, v, w); num < 4 ? MTetrahedron::getNode(num, u, v, w) : MElement::getNode(num, u, v, w);
} }
void xyz2uvw(double xyz[3], double uvw[3]) const
{
return MElement::xyz2uvw(xyz,uvw);
}
}; };
/* tet order 3 FIXME: check the plot /* tet order 3 FIXME: check the plot
...@@ -393,6 +397,10 @@ class MTetrahedronN : public MTetrahedron { ...@@ -393,6 +397,10 @@ class MTetrahedronN : public MTetrahedron {
{ {
num < 4 ? MTetrahedron::getNode(num, u, v, w) : MElement::getNode(num, u, v, w); num < 4 ? MTetrahedron::getNode(num, u, v, w) : MElement::getNode(num, u, v, w);
} }
void xyz2uvw(double xyz[3], double uvw[3]) const
{
return MElement::xyz2uvw(xyz,uvw);
}
}; };
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment