47 {0, 3, 4}, {0, 1, 5}, {1, 2, 6}, {2, 3, 7}, {4, 5, 8}, {6, 7, 8}};
49 {0, 1, 4}, {0, 1, 2}, {0, 2, 3}, {0, 3, 4}, {1, 2, 4}, {2, 3, 4}};
51 {0, 1}, {0, 2}, {0, 3}, {0, 4}, {1, 4}, {1, 2}, {2, 3}, {3, 4}, {2, 4}};
53 {4, 5, 6, 7}, {1, 3, 8, -1}, {0, 2, 4, 7}, {1, 3, 8, -1}, {0, 2, 5, 6}};
67 :
Geometry3D(faces[0]->GetEdge(0)->GetVertex(0)->GetCoordim())
86 else if (faceidx == 1 || faceidx == 3)
111 if (
m_xmap->GetBasisNumModes(0) != 2 ||
112 m_xmap->GetBasisNumModes(1) != 2 ||
113 m_xmap->GetBasisNumModes(2) != 2)
123 for (
int i = 0; i < 3; ++i)
144 for (
int d = 4; d < 6; ++d)
193 for (f = 1; f < 5; f++)
195 int nEdges =
m_faces[f]->GetNumEdges();
197 for (i = 0; i < 4; i++)
199 for (j = 0; j < nEdges; j++)
212 std::ostringstream errstrm;
213 errstrm <<
"Connected faces do not share an edge. Faces ";
220 std::ostringstream errstrm;
221 errstrm <<
"Connected faces share more than one edge. Faces ";
230 for (i = 0; i < 3; i++)
232 for (j = 0; j < 4; j++)
243 std::ostringstream errstrm;
244 errstrm <<
"Connected faces do not share an edge. Faces ";
251 std::ostringstream errstrm;
252 errstrm <<
"Connected faces share more than one edge. Faces ";
258 for (f = 1; f < 4; f++)
261 for (i = 0; i <
m_faces[f]->GetNumEdges(); i++)
263 for (j = 0; j <
m_faces[f + 1]->GetNumEdges(); j++)
276 std::ostringstream errstrm;
277 errstrm <<
"Connected faces do not share an edge. Faces ";
284 std::ostringstream errstrm;
285 errstrm <<
"Connected faces share more than one edge. Faces ";
294 for (i = 0; i < 4; i++)
296 for (j = 0; j < 4; j++)
308 std::ostringstream errstrm;
309 errstrm <<
"Connected faces do not share an edge. Faces ";
316 std::ostringstream errstrm;
317 errstrm <<
"Connected faces share more than one edge. Faces ";
342 std::ostringstream errstrm;
343 errstrm <<
"Connected edges do not share a vertex. Edges ";
344 errstrm <<
m_edges[0]->GetGlobalID() <<
", "
350 for (
int i = 1; i < 3; i++)
362 std::ostringstream errstrm;
363 errstrm <<
"Connected edges do not share a vertex. Edges ";
364 errstrm <<
m_edges[i]->GetGlobalID() <<
", "
365 <<
m_edges[i - 1]->GetGlobalID();
386 std::ostringstream errstrm;
387 errstrm <<
"Connected edges do not share a vertex. Edges ";
388 errstrm <<
m_edges[8]->GetGlobalID();
399 const unsigned int edgeVerts[
kNedges][2] = {
400 {0, 1}, {1, 2}, {3, 2}, {0, 3}, {0, 4}, {1, 4}, {2, 5}, {3, 5}, {4, 5}};
416 ASSERTL0(
false,
"Could not find matching vertex for the edge");
444 unsigned int baseVertex;
467 unsigned int orientation;
473 elementAaxis_length = 0.0;
474 elementBaxis_length = 0.0;
475 faceAaxis_length = 0.0;
476 faceBaxis_length = 0.0;
481 baseVertex =
m_faces[f]->GetVid(0);
495 if (f == 1 || f == 3)
501 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
502 (*
m_verts[faceVerts[f][0]])[i];
503 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
504 (*
m_verts[faceVerts[f][0]])[i];
511 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
512 (*
m_verts[faceVerts[f][0]])[i];
513 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
514 (*
m_verts[faceVerts[f][1]])[i];
521 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
522 (*
m_verts[faceVerts[f][2]])[i];
523 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
524 (*
m_verts[faceVerts[f][0]])[i];
529 ASSERTL0(
false,
"Could not find matching vertex for the face");
538 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
539 (*
m_verts[faceVerts[f][0]])[i];
540 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
541 (*
m_verts[faceVerts[f][0]])[i];
548 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
549 (*
m_verts[faceVerts[f][0]])[i];
550 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
551 (*
m_verts[faceVerts[f][1]])[i];
558 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
559 (*
m_verts[faceVerts[f][3]])[i];
560 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
561 (*
m_verts[faceVerts[f][1]])[i];
568 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
569 (*
m_verts[faceVerts[f][3]])[i];
570 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
571 (*
m_verts[faceVerts[f][0]])[i];
576 ASSERTL0(
false,
"Could not find matching vertex for the face");
583 int v =
m_faces[f]->GetNumVerts() - 1;
589 elementAaxis_length += pow(elementAaxis[i], 2);
590 elementBaxis_length += pow(elementBaxis[i], 2);
591 faceAaxis_length += pow(faceAaxis[i], 2);
592 faceBaxis_length += pow(faceBaxis[i], 2);
595 elementAaxis_length =
sqrt(elementAaxis_length);
596 elementBaxis_length =
sqrt(elementBaxis_length);
597 faceAaxis_length =
sqrt(faceAaxis_length);
598 faceBaxis_length =
sqrt(faceBaxis_length);
604 dotproduct1 += elementAaxis[i] * faceAaxis[i];
612 if (fabs(elementAaxis_length * faceAaxis_length - fabs(dotproduct1)) <
617 if (dotproduct1 < 0.0)
625 dotproduct2 += elementBaxis[i] * faceBaxis[i];
628 ASSERTL1(fabs(fabs(dotproduct2 / elementBaxis_length /
631 "These vectors should be parallel");
635 if (dotproduct2 < 0.0)
650 dotproduct1 += elementAaxis[i] * faceBaxis[i];
654 ASSERTL1(fabs(fabs(dotproduct1) / elementAaxis_length /
657 "These vectors should be parallel");
661 if (dotproduct1 < 0.0)
670 dotproduct2 += elementBaxis[i] * faceAaxis[i];
673 ASSERTL1(fabs(fabs(dotproduct2) / elementBaxis_length /
676 "These vectors should be parallel");
678 if (dotproduct2 < 0.0)
684 orientation = orientation + 5;
686 if ((f == 1) || (f == 3))
690 "Orientation of triangular face (id = " +
692 ") is inconsistent with face " + std::to_string(f) +
693 " of prism element (id = " + std::to_string(
m_globalID) +
694 ") since Dir2 is aligned with Dir1. Mesh setup "
695 "needs investigation");
707 for (
int i = 0; i < 5; ++i)
709 m_faces[i]->Reset(curvedEdges, curvedFaces);
717 for (
int i = 0; i < 5; ++i)
733 std::vector<int> tmp;
740 order0 = *std::max_element(tmp.begin(), tmp.end());
746 order0 = *std::max_element(tmp.begin(), tmp.end());
755 order1 = *std::max_element(tmp.begin(), tmp.end());
763 order1 = *std::max_element(tmp.begin(), tmp.end());
767 tmp.push_back(order0);
768 tmp.push_back(order1);
773 int order2 = *std::max_element(tmp.begin(), tmp.end());
775 std::array<LibUtilities::BasisKey, 3> basis = {
787 LibUtilities::eGaussRadauMAlpha1Beta0))};
813 int nFaceCoeffs =
m_faces[i]->GetXmap()->GetNcoeffs();
820 m_xmap->GetTraceToElementMap(
827 m_xmap->GetTraceToElementMap(
838 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.
void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces) override
Reset this geometry object: unset the current state, zero Geometry::m_coeffs and remove allocated Geo...
static const unsigned int EdgeFaceConnectivity[9][2]
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.
int v_GetDir(const int faceidx, const int facedir) const override
Returns the element coordinate direction corresponding to a given face coordinate direction.
void v_FillGeom() override
Put all quadrature information into face/edge structure and backward transform.
void SetUpEdgeOrientation()
void SetUpFaceOrientation()
std::array< PointGeom *, kNverts > m_verts
void v_GenGeomFactors() override
static const unsigned int EdgeNormalToFaceVert[5][4]
int v_GetEdgeFaceMap(const int i, const int j) const override
Returns the standard element edge IDs that are connected to a given face.
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.
static const unsigned int VertexFaceConnectivity[6][3]
static const int kNqfaces
void SetUpLocalVertices()
std::array< Geometry2D *, kNfaces > m_faces
std::array< StdRegions::Orientation, kNedges > m_eorient
std::array< StdRegions::Orientation, kNfaces > m_forient
static const unsigned int VertexEdgeConnectivity[6][3]
std::array< SegGeom *, kNedges > m_edges
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 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_B
Principle Modified Functions .
@ eModified_A
Principle Modified Functions .
static const NekDouble kNekZeroTol
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.
XmapFactory< StdRegions::StdPrismExp, 3 > & GetStdPrismFactory()
@ ePtsFilled
Geometric information has been generated.
@ eDir1FwdDir2_Dir2FwdDir1
scalarT< T > sqrt(scalarT< T > in)