45 {0, 2, 3}, {0, 1, 4}, {1, 2, 5}, {3, 4, 5}};
47 {0, 1, 3}, {0, 1, 2}, {0, 2, 3}, {1, 2, 3}};
49 {0, 1}, {0, 2}, {0, 3}, {1, 3}, {1, 2}, {2, 3}};
51 {3, 4, 5}, {1, 2, 5}, {0, 2, 3}, {0, 1, 4}};
65 :
Geometry3D(faces[0]->GetEdge(0)->GetVertex(0)->GetCoordim())
83 else if (faceidx == 1)
124 std::ostringstream errstrm;
125 errstrm <<
"Local edge 0 (eid=" <<
m_faces[0]->GetEid(0);
126 errstrm <<
") on face " <<
m_faces[0]->GetGlobalID();
127 errstrm <<
" must be the same as local edge 0 (eid="
129 errstrm <<
") on face " <<
m_faces[1]->GetGlobalID();
134 for (faceConnected = 1; faceConnected < 4; faceConnected++)
137 for (i = 0; i < 3; i++)
149 std::ostringstream errstrm;
150 errstrm <<
"Face 0 does not share an edge with first edge of "
151 "adjacent face. Faces ";
158 std::ostringstream errstrm;
159 errstrm <<
"Connected faces share more than one edge. Faces ";
168 for (i = 0; i < 3; i++)
170 for (j = 0; j < 3; j++)
181 std::ostringstream errstrm;
182 errstrm <<
"Connected faces do not share an edge. Faces ";
189 std::ostringstream errstrm;
190 errstrm <<
"Connected faces share more than one edge. Faces ";
196 for (faceConnected = 1; faceConnected < 3; faceConnected++)
199 for (i = 0; i < 3; i++)
201 for (j = 0; j < 3; j++)
215 std::ostringstream errstrm;
216 errstrm <<
"Connected faces do not share an edge. Faces ";
223 std::ostringstream errstrm;
224 errstrm <<
"Connected faces share more than one edge. Faces ";
250 std::ostringstream errstrm;
251 errstrm <<
"Connected edges do not share a vertex. Edges ";
252 errstrm <<
m_edges[0]->GetGlobalID() <<
", "
258 for (
int i = 1; i < 2; i++)
270 std::ostringstream errstrm;
271 errstrm <<
"Connected edges do not share a vertex. Edges ";
272 errstrm <<
m_edges[i]->GetGlobalID() <<
", "
273 <<
m_edges[i - 1]->GetGlobalID();
290 for (
int i = 4; i < 6; ++i)
302 std::ostringstream errstrm;
303 errstrm <<
"Connected edges do not share a vertex. Edges ";
304 errstrm <<
m_edges[3]->GetGlobalID() <<
", "
316 const unsigned int edgeVerts[
kNedges][2] = {{0, 1}, {1, 2}, {0, 2},
317 {0, 3}, {1, 3}, {2, 3}};
333 ASSERTL0(
false,
"Could not find matching vertex for the edge");
362 unsigned int baseVertex;
375 {0, 1, 2}, {0, 1, 3}, {1, 2, 3}, {0, 2, 3}};
380 unsigned int orientation;
386 elementAaxis_length = 0.0;
387 elementBaxis_length = 0.0;
388 faceAaxis_length = 0.0;
389 faceBaxis_length = 0.0;
394 baseVertex =
m_faces[f]->GetVid(0);
412 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
413 (*
m_verts[faceVerts[f][0]])[i];
414 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
415 (*
m_verts[faceVerts[f][0]])[i];
422 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
423 (*
m_verts[faceVerts[f][0]])[i];
424 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
425 (*
m_verts[faceVerts[f][1]])[i];
432 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
433 (*
m_verts[faceVerts[f][2]])[i];
434 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
435 (*
m_verts[faceVerts[f][0]])[i];
440 ASSERTL0(
false,
"Could not find matching vertex for the face");
452 elementAaxis_length += pow(elementAaxis[i], 2);
453 elementBaxis_length += pow(elementBaxis[i], 2);
454 faceAaxis_length += pow(faceAaxis[i], 2);
455 faceBaxis_length += pow(faceBaxis[i], 2);
458 elementAaxis_length =
sqrt(elementAaxis_length);
459 elementBaxis_length =
sqrt(elementBaxis_length);
460 faceAaxis_length =
sqrt(faceAaxis_length);
461 faceBaxis_length =
sqrt(faceBaxis_length);
467 dotproduct1 += elementAaxis[i] * faceAaxis[i];
471 fabs(dotproduct1) / elementAaxis_length / faceAaxis_length;
481 if (dotproduct1 < 0.0)
489 dotproduct2 += elementBaxis[i] * faceBaxis[i];
492 norm = fabs(dotproduct2) / elementBaxis_length / faceBaxis_length;
496 "These vectors should be parallel");
500 if (dotproduct2 < 0.0)
515 dotproduct1 += elementAaxis[i] * faceBaxis[i];
518 norm = fabs(dotproduct1) / elementAaxis_length / faceBaxis_length;
522 "These vectors should be parallel");
526 if (dotproduct1 < 0.0)
535 dotproduct2 += elementBaxis[i] * faceAaxis[i];
538 norm = fabs(dotproduct2) / elementBaxis_length / faceAaxis_length;
542 "These vectors should be parallel");
544 if (dotproduct2 < 0.0)
550 orientation = orientation + 5;
553 "Orientation of triangular face (id = " +
555 ") is inconsistent with face " + std::to_string(f) +
556 " of tet element (id = " + std::to_string(
m_globalID) +
557 ") since Dir2 is aligned with Dir1. Mesh setup "
558 "needs investigation");
569 for (
int i = 0; i < 4; ++i)
571 m_faces[i]->Reset(curvedEdges, curvedFaces);
579 for (
int i = 0; i < 4; ++i)
607 if (
m_xmap->GetBasisNumModes(0) != 2 ||
608 m_xmap->GetBasisNumModes(1) != 2 ||
609 m_xmap->GetBasisNumModes(2) != 2)
618 for (
int i = 0; i < 3; ++i)
646 std::vector<int> tmp;
648 int order0 = *std::max_element(tmp.begin(), tmp.end());
651 tmp.push_back(order0);
654 int order1 = *std::max_element(tmp.begin(), tmp.end());
657 tmp.push_back(order0);
658 tmp.push_back(order1);
662 int order2 = *std::max_element(tmp.begin(), tmp.end());
664 std::array<LibUtilities::BasisKey, 3> basis = {
672 LibUtilities::eGaussRadauMAlpha1Beta0)),
676 LibUtilities::eGaussRadauMAlpha2Beta0))};
702 int nFaceCoeffs =
m_faces[i]->GetXmap()->GetNcoeffs();
709 m_xmap->GetTraceToElementMap(
716 m_xmap->GetTraceToElementMap(
727 for (k = 0; k < nFaceCoeffs; k++)
#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.
void v_CalculateInverseIsoParam() override
bool m_setupState
Wether or not the setup routines have been run.
GeomState m_state
Enumeration to dictate whether coefficients are filled.
void SetUpCoeffs(const int nCoeffs)
Initialise the Geometry::m_coeffs array.
int GetVid(int i) const
Returns global 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.
PointGeom * GetVertex(int i) const
Returns vertex i 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...
Geometry1D * GetEdge(int i) const
Returns edge i of this object.
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.
std::array< SegGeom *, kNedges > m_edges
int v_GetEdgeFaceMap(const int i, const int j) const override
Returns the standard element edge IDs that are connected to a given face.
std::array< StdRegions::Orientation, kNfaces > m_forient
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 v_FillGeom() override
Put all quadrature information into face/edge structure and backward transform.
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 VertexEdgeConnectivity[4][3]
static const unsigned int EdgeNormalToFaceVert[4][3]
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.
void SetUpFaceOrientation()
std::array< TriGeom *, kNfaces > m_faces
void SetUpEdgeOrientation()
void SetUpLocalVertices()
void v_GenGeomFactors() override
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 kNqfaces
static const int kNtfaces
void SetUpXmap()
Set up the m_xmap object by determining the order of each direction from derived faces.
std::array< PointGeom *, kNverts > m_verts
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 VertexFaceConnectivity[4][3]
static const unsigned int EdgeFaceConnectivity[6][2]
std::array< StdRegions::Orientation, kNedges > m_eorient
A simple factory for Xmap objects that is based on the element type, the basis and quadrature selecti...
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eModified_B
Principle Modified Functions .
@ eModified_C
Principle Modified Functions .
@ eModified_A
Principle Modified Functions .
static const NekDouble kNekZeroTol
XmapFactory< StdRegions::StdTetExp, 3 > & GetStdTetFactory()
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.
@ ePtsFilled
Geometric information has been generated.
@ eDir1FwdDir2_Dir2FwdDir1
scalarT< T > sqrt(scalarT< T > in)