53 {0, 3, 4}, {0, 1, 5}, {1, 2, 6}, {2, 3, 7},
54 {4, 8, 11}, {5, 8, 9}, {6, 9, 10}, {7, 10, 11}};
56 {0, 1, 4}, {0, 1, 2}, {0, 2, 3}, {0, 3, 4},
57 {1, 4, 5}, {1, 2, 5}, {2, 3, 5}, {3, 4, 5}};
59 {0, 1}, {0, 2}, {0, 3}, {0, 4}, {1, 4}, {1, 2},
60 {2, 3}, {3, 4}, {1, 5}, {2, 5}, {3, 5}, {4, 5}};
62 {4, 5, 6, 7}, {1, 3, 9, 11}, {0, 2, 8, 10},
63 {1, 3, 9, 11}, {0, 2, 8, 10}, {4, 5, 6, 7}};
71 :
Geometry3D(faces[0]->GetEdge(0)->GetVertex(0)->GetCoordim())
98 if (
m_xmap->GetBasisNumModes(0) != 2 ||
99 m_xmap->GetBasisNumModes(1) != 2 ||
100 m_xmap->GetBasisNumModes(2) != 2)
110 for (
int i = 0; i < 3; ++i)
122 0.125 * (
A + B + C + D + E + F + G + H);
125 0.125 * (-
A + B + C - D - E + F + G - H);
127 0.125 * (-
A - B + C + D - E - F + G + H);
129 0.125 * (-
A - B - C - D + E + F + G + H);
132 0.125 * (
A - B + C - D + E - F + G - H);
134 0.125 * (
A + B - C - D - E - F + G + H);
136 0.125 * (
A - B - C + D - E + F + G - H);
139 0.125 * (-
A + B - C + D + E - F + G - H);
144 for (
int d = 4; d < 8; ++d)
187 if (faceidx == 0 || faceidx == 5)
191 else if (faceidx == 1 || faceidx == 3)
209 for (f = 1; f < 5; f++)
212 for (i = 0; i < 4; i++)
214 for (j = 0; j < 4; j++)
227 std::ostringstream errstrm;
228 errstrm <<
"Connected faces do not share an edge. Faces ";
235 std::ostringstream errstrm;
236 errstrm <<
"Connected faces share more than one edge. Faces ";
245 for (i = 0; i < 4; i++)
247 for (j = 0; j < 4; j++)
258 std::ostringstream errstrm;
259 errstrm <<
"Connected faces do not share an edge. Faces ";
266 std::ostringstream errstrm;
267 errstrm <<
"Connected faces share more than one edge. Faces ";
272 for (f = 1; f < 4; f++)
275 for (i = 0; i < 4; i++)
277 for (j = 0; j < 4; j++)
290 std::ostringstream errstrm;
291 errstrm <<
"Connected faces do not share an edge. Faces ";
298 std::ostringstream errstrm;
299 errstrm <<
"Connected faces share more than one edge. Faces ";
307 for (f = 1; f < 5; f++)
310 for (i = 0; i < 4; i++)
312 for (j = 0; j < 4; j++)
325 std::ostringstream errstrm;
326 errstrm <<
"Connected faces do not share an edge. Faces ";
333 std::ostringstream errstrm;
334 errstrm <<
"Connected faces share more than one edge. Faces ";
359 std::ostringstream errstrm;
360 errstrm <<
"Connected edges do not share a vertex. Edges ";
361 errstrm <<
m_edges[0]->GetGlobalID() <<
", "
368 for (i = 1; i < 3; i++)
380 std::ostringstream errstrm;
381 errstrm <<
"Connected edges do not share a vertex. Edges ";
382 errstrm <<
m_edges[i]->GetGlobalID() <<
", "
383 <<
m_edges[i - 1]->GetGlobalID();
404 std::ostringstream errstrm;
405 errstrm <<
"Connected edges do not share a vertex. Edges ";
406 errstrm <<
m_edges[8]->GetGlobalID() <<
", "
412 for (i = 9; i < 11; i++)
424 std::ostringstream errstrm;
425 errstrm <<
"Connected edges do not share a vertex. Edges ";
426 errstrm <<
m_edges[i]->GetGlobalID() <<
", "
427 <<
m_edges[i - 1]->GetGlobalID();
456 unsigned int baseVertex;
469 {0, 1, 2, 3}, {0, 1, 5, 4}, {1, 2, 6, 5},
470 {3, 2, 6, 7}, {0, 3, 7, 4}, {4, 5, 6, 7}};
475 unsigned int orientation;
481 elementAaxis_length = 0.0;
482 elementBaxis_length = 0.0;
483 faceAaxis_length = 0.0;
484 faceBaxis_length = 0.0;
489 baseVertex =
m_faces[f]->GetVid(0);
505 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
506 (*
m_verts[faceVerts[f][0]])[i];
507 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
508 (*
m_verts[faceVerts[f][0]])[i];
515 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
516 (*
m_verts[faceVerts[f][0]])[i];
517 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
518 (*
m_verts[faceVerts[f][1]])[i];
525 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
526 (*
m_verts[faceVerts[f][3]])[i];
527 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
528 (*
m_verts[faceVerts[f][1]])[i];
535 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
536 (*
m_verts[faceVerts[f][3]])[i];
537 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
538 (*
m_verts[faceVerts[f][0]])[i];
543 ASSERTL0(
false,
"Could not find matching vertex for the face");
555 elementAaxis_length += pow(elementAaxis[i], 2);
556 elementBaxis_length += pow(elementBaxis[i], 2);
557 faceAaxis_length += pow(faceAaxis[i], 2);
558 faceBaxis_length += pow(faceBaxis[i], 2);
561 elementAaxis_length = std::sqrt(elementAaxis_length);
562 elementBaxis_length = std::sqrt(elementBaxis_length);
563 faceAaxis_length = std::sqrt(faceAaxis_length);
564 faceBaxis_length = std::sqrt(faceBaxis_length);
570 dotproduct1 += elementAaxis[i] * faceAaxis[i];
574 fabs(dotproduct1) / elementAaxis_length / faceAaxis_length;
584 if (dotproduct1 < 0.0)
592 dotproduct2 += elementBaxis[i] * faceBaxis[i];
595 norm = fabs(dotproduct2) / elementBaxis_length / faceBaxis_length;
599 "These vectors should be parallel");
603 if (dotproduct2 < 0.0)
618 dotproduct1 += elementAaxis[i] * faceBaxis[i];
621 norm = fabs(dotproduct1) / elementAaxis_length / faceBaxis_length;
625 "These vectors should be parallel");
629 if (dotproduct1 < 0.0)
638 dotproduct2 += elementBaxis[i] * faceAaxis[i];
641 norm = fabs(dotproduct2) / elementBaxis_length / faceAaxis_length;
645 "These vectors should be parallel");
647 if (dotproduct2 < 0.0)
653 orientation = orientation + 5;
665 const unsigned int edgeVerts[
kNedges][2] = {{0, 1}, {1, 2}, {2, 3}, {3, 0},
666 {0, 4}, {1, 5}, {2, 6}, {3, 7},
667 {4, 5}, {5, 6}, {6, 7}, {7, 4}};
683 ASSERTL0(
false,
"Could not find matching vertex for the edge");
692 for (
int i = 0; i < 6; ++i)
694 m_faces[i]->Reset(curvedEdges, curvedFaces);
705 for (
int i = 0; i < 6; ++i)
723 std::vector<int> tmp1;
747 int order0 = *std::max_element(tmp1.begin(), tmp1.end());
773 int order1 = *std::max_element(tmp1.begin(), tmp1.end());
799 int order2 = *std::max_element(tmp1.begin(), tmp1.end());
801 std::array<LibUtilities::BasisKey, 3> basis = {
839 int nFaceCoeffs =
m_faces[i]->GetXmap()->GetNcoeffs();
846 m_xmap->GetTraceToElementMap(
853 m_xmap->GetTraceToElementMap(
864 for (k = 0; k < nFaceCoeffs; k++)
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Describes the specification for a Basis.
Defines a specification for a set of points.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
void v_CalculateInverseIsoParam() override
bool m_setupState
Wether or not the setup routines have been run.
GeomState m_state
Enumeration to dictate whether coefficients are filled.
void SetUpCoeffs(const int nCoeffs)
Initialise the Geometry::m_coeffs array.
int GetVid(int i) const
Returns global id of vertex i of this object.
Array< OneD, Array< OneD, NekDouble > > m_isoParameter
virtual void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces)
Reset this geometry object: unset the current state, zero Geometry::m_coeffs and remove allocated Geo...
int GetGlobalID(void) const
Get the ID of this object.
PointGeom * GetVertex(int i) const
Returns vertex i of this object.
LibUtilities::ShapeType m_shapeType
Type of shape.
Array< OneD, Array< OneD, NekDouble > > m_coeffs
Array containing expansion coefficients of m_xmap.
GeomState m_geomFactorsState
State of the geometric factors.
StdRegions::StdExpansionSharedPtr m_xmap
mapping containing isoparametric transformation.
StdRegions::StdExpansionSharedPtr GetXmap() const
Return the mapping object Geometry::m_xmap that represents the coordinate transformation from standar...
Geometry1D * GetEdge(int i) const
Returns edge i of this object.
GeomFactorsSharedPtr m_geomFactors
Geometric factors.
int m_coordim
Coordinate dimension of this geometry object.
int GetEid(int i) const
Get the ID of edge i of this object.
int v_GetDir(const int faceidx, const int facedir) const override
Returns the element coordinate direction corresponding to a given face coordinate direction.
static const unsigned int EdgeFaceConnectivity[12][2]
std::array< QuadGeom *, kNfaces > m_faces
std::array< StdRegions::Orientation, kNedges > m_eorient
void SetUpFaceOrientation()
static const unsigned int VertexEdgeConnectivity[8][3]
static const unsigned int VertexFaceConnectivity[8][3]
void v_FillGeom() override
Put all quadrature information into face/edge structure and backward transform.
std::array< StdRegions::Orientation, kNfaces > m_forient
void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces) override
Reset this geometry object: unset the current state, zero Geometry::m_coeffs and remove allocated Geo...
void SetUpEdgeOrientation()
std::array< SegGeom *, kNedges > m_edges
void SetUpLocalVertices()
void v_GenGeomFactors() override
std::array< PointGeom *, kNverts > m_verts
int v_GetEdgeNormalToFaceVert(const int i, const int j) const override
Returns the standard lement edge IDs that are normal to a given face vertex.
int v_GetEdgeFaceMap(const int i, const int j) const override
Returns the standard element edge IDs that are connected to a given face.
static const int kNqfaces
int v_GetVertexEdgeMap(const int i, const int j) const override
Returns the standard element edge IDs that are connected to a given vertex.
static const unsigned int EdgeNormalToFaceVert[6][4]
int v_GetVertexFaceMap(const int i, const int j) const override
Returns the standard element face IDs that are connected to a given vertex.
void SetUpXmap()
Set up the m_xmap object by determining the order of each direction from derived faces.
static const int kNtfaces
A simple factory for Xmap objects that is based on the element type, the basis and quadrature selecti...
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eModified_A
Principle Modified Functions .
static const NekDouble kNekZeroTol
XmapFactory< StdRegions::StdHexExp, 3 > & GetStdHexFactory()
std::unordered_map< int, CurveSharedPtr > CurveMap
GeomType
Indicates the type of element geometry.
@ eRegular
Geometry is straight-sided with constant geometric factors.
@ eDeformed
Geometry is curved or has non-constant factors.
@ ePtsFilled
Geometric information has been generated.