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");
204 else if (faceidx == 1 || faceidx == 3)
224 for (f = 1; f < 5; f++)
226 int nEdges =
m_faces[f]->GetNumEdges();
228 for (i = 0; i < 4; i++)
230 for (j = 0; j < nEdges; j++)
243 std::ostringstream errstrm;
244 errstrm <<
"Connected faces do not share an edge. Faces ";
250 std::ostringstream errstrm;
251 errstrm <<
"Connected faces share more than one edge. Faces ";
259 for(i = 0; i < 3; i++)
261 for(j = 0; j < 3; j++)
273 std::ostringstream errstrm;
274 errstrm <<
"Connected faces do not share an edge. Faces ";
280 std::ostringstream errstrm;
281 errstrm <<
"Connected faces share more than one edge. Faces ";
287 for (f = 1; f < 4; f++)
290 for(i = 0; i <
m_faces[f]->GetNumEdges(); i++)
292 for(j = 0; j <
m_faces[f+1]->GetNumEdges(); j++)
305 std::ostringstream errstrm;
306 errstrm <<
"Connected faces do not share an edge. Faces ";
312 std::ostringstream errstrm;
313 errstrm <<
"Connected faces share more than one edge. Faces ";
337 std::ostringstream errstrm;
338 errstrm <<
"Connected edges do not share a vertex. Edges ";
344 for(
int i = 1; i < 3; i++)
356 std::ostringstream errstrm;
357 errstrm <<
"Connected edges do not share a vertex. Edges ";
358 errstrm <<
m_edges[i]->GetEid() <<
", " <<
m_edges[i-1]->GetEid();
374 for (
int i = 5; i < 8; ++i)
385 std::ostringstream errstrm;
386 errstrm <<
"Connected edges do not share a vertex. Edges ";
397 const unsigned int edgeVerts[
kNedges][2] =
398 { {0,1}, {1,2}, {3,2}, {0,3}, {0,4}, {1,4}, {2,4}, {3,4} };
413 ASSERTL0(
false,
"Could not find matching vertex for the edge");
439 unsigned int baseVertex;
450 const unsigned int faceVerts[
kNfaces][4] = {
461 unsigned int orientation;
467 elementAaxis_length = 0.0;
468 elementBaxis_length = 0.0;
469 faceAaxis_length = 0.0;
470 faceBaxis_length = 0.0;
475 baseVertex =
m_faces[f]->GetVid(0);
490 elementAaxis[i] = (*
m_verts[ faceVerts[f][1] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
491 elementBaxis[i] = (*
m_verts[ faceVerts[f][2] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
500 elementAaxis[i] = (*
m_verts[ faceVerts[f][1] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
501 elementBaxis[i] = (*
m_verts[ faceVerts[f][3] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
504 else if( baseVertex ==
m_verts[ faceVerts[f][1] ]->
GetVid() )
508 elementAaxis[i] = (*
m_verts[ faceVerts[f][1] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
509 elementBaxis[i] = (*
m_verts[ faceVerts[f][2] ])[i] - (*
m_verts[ faceVerts[f][1] ])[i];
512 else if( baseVertex ==
m_verts[ faceVerts[f][2] ]->
GetVid() )
516 elementAaxis[i] = (*
m_verts[ faceVerts[f][2] ])[i] - (*
m_verts[ faceVerts[f][3] ])[i];
517 elementBaxis[i] = (*
m_verts[ faceVerts[f][2] ])[i] - (*
m_verts[ faceVerts[f][1] ])[i];
520 else if( baseVertex ==
m_verts[ faceVerts[f][3] ]->
GetVid() )
524 elementAaxis[i] = (*
m_verts[ faceVerts[f][2] ])[i] - (*
m_verts[ faceVerts[f][3] ])[i];
525 elementBaxis[i] = (*
m_verts[ faceVerts[f][3] ])[i] - (*
m_verts[ faceVerts[f][0] ])[i];
530 ASSERTL0(
false,
"Could not find matching vertex for the face");
538 int v =
m_faces[f]->GetNumVerts()-1;
542 elementAaxis_length += pow(elementAaxis[i],2);
543 elementBaxis_length += pow(elementBaxis[i],2);
544 faceAaxis_length += pow(faceAaxis[i],2);
545 faceBaxis_length += pow(faceBaxis[i],2);
548 elementAaxis_length = sqrt(elementAaxis_length);
549 elementBaxis_length = sqrt(elementBaxis_length);
550 faceAaxis_length = sqrt(faceAaxis_length);
551 faceBaxis_length = sqrt(faceBaxis_length);
557 dotproduct1 += elementAaxis[i]*faceAaxis[i];
567 if(dotproduct1 < 0.0)
575 dotproduct2 += elementBaxis[i]*faceBaxis[i];
580 if( dotproduct2 < 0.0 )
595 dotproduct1 += elementAaxis[i]*faceBaxis[i];
599 if (fabs(elementAaxis_length*faceBaxis_length
602 cout <<
"Warning: Prism axes not parallel" << endl;
607 if(dotproduct1 < 0.0)
616 dotproduct2 += elementBaxis[i]*faceAaxis[i];
620 if (fabs(elementBaxis_length*faceAaxis_length
623 cout <<
"Warning: Prism axes not parallel" << endl;
626 if( dotproduct2 < 0.0 )
632 orientation = orientation + 5;
645 for (
int i = 0; i < 5; ++i)
647 m_faces[i]->Reset(curvedEdges, curvedFaces);
667 order0 = *max_element(tmp.begin(), tmp.end());
673 order0 = *max_element(tmp.begin(), tmp.end());
682 order1 = *max_element(tmp.begin(), tmp.end());
690 order1 = *max_element(tmp.begin(), tmp.end());
694 tmp.push_back(order0);
695 tmp.push_back(order1);
700 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