46namespace SpatialDomains
50 {0, 3, 4}, {0, 1, 5}, {1, 2, 6}, {2, 3, 7},
51 {4, 8, 11}, {5, 8, 9}, {6, 9, 10}, {7, 10, 11}};
53 {0, 1, 4}, {0, 1, 2}, {0, 2, 3}, {0, 3, 4},
54 {1, 4, 5}, {1, 2, 5}, {2, 3, 5}, {3, 4, 5}};
56 {0, 1}, {0, 2}, {0, 3}, {0, 4}, {1, 4}, {1, 2},
57 {2, 3}, {3, 4}, {1, 5}, {2, 5}, {3, 5}, {4, 5}};
59 {4, 5, 6, 7}, {1, 3, 9, 11}, {0, 2, 8, 10},
60 {1, 3, 9, 11}, {0, 2, 8, 10}, {4, 5, 6, 7}};
68 :
Geometry3D(faces[0]->GetEdge(0)->GetVertex(0)->GetCoordim())
105 if (
m_xmap->GetBasisNumModes(0) != 2 ||
106 m_xmap->GetBasisNumModes(1) != 2 ||
107 m_xmap->GetBasisNumModes(2) != 2)
117 for (
int i = 0; i < 3; ++i)
129 0.125 * (
A + B + C + D + E + F + G + H);
132 0.125 * (-
A + B + C - D - E + F + G - H);
134 0.125 * (-
A - B + C + D - E - F + G + H);
136 0.125 * (-
A - B - C - D + E + F + G + H);
139 0.125 * (
A - B + C - D + E - F + G - H);
141 0.125 * (
A + B - C - D - E - F + G + H);
143 0.125 * (
A - B - C + D - E + F + G - H);
146 0.125 * (-
A + B - C + D + E - F + G - H);
151 for (
int d = 4;
d < 8; ++
d)
194 if (faceidx == 0 || faceidx == 5)
198 else if (faceidx == 1 || faceidx == 3)
218 for (f = 1; f < 5; f++)
221 for (i = 0; i < 4; i++)
223 for (j = 0; j < 4; j++)
227 edge = std::dynamic_pointer_cast<SegGeom>(
237 std::ostringstream errstrm;
238 errstrm <<
"Connected faces do not share an edge. Faces ";
245 std::ostringstream errstrm;
246 errstrm <<
"Connected faces share more than one edge. Faces ";
255 for (i = 0; i < 4; i++)
257 for (j = 0; j < 4; j++)
261 edge = std::dynamic_pointer_cast<SegGeom>(
270 std::ostringstream errstrm;
271 errstrm <<
"Connected faces do not share an edge. Faces ";
278 std::ostringstream errstrm;
279 errstrm <<
"Connected faces share more than one edge. Faces ";
284 for (f = 1; f < 4; f++)
287 for (i = 0; i < 4; i++)
289 for (j = 0; j < 4; j++)
293 edge = std::dynamic_pointer_cast<SegGeom>(
303 std::ostringstream errstrm;
304 errstrm <<
"Connected faces do not share an edge. Faces ";
311 std::ostringstream errstrm;
312 errstrm <<
"Connected faces share more than one edge. Faces ";
320 for (f = 1; f < 5; f++)
323 for (i = 0; i < 4; i++)
325 for (j = 0; j < 4; j++)
329 edge = std::dynamic_pointer_cast<SegGeom>(
339 std::ostringstream errstrm;
340 errstrm <<
"Connected faces do not share an edge. Faces ";
347 std::ostringstream errstrm;
348 errstrm <<
"Connected faces share more than one edge. Faces ";
373 std::ostringstream errstrm;
374 errstrm <<
"Connected edges do not share a vertex. Edges ";
375 errstrm <<
m_edges[0]->GetGlobalID() <<
", "
382 for (i = 1; i < 3; i++)
394 std::ostringstream errstrm;
395 errstrm <<
"Connected edges do not share a vertex. Edges ";
396 errstrm <<
m_edges[i]->GetGlobalID() <<
", "
397 <<
m_edges[i - 1]->GetGlobalID();
418 std::ostringstream errstrm;
419 errstrm <<
"Connected edges do not share a vertex. Edges ";
420 errstrm <<
m_edges[8]->GetGlobalID() <<
", "
426 for (i = 9; i < 11; i++)
438 std::ostringstream errstrm;
439 errstrm <<
"Connected edges do not share a vertex. Edges ";
440 errstrm <<
m_edges[i]->GetGlobalID() <<
", "
441 <<
m_edges[i - 1]->GetGlobalID();
470 unsigned int baseVertex;
483 {0, 1, 2, 3}, {0, 1, 5, 4}, {1, 2, 6, 5},
484 {3, 2, 6, 7}, {0, 3, 7, 4}, {4, 5, 6, 7}};
489 unsigned int orientation;
495 elementAaxis_length = 0.0;
496 elementBaxis_length = 0.0;
497 faceAaxis_length = 0.0;
498 faceBaxis_length = 0.0;
503 baseVertex =
m_faces[f]->GetVid(0);
519 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
520 (*
m_verts[faceVerts[f][0]])[i];
521 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
522 (*
m_verts[faceVerts[f][0]])[i];
529 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
530 (*
m_verts[faceVerts[f][0]])[i];
531 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
532 (*
m_verts[faceVerts[f][1]])[i];
539 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
540 (*
m_verts[faceVerts[f][3]])[i];
541 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
542 (*
m_verts[faceVerts[f][1]])[i];
549 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
550 (*
m_verts[faceVerts[f][3]])[i];
551 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
552 (*
m_verts[faceVerts[f][0]])[i];
557 ASSERTL0(
false,
"Could not find matching vertex for the face");
569 elementAaxis_length += pow(elementAaxis[i], 2);
570 elementBaxis_length += pow(elementBaxis[i], 2);
571 faceAaxis_length += pow(faceAaxis[i], 2);
572 faceBaxis_length += pow(faceBaxis[i], 2);
575 elementAaxis_length =
sqrt(elementAaxis_length);
576 elementBaxis_length =
sqrt(elementBaxis_length);
577 faceAaxis_length =
sqrt(faceAaxis_length);
578 faceBaxis_length =
sqrt(faceBaxis_length);
584 dotproduct1 += elementAaxis[i] * faceAaxis[i];
588 fabs(dotproduct1) / elementAaxis_length / faceAaxis_length;
598 if (dotproduct1 < 0.0)
606 dotproduct2 += elementBaxis[i] * faceBaxis[i];
609 norm = fabs(dotproduct2) / elementBaxis_length / faceBaxis_length;
613 "These vectors should be parallel");
617 if (dotproduct2 < 0.0)
632 dotproduct1 += elementAaxis[i] * faceBaxis[i];
635 norm = fabs(dotproduct1) / elementAaxis_length / faceBaxis_length;
639 "These vectors should be parallel");
643 if (dotproduct1 < 0.0)
652 dotproduct2 += elementBaxis[i] * faceAaxis[i];
655 norm = fabs(dotproduct2) / elementBaxis_length / faceAaxis_length;
659 "These vectors should be parallel");
661 if (dotproduct2 < 0.0)
667 orientation = orientation + 5;
679 const unsigned int edgeVerts[
kNedges][2] = {{0, 1}, {1, 2}, {2, 3}, {3, 0},
680 {0, 4}, {1, 5}, {2, 6}, {3, 7},
681 {4, 5}, {5, 6}, {6, 7}, {7, 4}};
697 ASSERTL0(
false,
"Could not find matching vertex for the edge");
706 for (
int i = 0; i < 6; ++i)
708 m_faces[i]->Reset(curvedEdges, curvedFaces);
719 for (
int i = 0; i < 6; ++i)
761 int order0 = *max_element(tmp1.begin(), tmp1.end());
787 int order1 = *max_element(tmp1.begin(), tmp1.end());
813 int order2 = *max_element(tmp1.begin(), tmp1.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
virtual void v_CalculateInverseIsoParam() override
virtual 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.
virtual 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]
void SetUpFaceOrientation()
static const unsigned int VertexEdgeConnectivity[8][3]
static const unsigned int VertexFaceConnectivity[8][3]
virtual 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()
void SetUpLocalVertices()
virtual void v_GenGeomFactors() override
virtual 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.
virtual 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
virtual void v_Setup() override
virtual 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]
virtual 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
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eModified_A
Principle Modified Functions .
static const NekDouble kNekZeroTol
std::shared_ptr< QuadGeom > QuadGeomSharedPtr
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
@ ePtsFilled
Geometric information has been generated.
std::vector< double > d(NPUPPER *NPUPPER)
The above copyright notice and this permission notice shall be included.
scalarT< T > sqrt(scalarT< T > in)