48 {0, 3, 4}, {0, 1, 5}, {1, 2, 6}, {2, 3, 7}, {4, 5, 8}, {6, 7, 8}};
50 {0, 1, 4}, {0, 1, 2}, {0, 2, 3}, {0, 3, 4}, {1, 2, 4}, {2, 3, 4}};
52 {0, 1}, {0, 2}, {0, 3}, {0, 4}, {1, 4}, {1, 2}, {2, 3}, {3, 4}, {2, 4}};
54 {4, 5, 6, 7}, {1, 3, 8, -1}, {0, 2, 4, 7}, {1, 3, 8, -1}, {0, 2, 5, 6}};
62 :
Geometry3D(faces[0]->GetEdge(0)->GetVertex(0)->GetCoordim())
91 else if (faceidx == 1 || faceidx == 3)
116 if (
m_xmap->GetBasisNumModes(0) != 2 ||
117 m_xmap->GetBasisNumModes(1) != 2 ||
118 m_xmap->GetBasisNumModes(2) != 2)
128 for (
int i = 0; i < 3; ++i)
149 for (
int d = 4;
d < 6; ++
d)
200 for (f = 1; f < 5; f++)
202 int nEdges =
m_faces[f]->GetNumEdges();
204 for (i = 0; i < 4; i++)
206 for (j = 0; j < nEdges; j++)
220 std::ostringstream errstrm;
221 errstrm <<
"Connected faces do not share an edge. Faces ";
228 std::ostringstream errstrm;
229 errstrm <<
"Connected faces share more than one edge. Faces ";
238 for (i = 0; i < 3; i++)
240 for (j = 0; j < 4; j++)
252 std::ostringstream errstrm;
253 errstrm <<
"Connected faces do not share an edge. Faces ";
260 std::ostringstream errstrm;
261 errstrm <<
"Connected faces share more than one edge. Faces ";
267 for (f = 1; f < 4; f++)
270 for (i = 0; i <
m_faces[f]->GetNumEdges(); i++)
272 for (j = 0; j <
m_faces[f + 1]->GetNumEdges(); j++)
286 std::ostringstream errstrm;
287 errstrm <<
"Connected faces do not share an edge. Faces ";
294 std::ostringstream errstrm;
295 errstrm <<
"Connected faces share more than one edge. Faces ";
304 for (i = 0; i < 4; i++)
306 for (j = 0; j < 4; j++)
319 std::ostringstream errstrm;
320 errstrm <<
"Connected faces do not share an edge. Faces ";
327 std::ostringstream errstrm;
328 errstrm <<
"Connected faces share more than one edge. Faces ";
353 std::ostringstream errstrm;
354 errstrm <<
"Connected edges do not share a vertex. Edges ";
355 errstrm <<
m_edges[0]->GetGlobalID() <<
", "
361 for (
int i = 1; i < 3; i++)
373 std::ostringstream errstrm;
374 errstrm <<
"Connected edges do not share a vertex. Edges ";
375 errstrm <<
m_edges[i]->GetGlobalID() <<
", "
376 <<
m_edges[i - 1]->GetGlobalID();
397 std::ostringstream errstrm;
398 errstrm <<
"Connected edges do not share a vertex. Edges ";
399 errstrm <<
m_edges[8]->GetGlobalID();
410 const unsigned int edgeVerts[
kNedges][2] = {
411 {0, 1}, {1, 2}, {3, 2}, {0, 3}, {0, 4}, {1, 4}, {2, 5}, {3, 5}, {4, 5}};
427 ASSERTL0(
false,
"Could not find matching vertex for the edge");
455 unsigned int baseVertex;
478 unsigned int orientation;
484 elementAaxis_length = 0.0;
485 elementBaxis_length = 0.0;
486 faceAaxis_length = 0.0;
487 faceBaxis_length = 0.0;
492 baseVertex =
m_faces[f]->GetVid(0);
506 if (f == 1 || f == 3)
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][0]])[i];
522 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
523 (*
m_verts[faceVerts[f][0]])[i];
524 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
525 (*
m_verts[faceVerts[f][1]])[i];
532 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
533 (*
m_verts[faceVerts[f][2]])[i];
534 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
535 (*
m_verts[faceVerts[f][0]])[i];
540 ASSERTL0(
false,
"Could not find matching vertex for the face");
549 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
550 (*
m_verts[faceVerts[f][0]])[i];
551 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
552 (*
m_verts[faceVerts[f][0]])[i];
559 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
560 (*
m_verts[faceVerts[f][0]])[i];
561 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
562 (*
m_verts[faceVerts[f][1]])[i];
569 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
570 (*
m_verts[faceVerts[f][3]])[i];
571 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
572 (*
m_verts[faceVerts[f][1]])[i];
579 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
580 (*
m_verts[faceVerts[f][3]])[i];
581 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
582 (*
m_verts[faceVerts[f][0]])[i];
587 ASSERTL0(
false,
"Could not find matching vertex for the face");
594 int v =
m_faces[f]->GetNumVerts() - 1;
600 elementAaxis_length += pow(elementAaxis[i], 2);
601 elementBaxis_length += pow(elementBaxis[i], 2);
602 faceAaxis_length += pow(faceAaxis[i], 2);
603 faceBaxis_length += pow(faceBaxis[i], 2);
606 elementAaxis_length =
sqrt(elementAaxis_length);
607 elementBaxis_length =
sqrt(elementBaxis_length);
608 faceAaxis_length =
sqrt(faceAaxis_length);
609 faceBaxis_length =
sqrt(faceBaxis_length);
615 dotproduct1 += elementAaxis[i] * faceAaxis[i];
623 if (fabs(elementAaxis_length * faceAaxis_length - fabs(dotproduct1)) <
628 if (dotproduct1 < 0.0)
636 dotproduct2 += elementBaxis[i] * faceBaxis[i];
639 ASSERTL1(fabs(fabs(dotproduct2 / elementBaxis_length /
642 "These vectors should be parallel");
646 if (dotproduct2 < 0.0)
661 dotproduct1 += elementAaxis[i] * faceBaxis[i];
665 ASSERTL1(fabs(fabs(dotproduct1) / elementAaxis_length /
668 "These vectors should be parallel");
672 if (dotproduct1 < 0.0)
681 dotproduct2 += elementBaxis[i] * faceAaxis[i];
684 ASSERTL1(fabs(fabs(dotproduct2) / elementBaxis_length /
687 "These vectors should be parallel");
689 if (dotproduct2 < 0.0)
695 orientation = orientation + 5;
697 if ((f == 1) || (f == 3))
701 "Orientation of triangular face (id = " +
703 ") is inconsistent with face " +
704 boost::lexical_cast<string>(f) +
705 " of prism element (id = " +
707 ") since Dir2 is aligned with Dir1. Mesh setup "
708 "needs investigation");
720 for (
int i = 0; i < 5; ++i)
722 m_faces[i]->Reset(curvedEdges, curvedFaces);
730 for (
int i = 0; i < 5; ++i)
753 order0 = *max_element(tmp.begin(), tmp.end());
759 order0 = *max_element(tmp.begin(), tmp.end());
768 order1 = *max_element(tmp.begin(), tmp.end());
776 order1 = *max_element(tmp.begin(), tmp.end());
780 tmp.push_back(order0);
781 tmp.push_back(order1);
786 int order2 = *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)