46namespace SpatialDomains
50 {0, 3, 4}, {0, 1, 5}, {1, 2, 6}, {2, 3, 7}, {4, 5, 8}, {6, 7, 8}};
52 {0, 1, 4}, {0, 1, 2}, {0, 2, 3}, {0, 3, 4}, {1, 2, 4}, {2, 3, 4}};
54 {0, 1}, {0, 2}, {0, 3}, {0, 4}, {1, 4}, {1, 2}, {2, 3}, {3, 4}, {2, 4}};
56 {4, 5, 6, 7}, {1, 3, 8, -1}, {0, 2, 4, 7}, {1, 3, 8, -1}, {0, 2, 5, 6}};
64 :
Geometry3D(faces[0]->GetEdge(0)->GetVertex(0)->GetCoordim())
93 else if (faceidx == 1 || faceidx == 3)
118 if (
m_xmap->GetBasisNumModes(0) != 2 ||
119 m_xmap->GetBasisNumModes(1) != 2 ||
120 m_xmap->GetBasisNumModes(2) != 2)
130 for (
int i = 0; i < 3; ++i)
151 for (
int d = 4;
d < 6; ++
d)
202 for (f = 1; f < 5; f++)
204 int nEdges =
m_faces[f]->GetNumEdges();
206 for (i = 0; i < 4; i++)
208 for (j = 0; j < nEdges; j++)
222 std::ostringstream errstrm;
223 errstrm <<
"Connected faces do not share an edge. Faces ";
230 std::ostringstream errstrm;
231 errstrm <<
"Connected faces share more than one edge. Faces ";
240 for (i = 0; i < 3; i++)
242 for (j = 0; j < 4; j++)
254 std::ostringstream errstrm;
255 errstrm <<
"Connected faces do not share an edge. Faces ";
262 std::ostringstream errstrm;
263 errstrm <<
"Connected faces share more than one edge. Faces ";
269 for (f = 1; f < 4; f++)
272 for (i = 0; i <
m_faces[f]->GetNumEdges(); i++)
274 for (j = 0; j <
m_faces[f + 1]->GetNumEdges(); j++)
288 std::ostringstream errstrm;
289 errstrm <<
"Connected faces do not share an edge. Faces ";
296 std::ostringstream errstrm;
297 errstrm <<
"Connected faces share more than one edge. Faces ";
306 for (i = 0; i < 4; i++)
308 for (j = 0; j < 4; j++)
321 std::ostringstream errstrm;
322 errstrm <<
"Connected faces do not share an edge. Faces ";
329 std::ostringstream errstrm;
330 errstrm <<
"Connected faces share more than one edge. Faces ";
355 std::ostringstream errstrm;
356 errstrm <<
"Connected edges do not share a vertex. Edges ";
357 errstrm <<
m_edges[0]->GetGlobalID() <<
", "
363 for (
int i = 1; i < 3; i++)
375 std::ostringstream errstrm;
376 errstrm <<
"Connected edges do not share a vertex. Edges ";
377 errstrm <<
m_edges[i]->GetGlobalID() <<
", "
378 <<
m_edges[i - 1]->GetGlobalID();
399 std::ostringstream errstrm;
400 errstrm <<
"Connected edges do not share a vertex. Edges ";
401 errstrm <<
m_edges[8]->GetGlobalID();
412 const unsigned int edgeVerts[
kNedges][2] = {
413 {0, 1}, {1, 2}, {3, 2}, {0, 3}, {0, 4}, {1, 4}, {2, 5}, {3, 5}, {4, 5}};
429 ASSERTL0(
false,
"Could not find matching vertex for the edge");
457 unsigned int baseVertex;
480 unsigned int orientation;
486 elementAaxis_length = 0.0;
487 elementBaxis_length = 0.0;
488 faceAaxis_length = 0.0;
489 faceBaxis_length = 0.0;
494 baseVertex =
m_faces[f]->GetVid(0);
508 if (f == 1 || f == 3)
514 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
515 (*
m_verts[faceVerts[f][0]])[i];
516 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
517 (*
m_verts[faceVerts[f][0]])[i];
524 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
525 (*
m_verts[faceVerts[f][0]])[i];
526 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
527 (*
m_verts[faceVerts[f][1]])[i];
534 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
535 (*
m_verts[faceVerts[f][2]])[i];
536 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
537 (*
m_verts[faceVerts[f][0]])[i];
542 ASSERTL0(
false,
"Could not find matching vertex for the face");
551 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
552 (*
m_verts[faceVerts[f][0]])[i];
553 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
554 (*
m_verts[faceVerts[f][0]])[i];
561 elementAaxis[i] = (*
m_verts[faceVerts[f][1]])[i] -
562 (*
m_verts[faceVerts[f][0]])[i];
563 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
564 (*
m_verts[faceVerts[f][1]])[i];
571 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
572 (*
m_verts[faceVerts[f][3]])[i];
573 elementBaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
574 (*
m_verts[faceVerts[f][1]])[i];
581 elementAaxis[i] = (*
m_verts[faceVerts[f][2]])[i] -
582 (*
m_verts[faceVerts[f][3]])[i];
583 elementBaxis[i] = (*
m_verts[faceVerts[f][3]])[i] -
584 (*
m_verts[faceVerts[f][0]])[i];
589 ASSERTL0(
false,
"Could not find matching vertex for the face");
596 int v =
m_faces[f]->GetNumVerts() - 1;
602 elementAaxis_length += pow(elementAaxis[i], 2);
603 elementBaxis_length += pow(elementBaxis[i], 2);
604 faceAaxis_length += pow(faceAaxis[i], 2);
605 faceBaxis_length += pow(faceBaxis[i], 2);
608 elementAaxis_length =
sqrt(elementAaxis_length);
609 elementBaxis_length =
sqrt(elementBaxis_length);
610 faceAaxis_length =
sqrt(faceAaxis_length);
611 faceBaxis_length =
sqrt(faceBaxis_length);
617 dotproduct1 += elementAaxis[i] * faceAaxis[i];
625 if (fabs(elementAaxis_length * faceAaxis_length - fabs(dotproduct1)) <
630 if (dotproduct1 < 0.0)
638 dotproduct2 += elementBaxis[i] * faceBaxis[i];
641 ASSERTL1(fabs(fabs(dotproduct2 / elementBaxis_length /
644 "These vectors should be parallel");
648 if (dotproduct2 < 0.0)
663 dotproduct1 += elementAaxis[i] * faceBaxis[i];
667 ASSERTL1(fabs(fabs(dotproduct1) / elementAaxis_length /
670 "These vectors should be parallel");
674 if (dotproduct1 < 0.0)
683 dotproduct2 += elementBaxis[i] * faceAaxis[i];
686 ASSERTL1(fabs(fabs(dotproduct2) / elementBaxis_length /
689 "These vectors should be parallel");
691 if (dotproduct2 < 0.0)
697 orientation = orientation + 5;
699 if ((f == 1) || (f == 3))
703 "Orientation of triangular face (id = " +
705 ") is inconsistent with face " +
706 boost::lexical_cast<string>(f) +
707 " of prism element (id = " +
709 ") since Dir2 is aligned with Dir1. Mesh setup "
710 "needs investigation");
722 for (
int i = 0; i < 5; ++i)
724 m_faces[i]->Reset(curvedEdges, curvedFaces);
732 for (
int i = 0; i < 5; ++i)
755 order0 = *max_element(tmp.begin(), tmp.end());
761 order0 = *max_element(tmp.begin(), tmp.end());
770 order1 = *max_element(tmp.begin(), tmp.end());
778 order1 = *max_element(tmp.begin(), tmp.end());
782 tmp.push_back(order0);
783 tmp.push_back(order1);
788 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
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 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 unsigned int EdgeFaceConnectivity[9][2]
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.
virtual 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 SetUpFaceOrientation()
virtual void v_GenGeomFactors() override
static const unsigned int EdgeNormalToFaceVert[5][4]
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.
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.
static const unsigned int VertexFaceConnectivity[6][3]
virtual void v_Setup() override
static const int kNqfaces
void SetUpLocalVertices()
static const unsigned int VertexEdgeConnectivity[6][3]
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 int kNtfaces
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eModified_B
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
std::vector< double > d(NPUPPER *NPUPPER)
The above copyright notice and this permission notice shall be included.
scalarT< T > sqrt(scalarT< T > in)