48 namespace SpatialDomains
56 Geometry3D(faces[0]->GetEdge(0)->GetVertex(0)->GetCoordim())
92 if (
m_xmap->GetBasisNumModes(0) != 2 ||
93 m_xmap->GetBasisNumModes(1) != 2 ||
94 m_xmap->GetBasisNumModes(2) != 2 )
149 cp1030.
Mult(e10,e30);
150 cp3040.
Mult(e30,e40);
151 cp4010.
Mult(e40,e10);
164 Lcoords[0] = 2.0*beta - 1.0;
165 Lcoords[1] = 2.0*gamma - 1.0;
166 Lcoords[2] = 2.0*delta - 1.0;
169 for(
int i = 0; i < 5; ++i)
178 "inverse mapping must be set up to use this call");
199 else if (faceidx == 1 || faceidx == 3)
219 for (f = 1; f < 5; f++)
221 int nEdges =
m_faces[f]->GetNumEdges();
223 for (i = 0; i < 4; i++)
225 for (j = 0; j < nEdges; j++)
238 std::ostringstream errstrm;
239 errstrm <<
"Connected faces do not share an edge. Faces ";
245 std::ostringstream errstrm;
246 errstrm <<
"Connected faces share more than one edge. Faces ";
254 for(i = 0; i < 3; i++)
256 for(j = 0; j < 3; j++)
268 std::ostringstream errstrm;
269 errstrm <<
"Connected faces do not share an edge. Faces ";
275 std::ostringstream errstrm;
276 errstrm <<
"Connected faces share more than one edge. Faces ";
282 for (f = 1; f < 4; f++)
285 for(i = 0; i <
m_faces[f]->GetNumEdges(); i++)
287 for(j = 0; j <
m_faces[f+1]->GetNumEdges(); j++)
300 std::ostringstream errstrm;
301 errstrm <<
"Connected faces do not share an edge. Faces ";
307 std::ostringstream errstrm;
308 errstrm <<
"Connected faces share more than one edge. Faces ";
332 std::ostringstream errstrm;
333 errstrm <<
"Connected edges do not share a vertex. Edges ";
339 for(
int i = 1; i < 3; i++)
351 std::ostringstream errstrm;
352 errstrm <<
"Connected edges do not share a vertex. Edges ";
353 errstrm <<
m_edges[i]->GetEid() <<
", " <<
m_edges[i-1]->GetEid();
369 for (
int i = 5; i < 8; ++i)
380 std::ostringstream errstrm;
381 errstrm <<
"Connected edges do not share a vertex. Edges ";
392 const unsigned int edgeVerts[
kNedges][2] =
393 { {0,1}, {1,2}, {3,2}, {0,3}, {0,4}, {1,4}, {2,4}, {3,4} };
408 ASSERTL0(
false,
"Could not find matching vertex for the edge");
434 unsigned int baseVertex;
445 const unsigned int faceVerts[
kNfaces][4] = {
456 unsigned int orientation;
462 elementAaxis_length = 0.0;
463 elementBaxis_length = 0.0;
464 faceAaxis_length = 0.0;
465 faceBaxis_length = 0.0;
470 baseVertex =
m_faces[f]->GetVid(0);
485 elementAaxis[i] = (*
m_verts[ faceVerts[f][1] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
486 elementBaxis[i] = (*
m_verts[ faceVerts[f][2] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
495 elementAaxis[i] = (*
m_verts[ faceVerts[f][1] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
496 elementBaxis[i] = (*
m_verts[ faceVerts[f][3] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
499 else if( baseVertex ==
m_verts[ faceVerts[f][1] ]->
GetVid() )
503 elementAaxis[i] = (*
m_verts[ faceVerts[f][1] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
504 elementBaxis[i] = (*
m_verts[ faceVerts[f][2] ])[i] - (*
m_verts[ faceVerts[f][1] ])[i];
507 else if( baseVertex ==
m_verts[ faceVerts[f][2] ]->
GetVid() )
511 elementAaxis[i] = (*
m_verts[ faceVerts[f][2] ])[i] - (*
m_verts[ faceVerts[f][3] ])[i];
512 elementBaxis[i] = (*
m_verts[ faceVerts[f][2] ])[i] - (*
m_verts[ faceVerts[f][1] ])[i];
515 else if( baseVertex ==
m_verts[ faceVerts[f][3] ]->
GetVid() )
519 elementAaxis[i] = (*
m_verts[ faceVerts[f][2] ])[i] - (*
m_verts[ faceVerts[f][3] ])[i];
520 elementBaxis[i] = (*
m_verts[ faceVerts[f][3] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
525 ASSERTL0(
false,
"Could not find matching vertex for the face");
533 int v =
m_faces[f]->GetNumVerts()-1;
537 elementAaxis_length += pow(elementAaxis[i],2);
538 elementBaxis_length += pow(elementBaxis[i],2);
539 faceAaxis_length += pow(faceAaxis[i],2);
540 faceBaxis_length += pow(faceBaxis[i],2);
543 elementAaxis_length = sqrt(elementAaxis_length);
544 elementBaxis_length = sqrt(elementBaxis_length);
545 faceAaxis_length = sqrt(faceAaxis_length);
546 faceBaxis_length = sqrt(faceBaxis_length);
552 dotproduct1 += elementAaxis[i]*faceAaxis[i];
562 if(dotproduct1 < 0.0)
570 dotproduct2 += elementBaxis[i]*faceBaxis[i];
575 if( dotproduct2 < 0.0 )
590 dotproduct1 += elementAaxis[i]*faceBaxis[i];
594 if (fabs(elementAaxis_length*faceBaxis_length
597 cout <<
"Warning: Prism axes not parallel" << endl;
602 if(dotproduct1 < 0.0)
611 dotproduct2 += elementBaxis[i]*faceAaxis[i];
615 if (fabs(elementBaxis_length*faceAaxis_length
618 cout <<
"Warning: Prism axes not parallel" << endl;
621 if( dotproduct2 < 0.0 )
627 orientation = orientation + 5;
640 for (
int i = 0; i < 5; ++i)
642 m_faces[i]->Reset(curvedEdges, curvedFaces);
656 int order0, points0, order1, points1;
662 order0 = *max_element(tmp.begin(), tmp.end());
667 points0 = *max_element(tmp.begin(), tmp.end());
673 order0 = *max_element(tmp.begin(), tmp.end());
678 points0 = *max_element(tmp.begin(), tmp.end());
687 order1 = *max_element(tmp.begin(), tmp.end());
693 points1 = *max_element(tmp.begin(), tmp.end());
701 order1 = *max_element(tmp.begin(), tmp.end());
707 points1 = *max_element(tmp.begin(), tmp.end());
711 tmp.push_back(order0);
712 tmp.push_back(order1);
717 int order2 = *max_element(tmp.begin(), tmp.end());
720 tmp.push_back(points0);
721 tmp.push_back(points1);
730 int points2 = *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.
const LibUtilities::BasisSharedPtr GetBasis(const int i)
Return the j-th basis of the i-th co-ordinate dimension.
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
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