49 namespace SpatialDomains
57 Geometry3D(faces[0]->GetEdge(0)->GetVertex(0)->GetCoordim())
93 if (
m_xmap->GetBasisNumModes(0) != 2 ||
94 m_xmap->GetBasisNumModes(1) != 2 ||
95 m_xmap->GetBasisNumModes(2) != 2 )
150 cp1030.
Mult(e10,e30);
151 cp3040.
Mult(e30,e40);
152 cp4010.
Mult(e40,e10);
165 Lcoords[0] = 2.0*beta - 1.0;
166 Lcoords[1] = 2.0*gamma - 1.0;
167 Lcoords[2] = 2.0*delta - 1.0;
170 for(
int i = 0; i < 5; ++i)
179 "inverse mapping must be set up to use this call");
205 else if (faceidx == 1 || faceidx == 3)
225 for (f = 1; f < 5; f++)
227 int nEdges =
m_faces[f]->GetNumEdges();
229 for (i = 0; i < 4; i++)
231 for (j = 0; j < nEdges; j++)
244 std::ostringstream errstrm;
245 errstrm <<
"Connected faces do not share an edge. Faces ";
251 std::ostringstream errstrm;
252 errstrm <<
"Connected faces share more than one edge. Faces ";
260 for(i = 0; i < 3; i++)
262 for(j = 0; j < 3; j++)
274 std::ostringstream errstrm;
275 errstrm <<
"Connected faces do not share an edge. Faces ";
281 std::ostringstream errstrm;
282 errstrm <<
"Connected faces share more than one edge. Faces ";
288 for (f = 1; f < 4; f++)
291 for(i = 0; i <
m_faces[f]->GetNumEdges(); i++)
293 for(j = 0; j <
m_faces[f+1]->GetNumEdges(); j++)
306 std::ostringstream errstrm;
307 errstrm <<
"Connected faces do not share an edge. Faces ";
313 std::ostringstream errstrm;
314 errstrm <<
"Connected faces share more than one edge. Faces ";
338 std::ostringstream errstrm;
339 errstrm <<
"Connected edges do not share a vertex. Edges ";
345 for(
int i = 1; i < 3; i++)
357 std::ostringstream errstrm;
358 errstrm <<
"Connected edges do not share a vertex. Edges ";
359 errstrm <<
m_edges[i]->GetEid() <<
", " <<
m_edges[i-1]->GetEid();
375 for (
int i = 5; i < 8; ++i)
386 std::ostringstream errstrm;
387 errstrm <<
"Connected edges do not share a vertex. Edges ";
398 const unsigned int edgeVerts[
kNedges][2] =
399 { {0,1}, {1,2}, {3,2}, {0,3}, {0,4}, {1,4}, {2,4}, {3,4} };
414 ASSERTL0(
false,
"Could not find matching vertex for the edge");
440 unsigned int baseVertex;
451 const unsigned int faceVerts[
kNfaces][4] = {
462 unsigned int orientation;
468 elementAaxis_length = 0.0;
469 elementBaxis_length = 0.0;
470 faceAaxis_length = 0.0;
471 faceBaxis_length = 0.0;
476 baseVertex =
m_faces[f]->GetVid(0);
491 elementAaxis[i] = (*
m_verts[ faceVerts[f][1] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
492 elementBaxis[i] = (*
m_verts[ faceVerts[f][2] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
501 elementAaxis[i] = (*
m_verts[ faceVerts[f][1] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
502 elementBaxis[i] = (*
m_verts[ faceVerts[f][3] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
505 else if( baseVertex ==
m_verts[ faceVerts[f][1] ]->
GetVid() )
509 elementAaxis[i] = (*
m_verts[ faceVerts[f][1] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
510 elementBaxis[i] = (*
m_verts[ faceVerts[f][2] ])[i] - (*
m_verts[ faceVerts[f][1] ])[i];
513 else if( baseVertex ==
m_verts[ faceVerts[f][2] ]->
GetVid() )
517 elementAaxis[i] = (*
m_verts[ faceVerts[f][2] ])[i] - (*
m_verts[ faceVerts[f][3] ])[i];
518 elementBaxis[i] = (*
m_verts[ faceVerts[f][2] ])[i] - (*
m_verts[ faceVerts[f][1] ])[i];
521 else if( baseVertex ==
m_verts[ faceVerts[f][3] ]->
GetVid() )
525 elementAaxis[i] = (*
m_verts[ faceVerts[f][2] ])[i] - (*
m_verts[ faceVerts[f][3] ])[i];
526 elementBaxis[i] = (*
m_verts[ faceVerts[f][3] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
531 ASSERTL0(
false,
"Could not find matching vertex for the face");
539 int v =
m_faces[f]->GetNumVerts()-1;
543 elementAaxis_length += pow(elementAaxis[i],2);
544 elementBaxis_length += pow(elementBaxis[i],2);
545 faceAaxis_length += pow(faceAaxis[i],2);
546 faceBaxis_length += pow(faceBaxis[i],2);
549 elementAaxis_length = sqrt(elementAaxis_length);
550 elementBaxis_length = sqrt(elementBaxis_length);
551 faceAaxis_length = sqrt(faceAaxis_length);
552 faceBaxis_length = sqrt(faceBaxis_length);
558 dotproduct1 += elementAaxis[i]*faceAaxis[i];
568 if(dotproduct1 < 0.0)
576 dotproduct2 += elementBaxis[i]*faceBaxis[i];
581 if( dotproduct2 < 0.0 )
596 dotproduct1 += elementAaxis[i]*faceBaxis[i];
600 if (fabs(elementAaxis_length*faceBaxis_length
603 cout <<
"Warning: Prism axes not parallel" << endl;
608 if(dotproduct1 < 0.0)
617 dotproduct2 += elementBaxis[i]*faceAaxis[i];
621 if (fabs(elementBaxis_length*faceAaxis_length
624 cout <<
"Warning: Prism axes not parallel" << endl;
627 if( dotproduct2 < 0.0 )
633 orientation = orientation + 5;
646 for (
int i = 0; i < 5; ++i)
648 m_faces[i]->Reset(curvedEdges, curvedFaces);
668 order0 = *max_element(tmp.begin(), tmp.end());
674 order0 = *max_element(tmp.begin(), tmp.end());
683 order1 = *max_element(tmp.begin(), tmp.end());
691 order1 = *max_element(tmp.begin(), tmp.end());
695 tmp.push_back(order0);
696 tmp.push_back(order1);
701 int order2 = *max_element(tmp.begin(), tmp.end());
StdRegions::StdExpansionSharedPtr m_xmap
#define ASSERTL0(condition, msg)
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
std::vector< StdRegions::Orientation > m_eorient
Principle Modified Functions .
virtual int v_GetDir(const int faceidx, const int facedir) const
void SetUpLocalVertices()
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
GeomFactorsSharedPtr m_geomFactors
NekDouble dot(PointGeom &a)
virtual int v_GetNumEdges() const
int GetEid(int i) const
Return the ID of edge i in this element.
Principle Modified Functions .
void Sub(PointGeom &a, PointGeom &b)
virtual void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces)
Reset this geometry object: unset the current state and remove allocated GeomFactors.
StdRegions::StdExpansionSharedPtr GetXmap() const
GeomState m_geomFactorsState
virtual int v_GetNumVerts() const
std::vector< StdRegions::Orientation > m_forient
virtual void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces)
Reset this geometry object: unset the current state and remove allocated GeomFactors.
static const NekDouble kNekZeroTol
boost::shared_ptr< SegGeom > SegGeomSharedPtr
Defines a specification for a set of points.
virtual NekDouble v_GetLocCoords(const Array< OneD, const NekDouble > &coords, Array< OneD, NekDouble > &Lcoords)
PointGeomSharedPtr GetVertex(int i) const
static const int kNtfaces
virtual void v_FillGeom()
Put all quadrature information into face/edge structure and backward transform.
boost::shared_ptr< Geometry2D > Geometry2DSharedPtr
void Mult(PointGeom &a, PointGeom &b)
const Geometry1DSharedPtr GetEdge(int i) const
static const int kNqfaces
Array< OneD, Array< OneD, NekDouble > > m_coeffs
Geometry is straight-sided with constant geometric factors.
Gauss Radau pinned at x=-1, .
LibUtilities::ShapeType m_shapeType
virtual int v_GetNumFaces() const
NekDouble dist(PointGeom &a)
void SetUpEdgeOrientation()
boost::unordered_map< int, CurveSharedPtr > CurveMap
Geometric information has been generated.
void SetUpCoeffs(const int nCoeffs)
Initialise the m_coeffs array.
GeomFactorsSharedPtr GetMetricInfo()
GeomType
Indicates the type of element geometry.
void SetUpXmap()
Set up the m_xmap object by determining the order of each direction from derived faces.
void SetUpFaceOrientation()
virtual void v_GenGeomFactors()
Geometry is curved or has non-constant factors.
int m_coordim
coordinate dimension
Describes the specification for a Basis.
1D Gauss-Lobatto-Legendre quadrature points