46 {0, 3, 4}, {0, 1, 5}, {1, 2, 6}, {2, 3, 7}, {4, 5, 8}, {6, 7, 8}};
48 {0, 1, 4}, {0, 1, 2}, {0, 2, 3}, {0, 3, 4}, {1, 2, 4}, {2, 3, 4}};
50 {0, 1}, {0, 2}, {0, 3}, {0, 4}, {1, 4}, {1, 2}, {2, 3}, {3, 4}, {2, 4}};
52 {4, 5, 6, 7}, {1, 3, 8, -1}, {0, 2, 4, 7}, {1, 3, 8, -1}, {0, 2, 5, 6}};
60 :
Geometry3D(faces[0]->GetEdge(0)->GetVertex(0)->GetCoordim())
85 else if (faceidx == 1 || faceidx == 3)
110 if (
m_xmap->GetBasisNumModes(0) != 2 ||
111 m_xmap->GetBasisNumModes(1) != 2 ||
112 m_xmap->GetBasisNumModes(2) != 2)
122 for (
int i = 0; i < 3; ++i)
143 for (
int d = 4;
d < 6; ++
d)
194 for (f = 1; f < 5; f++)
196 int nEdges =
m_faces[f]->GetNumEdges();
198 for (i = 0; i < 4; i++)
200 for (j = 0; j < nEdges; j++)
204 edge = std::dynamic_pointer_cast<SegGeom>(
214 std::ostringstream errstrm;
215 errstrm <<
"Connected faces do not share an edge. Faces ";
222 std::ostringstream errstrm;
223 errstrm <<
"Connected faces share more than one edge. Faces ";
232 for (i = 0; i < 3; i++)
234 for (j = 0; j < 4; j++)
238 edge = std::dynamic_pointer_cast<SegGeom>(
247 std::ostringstream errstrm;
248 errstrm <<
"Connected faces do not share an edge. Faces ";
255 std::ostringstream errstrm;
256 errstrm <<
"Connected faces share more than one edge. Faces ";
262 for (f = 1; f < 4; f++)
265 for (i = 0; i <
m_faces[f]->GetNumEdges(); i++)
267 for (j = 0; j <
m_faces[f + 1]->GetNumEdges(); j++)
271 edge = std::dynamic_pointer_cast<SegGeom>(
281 std::ostringstream errstrm;
282 errstrm <<
"Connected faces do not share an edge. Faces ";
289 std::ostringstream errstrm;
290 errstrm <<
"Connected faces share more than one edge. Faces ";
299 for (i = 0; i < 4; i++)
301 for (j = 0; j < 4; j++)
305 edge = std::dynamic_pointer_cast<SegGeom>(
315 std::ostringstream errstrm;
316 errstrm <<
"Connected faces do not share an edge. Faces ";
323 std::ostringstream errstrm;
324 errstrm <<
"Connected faces share more than one edge. Faces ";
349 std::ostringstream errstrm;
350 errstrm <<
"Connected edges do not share a vertex. Edges ";
351 errstrm <<
m_edges[0]->GetGlobalID() <<
", "
357 for (
int i = 1; i < 3; i++)
369 std::ostringstream errstrm;
370 errstrm <<
"Connected edges do not share a vertex. Edges ";
371 errstrm <<
m_edges[i]->GetGlobalID() <<
", "
372 <<
m_edges[i - 1]->GetGlobalID();
393 std::ostringstream errstrm;
394 errstrm <<
"Connected edges do not share a vertex. Edges ";
395 errstrm <<
m_edges[8]->GetGlobalID();
406 const unsigned int edgeVerts[
kNedges][2] = {
407 {0, 1}, {1, 2}, {3, 2}, {0, 3}, {0, 4}, {1, 4}, {2, 5}, {3, 5}, {4, 5}};
423 ASSERTL0(
false,
"Could not find matching vertex for the edge");
451 unsigned int baseVertex;
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 if (f == 1 || f == 3)
508 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
509 (*
m_verts[faceVerts[f][0]])[i];
510 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
511 (*
m_verts[faceVerts[f][0]])[i];
518 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
519 (*
m_verts[faceVerts[f][0]])[i];
520 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
521 (*
m_verts[faceVerts[f][1]])[i];
528 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
529 (*
m_verts[faceVerts[f][2]])[i];
530 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
531 (*
m_verts[faceVerts[f][0]])[i];
536 ASSERTL0(
false,
"Could not find matching vertex for the face");
545 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
546 (*
m_verts[faceVerts[f][0]])[i];
547 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
548 (*
m_verts[faceVerts[f][0]])[i];
555 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
556 (*
m_verts[faceVerts[f][0]])[i];
557 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
558 (*
m_verts[faceVerts[f][1]])[i];
565 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
566 (*
m_verts[faceVerts[f][3]])[i];
567 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
568 (*
m_verts[faceVerts[f][1]])[i];
575 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
576 (*
m_verts[faceVerts[f][3]])[i];
577 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
578 (*
m_verts[faceVerts[f][0]])[i];
583 ASSERTL0(
false,
"Could not find matching vertex for the face");
590 int v =
m_faces[f]->GetNumVerts() - 1;
596 elementAaxis_length += pow(elementAaxis[i], 2);
597 elementBaxis_length += pow(elementBaxis[i], 2);
598 faceAaxis_length += pow(faceAaxis[i], 2);
599 faceBaxis_length += pow(faceBaxis[i], 2);
602 elementAaxis_length =
sqrt(elementAaxis_length);
603 elementBaxis_length =
sqrt(elementBaxis_length);
604 faceAaxis_length =
sqrt(faceAaxis_length);
605 faceBaxis_length =
sqrt(faceBaxis_length);
611 dotproduct1 += elementAaxis[i] * faceAaxis[i];
619 if (fabs(elementAaxis_length * faceAaxis_length - fabs(dotproduct1)) <
624 if (dotproduct1 < 0.0)
632 dotproduct2 += elementBaxis[i] * faceBaxis[i];
635 ASSERTL1(fabs(fabs(dotproduct2 / elementBaxis_length /
638 "These vectors should be parallel");
642 if (dotproduct2 < 0.0)
657 dotproduct1 += elementAaxis[i] * faceBaxis[i];
661 ASSERTL1(fabs(fabs(dotproduct1) / elementAaxis_length /
664 "These vectors should be parallel");
668 if (dotproduct1 < 0.0)
677 dotproduct2 += elementBaxis[i] * faceAaxis[i];
680 ASSERTL1(fabs(fabs(dotproduct2) / elementBaxis_length /
683 "These vectors should be parallel");
685 if (dotproduct2 < 0.0)
691 orientation = orientation + 5;
693 if ((f == 1) || (f == 3))
697 "Orientation of triangular face (id = " +
699 ") is inconsistent with face " + std::to_string(f) +
700 " of prism element (id = " + std::to_string(
m_globalID) +
701 ") since Dir2 is aligned with Dir1. Mesh setup "
702 "needs investigation");
714 for (
int i = 0; i < 5; ++i)
716 m_faces[i]->Reset(curvedEdges, curvedFaces);
724 for (
int i = 0; i < 5; ++i)
740 std::vector<int> tmp;
747 order0 = *std::max_element(tmp.begin(), tmp.end());
753 order0 = *std::max_element(tmp.begin(), tmp.end());
762 order1 = *std::max_element(tmp.begin(), tmp.end());
770 order1 = *std::max_element(tmp.begin(), tmp.end());
774 tmp.push_back(order0);
775 tmp.push_back(order1);
780 int order2 = *std::max_element(tmp.begin(), tmp.end());
#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.
std::vector< StdRegions::Orientation > m_forient
void v_CalculateInverseIsoParam() override
void v_FillGeom() override
Put all quadrature information into face/edge structure and backward transform.
std::vector< StdRegions::Orientation > m_eorient
bool m_setupState
Wether or not the setup routines have been run.
PointGeomSharedPtr GetVertex(int i) const
Returns vertex i of this object.
void SetUpCoeffs(const int nCoeffs)
Initialise the Geometry::m_coeffs array.
Geometry1DSharedPtr GetEdge(int i) const
Returns edge i of this object.
int GetVid(int i) const
Get the 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.
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...
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 SetUpEdgeOrientation()
void SetUpFaceOrientation()
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()
static const unsigned int VertexEdgeConnectivity[6][3]
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
@ 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.
std::shared_ptr< SegGeom > SegGeomSharedPtr
std::shared_ptr< Geometry2D > Geometry2DSharedPtr
@ ePtsFilled
Geometric information has been generated.
@ eDir1FwdDir2_Dir2FwdDir1
std::vector< double > d(NPUPPER *NPUPPER)
scalarT< T > sqrt(scalarT< T > in)