48 {4, 5, 6, 7}, {1, 3, 6, 7}, {0, 2, 4, 7}, {1, 3, 4, 5}, {0, 2, 5, 6}};
56 :
Geometry3D(faces[0]->GetEdge(0)->GetVertex(0)->GetCoordim())
93 if (
m_xmap->GetBasisNumModes(0) != 2 ||
94 m_xmap->GetBasisNumModes(1) != 2 ||
95 m_xmap->GetBasisNumModes(2) != 2)
105 for (
int i = 0; i < 3; ++i)
148 else if (faceidx == 1 || faceidx == 3)
173 for (f = 1; f < 5; f++)
175 int nEdges =
m_faces[f]->GetNumEdges();
177 for (i = 0; i < 4; i++)
179 for (j = 0; j < nEdges; j++)
193 std::ostringstream errstrm;
194 errstrm <<
"Connected faces do not share an edge. Faces ";
201 std::ostringstream errstrm;
202 errstrm <<
"Connected faces share more than one edge. Faces ";
211 for (i = 0; i < 3; i++)
213 for (j = 0; j < 3; j++)
225 std::ostringstream errstrm;
226 errstrm <<
"Connected faces do not share an edge. Faces ";
233 std::ostringstream errstrm;
234 errstrm <<
"Connected faces share more than one edge. Faces ";
241 for (f = 1; f < 4; f++)
244 for (i = 0; i <
m_faces[f]->GetNumEdges(); i++)
246 for (j = 0; j <
m_faces[f + 1]->GetNumEdges(); j++)
260 std::ostringstream errstrm;
261 errstrm <<
"Connected faces do not share an edge. Faces ";
268 std::ostringstream errstrm;
269 errstrm <<
"Connected faces share more than one edge. Faces ";
294 std::ostringstream errstrm;
295 errstrm <<
"Connected edges do not share a vertex. Edges ";
296 errstrm <<
m_edges[0]->GetGlobalID() <<
", "
302 for (
int i = 1; i < 3; i++)
314 std::ostringstream errstrm;
315 errstrm <<
"Connected edges do not share a vertex. Edges ";
316 errstrm <<
m_edges[i]->GetGlobalID() <<
", "
317 <<
m_edges[i - 1]->GetGlobalID();
333 for (
int i = 5; i < 8; ++i)
345 std::ostringstream errstrm;
346 errstrm <<
"Connected edges do not share a vertex. Edges ";
347 errstrm <<
m_edges[3]->GetGlobalID() <<
", "
358 const unsigned int edgeVerts[
kNedges][2] = {{0, 1}, {1, 2}, {3, 2}, {0, 3},
359 {0, 4}, {1, 4}, {2, 4}, {3, 4}};
375 ASSERTL0(
false,
"Could not find matching vertex for the edge");
401 unsigned int baseVertex;
412 const unsigned int faceVerts[
kNfaces][4] = {
422 unsigned int orientation;
428 elementAaxis_length = 0.0;
429 elementBaxis_length = 0.0;
430 faceAaxis_length = 0.0;
431 faceBaxis_length = 0.0;
436 baseVertex =
m_faces[f]->GetVid(0);
453 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
454 (*
m_verts[faceVerts[f][0]])[i];
455 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
456 (*
m_verts[faceVerts[f][0]])[i];
463 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
464 (*
m_verts[faceVerts[f][0]])[i];
465 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
466 (*
m_verts[faceVerts[f][1]])[i];
473 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
474 (*
m_verts[faceVerts[f][2]])[i];
475 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
476 (*
m_verts[faceVerts[f][0]])[i];
481 ASSERTL0(
false,
"Could not find matching vertex for the face");
490 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
491 (*
m_verts[faceVerts[f][0]])[i];
492 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
493 (*
m_verts[faceVerts[f][0]])[i];
500 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
501 (*
m_verts[faceVerts[f][0]])[i];
502 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
503 (*
m_verts[faceVerts[f][1]])[i];
510 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
511 (*
m_verts[faceVerts[f][3]])[i];
512 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
513 (*
m_verts[faceVerts[f][1]])[i];
520 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
521 (*
m_verts[faceVerts[f][3]])[i];
522 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
523 (*
m_verts[faceVerts[f][0]])[i];
528 ASSERTL0(
false,
"Could not find matching vertex for the face");
536 int v =
m_faces[f]->GetNumVerts() - 1;
542 elementAaxis_length += pow(elementAaxis[i], 2);
543 elementBaxis_length += pow(elementBaxis[i], 2);
544 faceAaxis_length += pow(faceAaxis[i], 2);
545 faceBaxis_length += pow(faceBaxis[i], 2);
548 elementAaxis_length =
sqrt(elementAaxis_length);
549 elementBaxis_length =
sqrt(elementBaxis_length);
550 faceAaxis_length =
sqrt(faceAaxis_length);
551 faceBaxis_length =
sqrt(faceBaxis_length);
557 dotproduct1 += elementAaxis[i] * faceAaxis[i];
561 fabs(dotproduct1) / elementAaxis_length / faceAaxis_length;
571 if (dotproduct1 < 0.0)
579 dotproduct2 += elementBaxis[i] * faceBaxis[i];
582 norm = fabs(dotproduct2) / elementBaxis_length / faceBaxis_length;
586 "These vectors should be parallel");
590 if (dotproduct2 < 0.0)
605 dotproduct1 += elementAaxis[i] * faceBaxis[i];
608 norm = fabs(dotproduct1) / elementAaxis_length / faceBaxis_length;
610 "These vectors should be parallel");
614 if (dotproduct1 < 0.0)
623 dotproduct2 += elementBaxis[i] * faceAaxis[i];
626 norm = fabs(dotproduct2) / elementBaxis_length / faceAaxis_length;
630 "These vectors should be parallel");
632 if (dotproduct2 < 0.0)
638 orientation = orientation + 5;
644 "Orientation of triangular face (id = " +
646 ") is inconsistent with face " +
647 boost::lexical_cast<string>(f) +
648 " of pyramid element (id = " +
650 ") since Dir2 is aligned with Dir1. Mesh setup "
651 "needs investigation");
663 for (
int i = 0; i < 5; ++i)
665 m_faces[i]->Reset(curvedEdges, curvedFaces);
676 for (
int i = 0; i < 5; ++i)
699 order0 = *max_element(tmp.begin(), tmp.end());
705 order0 = *max_element(tmp.begin(), tmp.end());
714 order1 = *max_element(tmp.begin(), tmp.end());
722 order1 = *max_element(tmp.begin(), tmp.end());
726 tmp.push_back(order0);
727 tmp.push_back(order1);
732 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_GenGeomFactors() override
void SetUpFaceOrientation()
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 SetUpLocalVertices()
void SetUpXmap()
Set up the m_xmap object by determining the order of each direction from derived faces.
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 int kNtfaces
static const int kNqfaces
static const unsigned int EdgeNormalToFaceVert[5][4]
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.
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eModifiedPyr_C
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
scalarT< T > sqrt(scalarT< T > in)