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())
94 if (
m_xmap->GetBasisNumModes(0) != 2 ||
m_xmap->GetBasisNumModes(1) != 2 ||
95 m_xmap->GetBasisNumModes(2) != 2)
104 for (
int i = 0; i < 3; ++i)
118 0.125 * (-
A + B + C - D - E + F + G - H);
120 0.125 * (-
A - B + C + D - E - F + G + H);
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);
137 for (
int d = 4; d < 8; ++d)
186 if (faceidx == 0 || faceidx == 5)
190 else if (faceidx == 1 || faceidx == 3)
208 for (f = 1; f < 5; f++)
211 for (i = 0; i < 4; i++)
213 for (j = 0; j < 4; j++)
226 std::ostringstream errstrm;
227 errstrm <<
"Connected faces do not share an edge. Faces ";
234 std::ostringstream errstrm;
235 errstrm <<
"Connected faces share more than one edge. Faces ";
244 for (i = 0; i < 4; i++)
246 for (j = 0; j < 4; j++)
257 std::ostringstream errstrm;
258 errstrm <<
"Connected faces do not share an edge. Faces ";
265 std::ostringstream errstrm;
266 errstrm <<
"Connected faces share more than one edge. Faces ";
271 for (f = 1; f < 4; f++)
274 for (i = 0; i < 4; i++)
276 for (j = 0; j < 4; j++)
289 std::ostringstream errstrm;
290 errstrm <<
"Connected faces do not share an edge. Faces ";
297 std::ostringstream errstrm;
298 errstrm <<
"Connected faces share more than one edge. Faces ";
306 for (f = 1; f < 5; f++)
309 for (i = 0; i < 4; i++)
311 for (j = 0; j < 4; j++)
324 std::ostringstream errstrm;
325 errstrm <<
"Connected faces do not share an edge. Faces ";
332 std::ostringstream errstrm;
333 errstrm <<
"Connected faces share more than one edge. Faces ";
358 std::ostringstream errstrm;
359 errstrm <<
"Connected edges do not share a vertex. Edges ";
360 errstrm <<
m_edges[0]->GetGlobalID() <<
", "
367 for (i = 1; i < 3; i++)
379 std::ostringstream errstrm;
380 errstrm <<
"Connected edges do not share a vertex. Edges ";
381 errstrm <<
m_edges[i]->GetGlobalID() <<
", "
382 <<
m_edges[i - 1]->GetGlobalID();
403 std::ostringstream errstrm;
404 errstrm <<
"Connected edges do not share a vertex. Edges ";
405 errstrm <<
m_edges[8]->GetGlobalID() <<
", "
411 for (i = 9; i < 11; i++)
423 std::ostringstream errstrm;
424 errstrm <<
"Connected edges do not share a vertex. Edges ";
425 errstrm <<
m_edges[i]->GetGlobalID() <<
", "
426 <<
m_edges[i - 1]->GetGlobalID();
455 unsigned int baseVertex;
468 {0, 1, 2, 3}, {0, 1, 5, 4}, {1, 2, 6, 5},
469 {3, 2, 6, 7}, {0, 3, 7, 4}, {4, 5, 6, 7}};
474 unsigned int orientation;
480 elementAaxis_length = 0.0;
481 elementBaxis_length = 0.0;
482 faceAaxis_length = 0.0;
483 faceBaxis_length = 0.0;
488 baseVertex =
m_faces[f]->GetVid(0);
502 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
503 (*
m_verts[faceVerts[f][0]])[i];
504 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
505 (*
m_verts[faceVerts[f][0]])[i];
512 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
513 (*
m_verts[faceVerts[f][0]])[i];
514 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
515 (*
m_verts[faceVerts[f][1]])[i];
522 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
523 (*
m_verts[faceVerts[f][3]])[i];
524 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
525 (*
m_verts[faceVerts[f][1]])[i];
532 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
533 (*
m_verts[faceVerts[f][3]])[i];
534 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
535 (*
m_verts[faceVerts[f][0]])[i];
541 "Could not find matching vertex for the face");
553 elementAaxis_length += pow(elementAaxis[i], 2);
554 elementBaxis_length += pow(elementBaxis[i], 2);
555 faceAaxis_length += pow(faceAaxis[i], 2);
556 faceBaxis_length += pow(faceBaxis[i], 2);
559 elementAaxis_length = std::sqrt(elementAaxis_length);
560 elementBaxis_length = std::sqrt(elementBaxis_length);
561 faceAaxis_length = std::sqrt(faceAaxis_length);
562 faceBaxis_length = std::sqrt(faceBaxis_length);
568 dotproduct1 += elementAaxis[i] * faceAaxis[i];
572 fabs(dotproduct1) / elementAaxis_length / faceAaxis_length;
582 if (dotproduct1 < 0.0)
590 dotproduct2 += elementBaxis[i] * faceBaxis[i];
593 norm = fabs(dotproduct2) / elementBaxis_length / faceBaxis_length;
599 "These vectors should be parallel");
604 if (dotproduct2 < 0.0)
619 dotproduct1 += elementAaxis[i] * faceBaxis[i];
622 norm = fabs(dotproduct1) / elementAaxis_length / faceBaxis_length;
628 "These vectors should be parallel");
633 if (dotproduct1 < 0.0)
642 dotproduct2 += elementBaxis[i] * faceAaxis[i];
645 norm = fabs(dotproduct2) / elementBaxis_length / faceAaxis_length;
651 "These vectors should be parallel");
654 if (dotproduct2 < 0.0)
660 orientation = orientation + 5;
672 const unsigned int edgeVerts[
kNedges][2] = {{0, 1}, {1, 2}, {2, 3}, {3, 0},
673 {0, 4}, {1, 5}, {2, 6}, {3, 7},
674 {4, 5}, {5, 6}, {6, 7}, {7, 4}};
691 "Could not find matching vertex for the edge");
700 for (
int i = 0; i < 6; ++i)
702 m_faces[i]->Reset(curvedEdges, curvedFaces);
713 for (
int i = 0; i < 6; ++i)
722 if (
m_xmap->GetBasisNumModes(0) != 2 ||
723 m_xmap->GetBasisNumModes(1) != 2 ||
724 m_xmap->GetBasisNumModes(2) != 2)
741 std::vector<int> tmp1;
765 int order0 = *std::max_element(tmp1.begin(), tmp1.end());
791 int order1 = *std::max_element(tmp1.begin(), tmp1.end());
817 int order2 = *std::max_element(tmp1.begin(), tmp1.end());
819 std::array<LibUtilities::BasisKey, 3> basis = {
857 int nFaceCoeffs =
m_faces[i]->GetXmap()->GetNcoeffs();
864 m_xmap->GetTraceToElementMap(
871 m_xmap->GetTraceToElementMap(
882 for (k = 0; k < nFaceCoeffs; k++)
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
Describes the specification for a Basis.
Defines a specification for a set of points.
static std::unique_ptr< DataType, UniquePtrDeleter > AllocateUniquePtr(const Args &...args)
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.
std::vector< Array< OneD, NekDouble > > m_coeffs
Array containing expansion coefficients of m_xmap.
LibUtilities::ShapeType m_shapeType
Type of shape.
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.
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]
GeomFactorsUniquePtr v_GenGeomFactors(LibUtilities::PointsKeyVector &keyTgt) override
Used by Expansion to generate associated GeomFactors.
static const unsigned int VertexFaceConnectivity[8][3]
void v_FillGeom() override
Put all quadrature information into face/edge structure and backward transform.
GeomType v_CalcGeomType() override
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()
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...
std::vector< PointsKey > PointsKeyVector
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eModified_A
Principle Modified Functions .
static const NekDouble kNekZeroTol
XmapFactory< StdRegions::StdHexExp, 3 > & GetStdHexFactory()
unique_ptr_objpool< GeomFactors > GeomFactorsUniquePtr
std::map< int, CurveUniquePtr > 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.