48 {0, 3, 4}, {0, 1, 5}, {1, 2, 6}, {2, 3, 7},
49 {4, 8, 11}, {5, 8, 9}, {6, 9, 10}, {7, 10, 11}};
51 {0, 1, 4}, {0, 1, 2}, {0, 2, 3}, {0, 3, 4},
52 {1, 4, 5}, {1, 2, 5}, {2, 3, 5}, {3, 4, 5}};
54 {0, 1}, {0, 2}, {0, 3}, {0, 4}, {1, 4}, {1, 2},
55 {2, 3}, {3, 4}, {1, 5}, {2, 5}, {3, 5}, {4, 5}};
57 {4, 5, 6, 7}, {1, 3, 9, 11}, {0, 2, 8, 10},
58 {1, 3, 9, 11}, {0, 2, 8, 10}, {4, 5, 6, 7}};
66 :
Geometry3D(faces[0]->GetEdge(0)->GetVertex(0)->GetCoordim())
103 if (
m_xmap->GetBasisNumModes(0) != 2 ||
104 m_xmap->GetBasisNumModes(1) != 2 ||
105 m_xmap->GetBasisNumModes(2) != 2)
115 for (
int i = 0; i < 3; ++i)
127 0.125 * (
A + B + C + D + E + F + G + H);
130 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);
137 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);
144 0.125 * (-
A + B - C + D + E - F + G - H);
149 for (
int d = 4;
d < 8; ++
d)
192 if (faceidx == 0 || faceidx == 5)
196 else if (faceidx == 1 || faceidx == 3)
216 for (f = 1; f < 5; f++)
219 for (i = 0; i < 4; i++)
221 for (j = 0; j < 4; j++)
225 edge = std::dynamic_pointer_cast<SegGeom>(
235 std::ostringstream errstrm;
236 errstrm <<
"Connected faces do not share an edge. Faces ";
243 std::ostringstream errstrm;
244 errstrm <<
"Connected faces share more than one edge. Faces ";
253 for (i = 0; i < 4; i++)
255 for (j = 0; j < 4; j++)
259 edge = std::dynamic_pointer_cast<SegGeom>(
268 std::ostringstream errstrm;
269 errstrm <<
"Connected faces do not share an edge. Faces ";
276 std::ostringstream errstrm;
277 errstrm <<
"Connected faces share more than one edge. Faces ";
282 for (f = 1; f < 4; f++)
285 for (i = 0; i < 4; i++)
287 for (j = 0; j < 4; j++)
291 edge = std::dynamic_pointer_cast<SegGeom>(
301 std::ostringstream errstrm;
302 errstrm <<
"Connected faces do not share an edge. Faces ";
309 std::ostringstream errstrm;
310 errstrm <<
"Connected faces share more than one edge. Faces ";
318 for (f = 1; f < 5; f++)
321 for (i = 0; i < 4; i++)
323 for (j = 0; j < 4; j++)
327 edge = std::dynamic_pointer_cast<SegGeom>(
337 std::ostringstream errstrm;
338 errstrm <<
"Connected faces do not share an edge. Faces ";
345 std::ostringstream errstrm;
346 errstrm <<
"Connected faces share more than one edge. Faces ";
371 std::ostringstream errstrm;
372 errstrm <<
"Connected edges do not share a vertex. Edges ";
373 errstrm <<
m_edges[0]->GetGlobalID() <<
", "
380 for (i = 1; i < 3; i++)
392 std::ostringstream errstrm;
393 errstrm <<
"Connected edges do not share a vertex. Edges ";
394 errstrm <<
m_edges[i]->GetGlobalID() <<
", "
395 <<
m_edges[i - 1]->GetGlobalID();
416 std::ostringstream errstrm;
417 errstrm <<
"Connected edges do not share a vertex. Edges ";
418 errstrm <<
m_edges[8]->GetGlobalID() <<
", "
424 for (i = 9; i < 11; i++)
436 std::ostringstream errstrm;
437 errstrm <<
"Connected edges do not share a vertex. Edges ";
438 errstrm <<
m_edges[i]->GetGlobalID() <<
", "
439 <<
m_edges[i - 1]->GetGlobalID();
468 unsigned int baseVertex;
481 {0, 1, 2, 3}, {0, 1, 5, 4}, {1, 2, 6, 5},
482 {3, 2, 6, 7}, {0, 3, 7, 4}, {4, 5, 6, 7}};
487 unsigned int orientation;
493 elementAaxis_length = 0.0;
494 elementBaxis_length = 0.0;
495 faceAaxis_length = 0.0;
496 faceBaxis_length = 0.0;
501 baseVertex =
m_faces[f]->GetVid(0);
517 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
518 (*
m_verts[faceVerts[f][0]])[i];
519 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
520 (*
m_verts[faceVerts[f][0]])[i];
527 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
528 (*
m_verts[faceVerts[f][0]])[i];
529 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
530 (*
m_verts[faceVerts[f][1]])[i];
537 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
538 (*
m_verts[faceVerts[f][3]])[i];
539 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
540 (*
m_verts[faceVerts[f][1]])[i];
547 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
548 (*
m_verts[faceVerts[f][3]])[i];
549 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
550 (*
m_verts[faceVerts[f][0]])[i];
555 ASSERTL0(
false,
"Could not find matching vertex for the face");
567 elementAaxis_length += pow(elementAaxis[i], 2);
568 elementBaxis_length += pow(elementBaxis[i], 2);
569 faceAaxis_length += pow(faceAaxis[i], 2);
570 faceBaxis_length += pow(faceBaxis[i], 2);
573 elementAaxis_length =
sqrt(elementAaxis_length);
574 elementBaxis_length =
sqrt(elementBaxis_length);
575 faceAaxis_length =
sqrt(faceAaxis_length);
576 faceBaxis_length =
sqrt(faceBaxis_length);
582 dotproduct1 += elementAaxis[i] * faceAaxis[i];
586 fabs(dotproduct1) / elementAaxis_length / faceAaxis_length;
596 if (dotproduct1 < 0.0)
604 dotproduct2 += elementBaxis[i] * faceBaxis[i];
607 norm = fabs(dotproduct2) / elementBaxis_length / faceBaxis_length;
611 "These vectors should be parallel");
615 if (dotproduct2 < 0.0)
630 dotproduct1 += elementAaxis[i] * faceBaxis[i];
633 norm = fabs(dotproduct1) / elementAaxis_length / faceBaxis_length;
637 "These vectors should be parallel");
641 if (dotproduct1 < 0.0)
650 dotproduct2 += elementBaxis[i] * faceAaxis[i];
653 norm = fabs(dotproduct2) / elementBaxis_length / faceAaxis_length;
657 "These vectors should be parallel");
659 if (dotproduct2 < 0.0)
665 orientation = orientation + 5;
677 const unsigned int edgeVerts[
kNedges][2] = {{0, 1}, {1, 2}, {2, 3}, {3, 0},
678 {0, 4}, {1, 5}, {2, 6}, {3, 7},
679 {4, 5}, {5, 6}, {6, 7}, {7, 4}};
695 ASSERTL0(
false,
"Could not find matching vertex for the edge");
704 for (
int i = 0; i < 6; ++i)
706 m_faces[i]->Reset(curvedEdges, curvedFaces);
717 for (
int i = 0; i < 6; ++i)
759 int order0 = *max_element(tmp1.begin(), tmp1.end());
785 int order1 = *max_element(tmp1.begin(), tmp1.end());
811 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
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)