46 {0, 3, 4}, {0, 1, 5}, {1, 2, 6}, {2, 3, 7},
47 {4, 8, 11}, {5, 8, 9}, {6, 9, 10}, {7, 10, 11}};
49 {0, 1, 4}, {0, 1, 2}, {0, 2, 3}, {0, 3, 4},
50 {1, 4, 5}, {1, 2, 5}, {2, 3, 5}, {3, 4, 5}};
52 {0, 1}, {0, 2}, {0, 3}, {0, 4}, {1, 4}, {1, 2},
53 {2, 3}, {3, 4}, {1, 5}, {2, 5}, {3, 5}, {4, 5}};
55 {4, 5, 6, 7}, {1, 3, 9, 11}, {0, 2, 8, 10},
56 {1, 3, 9, 11}, {0, 2, 8, 10}, {4, 5, 6, 7}};
64 :
Geometry3D(faces[0]->GetEdge(0)->GetVertex(0)->GetCoordim())
97 if (
m_xmap->GetBasisNumModes(0) != 2 ||
98 m_xmap->GetBasisNumModes(1) != 2 ||
99 m_xmap->GetBasisNumModes(2) != 2)
109 for (
int i = 0; i < 3; ++i)
121 0.125 * (
A + B + C + D + E + F + G + H);
124 0.125 * (-
A + B + C - D - E + F + G - H);
126 0.125 * (-
A - B + C + D - E - F + G + H);
128 0.125 * (-
A - B - C - D + E + F + G + H);
131 0.125 * (
A - B + C - D + E - F + G - H);
133 0.125 * (
A + B - C - D - E - F + G + H);
135 0.125 * (
A - B - C + D - E + F + G - H);
138 0.125 * (-
A + B - C + D + E - F + G - H);
143 for (
int d = 4;
d < 8; ++
d)
186 if (faceidx == 0 || faceidx == 5)
190 else if (faceidx == 1 || faceidx == 3)
210 for (f = 1; f < 5; f++)
213 for (i = 0; i < 4; i++)
215 for (j = 0; j < 4; j++)
219 edge = std::dynamic_pointer_cast<SegGeom>(
229 std::ostringstream errstrm;
230 errstrm <<
"Connected faces do not share an edge. Faces ";
237 std::ostringstream errstrm;
238 errstrm <<
"Connected faces share more than one edge. Faces ";
247 for (i = 0; i < 4; i++)
249 for (j = 0; j < 4; j++)
253 edge = std::dynamic_pointer_cast<SegGeom>(
262 std::ostringstream errstrm;
263 errstrm <<
"Connected faces do not share an edge. Faces ";
270 std::ostringstream errstrm;
271 errstrm <<
"Connected faces share more than one edge. Faces ";
276 for (f = 1; f < 4; f++)
279 for (i = 0; i < 4; i++)
281 for (j = 0; j < 4; j++)
285 edge = std::dynamic_pointer_cast<SegGeom>(
295 std::ostringstream errstrm;
296 errstrm <<
"Connected faces do not share an edge. Faces ";
303 std::ostringstream errstrm;
304 errstrm <<
"Connected faces share more than one edge. Faces ";
312 for (f = 1; f < 5; f++)
315 for (i = 0; i < 4; i++)
317 for (j = 0; j < 4; j++)
321 edge = std::dynamic_pointer_cast<SegGeom>(
331 std::ostringstream errstrm;
332 errstrm <<
"Connected faces do not share an edge. Faces ";
339 std::ostringstream errstrm;
340 errstrm <<
"Connected faces share more than one edge. Faces ";
365 std::ostringstream errstrm;
366 errstrm <<
"Connected edges do not share a vertex. Edges ";
367 errstrm <<
m_edges[0]->GetGlobalID() <<
", "
374 for (i = 1; i < 3; i++)
386 std::ostringstream errstrm;
387 errstrm <<
"Connected edges do not share a vertex. Edges ";
388 errstrm <<
m_edges[i]->GetGlobalID() <<
", "
389 <<
m_edges[i - 1]->GetGlobalID();
410 std::ostringstream errstrm;
411 errstrm <<
"Connected edges do not share a vertex. Edges ";
412 errstrm <<
m_edges[8]->GetGlobalID() <<
", "
418 for (i = 9; i < 11; i++)
430 std::ostringstream errstrm;
431 errstrm <<
"Connected edges do not share a vertex. Edges ";
432 errstrm <<
m_edges[i]->GetGlobalID() <<
", "
433 <<
m_edges[i - 1]->GetGlobalID();
462 unsigned int baseVertex;
475 {0, 1, 2, 3}, {0, 1, 5, 4}, {1, 2, 6, 5},
476 {3, 2, 6, 7}, {0, 3, 7, 4}, {4, 5, 6, 7}};
481 unsigned int orientation;
487 elementAaxis_length = 0.0;
488 elementBaxis_length = 0.0;
489 faceAaxis_length = 0.0;
490 faceBaxis_length = 0.0;
495 baseVertex =
m_faces[f]->GetVid(0);
511 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
512 (*
m_verts[faceVerts[f][0]])[i];
513 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
514 (*
m_verts[faceVerts[f][0]])[i];
521 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
522 (*
m_verts[faceVerts[f][0]])[i];
523 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
524 (*
m_verts[faceVerts[f][1]])[i];
531 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
532 (*
m_verts[faceVerts[f][3]])[i];
533 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
534 (*
m_verts[faceVerts[f][1]])[i];
541 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
542 (*
m_verts[faceVerts[f][3]])[i];
543 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
544 (*
m_verts[faceVerts[f][0]])[i];
549 ASSERTL0(
false,
"Could not find matching vertex for the face");
561 elementAaxis_length += pow(elementAaxis[i], 2);
562 elementBaxis_length += pow(elementBaxis[i], 2);
563 faceAaxis_length += pow(faceAaxis[i], 2);
564 faceBaxis_length += pow(faceBaxis[i], 2);
567 elementAaxis_length =
std::sqrt(elementAaxis_length);
568 elementBaxis_length =
std::sqrt(elementBaxis_length);
569 faceAaxis_length =
std::sqrt(faceAaxis_length);
570 faceBaxis_length =
std::sqrt(faceBaxis_length);
576 dotproduct1 += elementAaxis[i] * faceAaxis[i];
580 fabs(dotproduct1) / elementAaxis_length / faceAaxis_length;
590 if (dotproduct1 < 0.0)
598 dotproduct2 += elementBaxis[i] * faceBaxis[i];
601 norm = fabs(dotproduct2) / elementBaxis_length / faceBaxis_length;
605 "These vectors should be parallel");
609 if (dotproduct2 < 0.0)
624 dotproduct1 += elementAaxis[i] * faceBaxis[i];
627 norm = fabs(dotproduct1) / elementAaxis_length / faceBaxis_length;
631 "These vectors should be parallel");
635 if (dotproduct1 < 0.0)
644 dotproduct2 += elementBaxis[i] * faceAaxis[i];
647 norm = fabs(dotproduct2) / elementBaxis_length / faceAaxis_length;
651 "These vectors should be parallel");
653 if (dotproduct2 < 0.0)
659 orientation = orientation + 5;
671 const unsigned int edgeVerts[
kNedges][2] = {{0, 1}, {1, 2}, {2, 3}, {3, 0},
672 {0, 4}, {1, 5}, {2, 6}, {3, 7},
673 {4, 5}, {5, 6}, {6, 7}, {7, 4}};
689 ASSERTL0(
false,
"Could not find matching vertex for the edge");
698 for (
int i = 0; i < 6; ++i)
700 m_faces[i]->Reset(curvedEdges, curvedFaces);
711 for (
int i = 0; i < 6; ++i)
729 std::vector<int> tmp1;
753 int order0 = *std::max_element(tmp1.begin(), tmp1.end());
779 int order1 = *std::max_element(tmp1.begin(), tmp1.end());
805 int order2 = *std::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
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.
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]
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()
void v_GenGeomFactors() override
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.
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
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]
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)
scalarT< T > sqrt(scalarT< T > in)