Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Nektar::SpatialDomains::Geometry3D Class Reference

3D geometry information More...

#include <Geometry3D.h>

Inheritance diagram for Nektar::SpatialDomains::Geometry3D:
Inheritance graph
[legend]
Collaboration diagram for Nektar::SpatialDomains::Geometry3D:
Collaboration graph
[legend]

Public Member Functions

 Geometry3D ()
 Geometry3D (const int coordim)
virtual ~Geometry3D ()
int GetEid (int i) const
 Return the ID of edge i in this element.
const Geometry1DSharedPtr GetEdge (int i) const
Geometry2DSharedPtr GetFace (int i)
 Return face i in this element.
StdRegions::Orientation GetFaceOrient (const int i) const
 Return the orientation of face i in this element.
int GetDir (const int faceidx, const int facedir) const
 Returns the element coordinate direction corresponding to a given face coordinate direction.
- Public Member Functions inherited from Nektar::SpatialDomains::Geometry
 Geometry ()
 Geometry (int coordim)
virtual ~Geometry ()
bool IsElmtConnected (int gvo_id, int locid) const
void AddElmtConnected (int gvo_id, int locid)
int NumElmtConnected () const
int GetCoordim () const
void SetCoordim (int coordim)
GeomFactorsSharedPtr GetGeomFactors ()
GeomFactorsSharedPtr GetRefGeomFactors (const Array< OneD, const LibUtilities::BasisSharedPtr > &tbasis)
GeomFactorsSharedPtr GetMetricInfo ()
LibUtilities::ShapeType GetShapeType (void)
int GetGlobalID (void)
void SetGlobalID (int globalid)
int GetVid (int i) const
int GetFid (int i) const
int GetNumVerts () const
PointGeomSharedPtr GetVertex (int i) const
StdRegions::Orientation GetEorient (const int i) const
StdRegions::Orientation GetPorient (const int i) const
int GetNumEdges () const
int GetNumFaces () const
int GetShapeDim () const
StdRegions::StdExpansionSharedPtr GetXmap () const
const Array< OneD, const
NekDouble > & 
GetCoeffs (const int i) const
bool ContainsPoint (const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0)
bool ContainsPoint (const Array< OneD, const NekDouble > &gloCoord, Array< OneD, NekDouble > &locCoord, NekDouble tol)
bool ContainsPoint (const Array< OneD, const NekDouble > &gloCoord, Array< OneD, NekDouble > &locCoord, NekDouble tol, NekDouble &resid)
int GetVertexEdgeMap (int i, int j) const
int GetVertexFaceMap (int i, int j) const
 return the id of the $j^{th}$ face attached to the $ i^{th}$ vertex
int GetEdgeFaceMap (int i, int j) const
void FillGeom ()
 Put all quadrature information into face/edge structure and backward transform.
NekDouble GetLocCoords (const Array< OneD, const NekDouble > &coords, Array< OneD, NekDouble > &Lcoords)
NekDouble GetCoord (const int i, const Array< OneD, const NekDouble > &Lcoord)
 Given local collapsed coordinate Lcoord return the value of physical coordinate in direction i.
void SetOwnData ()
const LibUtilities::BasisSharedPtr GetBasis (const int i)
 Return the j-th basis of the i-th co-ordinate dimension.
const LibUtilities::PointsKeyVector GetPointsKeys ()

Protected Member Functions

void NewtonIterationForLocCoord (const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &ptsx, const Array< OneD, const NekDouble > &ptsy, const Array< OneD, const NekDouble > &ptsz, Array< OneD, NekDouble > &Lcoords, NekDouble &resid)
virtual void v_FillGeom ()
 Put all quadrature information into face/edge structure and backward transform.
virtual NekDouble v_GetCoord (const int i, const Array< OneD, const NekDouble > &Lcoord)
 Given local collapsed coordinate Lcoord return the value of physical coordinate in direction i.
virtual void v_GenGeomFactors ()
virtual int v_GetShapeDim () const
 Return the dimension of this element.
virtual int v_GetVid (int i) const
 Return the vertex ID of vertex i.
virtual PointGeomSharedPtr v_GetVertex (int i) const
 Return vertex i in this element.
virtual const SegGeomSharedPtr v_GetEdge (int i) const
 Return edge i of this element.
virtual StdRegions::Orientation v_GetEorient (const int i) const
 Return the orientation of edge i in this element.
virtual int v_GetEid (int i) const
 Return the ID of edge i in this element.
virtual const Geometry2DSharedPtr v_GetFace (int i) const
 Return face i in this element.
virtual StdRegions::Orientation v_GetFaceOrient (const int i) const
 Return the orientation of face i in this element.
virtual int v_GetFid (int i) const
 Return the ID of face i in this element.
virtual int v_GetEid () const
 Return the ID of this element.
virtual int v_WhichEdge (SegGeomSharedPtr edge)
 Return the local ID of a given edge.
virtual int v_WhichFace (Geometry2DSharedPtr face)
 Return the local ID of a given face.
virtual const
LibUtilities::BasisSharedPtr 
v_GetBasis (const int i)
 Return the j-th basis of the i-th co-ordinate dimension.
virtual int v_GetDir (const int faceidx, const int facedir) const =0
virtual void v_AddElmtConnected (int gvo_id, int locid)
virtual bool v_IsElmtConnected (int gvo_id, int locid) const
virtual int v_NumElmtConnected () const
virtual void v_SetOwnData ()
- Protected Member Functions inherited from Nektar::SpatialDomains::Geometry
void GenGeomFactors ()
virtual int v_GetNumVerts () const
virtual StdRegions::Orientation v_GetPorient (const int i) const
virtual int v_GetNumEdges () const
virtual int v_GetNumFaces () const
virtual
StdRegions::StdExpansionSharedPtr 
v_GetXmap () const
virtual int v_GetCoordim () const
virtual bool v_ContainsPoint (const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0)
virtual bool v_ContainsPoint (const Array< OneD, const NekDouble > &gloCoord, Array< OneD, NekDouble > &locCoord, NekDouble tol)
virtual bool v_ContainsPoint (const Array< OneD, const NekDouble > &gloCoord, Array< OneD, NekDouble > &locCoord, NekDouble tol, NekDouble &resid)
virtual int v_GetVertexEdgeMap (int i, int j) const
virtual int v_GetVertexFaceMap (int i, int j) const
virtual int v_GetEdgeFaceMap (int i, int j) const
virtual NekDouble v_GetLocCoords (const Array< OneD, const NekDouble > &coords, Array< OneD, NekDouble > &Lcoords)
void SetUpCoeffs (const int nCoeffs)

Protected Attributes

PointGeomVector m_verts
SegGeomVector m_edges
Geometry2DVector m_faces
std::vector
< StdRegions::Orientation
m_eorient
std::vector
< StdRegions::Orientation
m_forient
std::list< CompToElmtm_elmtmap
bool m_owndata
int m_eid
bool m_ownverts
- Protected Attributes inherited from Nektar::SpatialDomains::Geometry
int m_coordim
 coordinate dimension
GeomFactorsSharedPtr m_geomFactors
GeomState m_geomFactorsState
StdRegions::StdExpansionSharedPtr m_xmap
GeomState m_state
 enum identifier to determine if quad points are filled
GeomType m_geomType
LibUtilities::ShapeType m_shapeType
int m_globalID
Array< OneD, Array< OneD,
NekDouble > > 
m_coeffs

Additional Inherited Members

- Static Protected Member Functions inherited from Nektar::SpatialDomains::Geometry
static GeomFactorsSharedPtr ValidateRegGeomFactor (GeomFactorsSharedPtr geomFactor)
- Static Protected Attributes inherited from Nektar::SpatialDomains::Geometry
static GeomFactorsVector m_regGeomFactorsManager

Detailed Description

3D geometry information

Definition at line 70 of file Geometry3D.h.

Constructor & Destructor Documentation

Nektar::SpatialDomains::Geometry3D::Geometry3D ( )

Definition at line 48 of file Geometry3D.cpp.

{
}
Nektar::SpatialDomains::Geometry3D::Geometry3D ( const int  coordim)

Definition at line 52 of file Geometry3D.cpp.

References ASSERTL0, and Nektar::SpatialDomains::Geometry::m_coordim.

:
Geometry(coordim)
{
"Coordinate dimension should be at least 3 for a 3D geometry.");
}
Nektar::SpatialDomains::Geometry3D::~Geometry3D ( )
virtual

Definition at line 59 of file Geometry3D.cpp.

{
}

Member Function Documentation

int Nektar::SpatialDomains::Geometry3D::GetDir ( const int  faceidx,
const int  facedir 
) const

Returns the element coordinate direction corresponding to a given face coordinate direction.

Definition at line 97 of file Geometry3D.cpp.

References v_GetDir().

Referenced by Nektar::SpatialDomains::MeshGraph3D::GetFaceBasisKey().

{
return v_GetDir(faceidx, facedir);
}
const Geometry1DSharedPtr Nektar::SpatialDomains::Geometry3D::GetEdge ( int  i) const

Referenced by Nektar::SpatialDomains::PrismGeom::PrismGeom(), Nektar::SpatialDomains::PyrGeom::PyrGeom(), Nektar::SpatialDomains::PyrGeom::SetUpLocalEdges(), Nektar::SpatialDomains::TetGeom::SetUpLocalEdges(), Nektar::SpatialDomains::PrismGeom::SetUpLocalEdges(), and Nektar::SpatialDomains::HexGeom::SetUpLocalEdges().

int Nektar::SpatialDomains::Geometry3D::GetEid ( int  i) const

Return the ID of edge i in this element.

Reimplemented from Nektar::SpatialDomains::Geometry.

Definition at line 71 of file Geometry3D.cpp.

References v_GetEid().

Referenced by Nektar::SpatialDomains::PyrGeom::SetUpLocalEdges(), Nektar::SpatialDomains::TetGeom::SetUpLocalEdges(), Nektar::SpatialDomains::PrismGeom::SetUpLocalEdges(), and Nektar::SpatialDomains::HexGeom::SetUpLocalEdges().

{
return v_GetEid(i);
}
Geometry2DSharedPtr Nektar::SpatialDomains::Geometry3D::GetFace ( int  i)

Return face i in this element.

Definition at line 79 of file Geometry3D.cpp.

References v_GetFace().

{
return v_GetFace(i);
}
StdRegions::Orientation Nektar::SpatialDomains::Geometry3D::GetFaceOrient ( const int  i) const

Return the orientation of face i in this element.

Definition at line 87 of file Geometry3D.cpp.

References v_GetFaceOrient().

{
return v_GetFaceOrient(i);
}
void Nektar::SpatialDomains::Geometry3D::NewtonIterationForLocCoord ( const Array< OneD, const NekDouble > &  coords,
const Array< OneD, const NekDouble > &  ptsx,
const Array< OneD, const NekDouble > &  ptsy,
const Array< OneD, const NekDouble > &  ptsz,
Array< OneD, NekDouble > &  Lcoords,
NekDouble resid 
)
protected

Definition at line 105 of file Geometry3D.cpp.

References Nektar::SpatialDomains::Geometry::m_geomFactors, Nektar::SpatialDomains::Geometry::m_xmap, Vmath::Vsum(), and WARNINGL1.

Referenced by Nektar::SpatialDomains::TetGeom::v_GetLocCoords(), Nektar::SpatialDomains::PrismGeom::v_GetLocCoords(), and Nektar::SpatialDomains::HexGeom::v_GetLocCoords().

{
// maximum iterations for convergence
const int MaxIterations = 51;
// |x-xp|^2 < EPSILON error tolerance
const NekDouble Tol = 1.e-8;
// |r,s| > LcoordDIV stop the search
const NekDouble LcoordDiv = 15.0;
Array<OneD, const NekDouble > Jac =
m_geomFactors->GetJac(m_xmap->GetPointsKeys());
NekDouble ScaledTol = Vmath::Vsum(Jac.num_elements(), Jac, 1) /
((NekDouble)Jac.num_elements());
ScaledTol *= Tol;
NekDouble xmap,ymap,zmap, F1,F2, F3;
NekDouble derx_1, derx_2, derx_3, dery_1, dery_2, dery_3,
derz_1, derz_2, derz_3, jac;
// save intiial guess for later reference if required.
NekDouble init0 = Lcoords[0], init1 = Lcoords[1], init2 = Lcoords[2];
Array<OneD, NekDouble> DxD1(ptsx.num_elements());
Array<OneD, NekDouble> DxD2(ptsx.num_elements());
Array<OneD, NekDouble> DxD3(ptsx.num_elements());
Array<OneD, NekDouble> DyD1(ptsx.num_elements());
Array<OneD, NekDouble> DyD2(ptsx.num_elements());
Array<OneD, NekDouble> DyD3(ptsx.num_elements());
Array<OneD, NekDouble> DzD1(ptsx.num_elements());
Array<OneD, NekDouble> DzD2(ptsx.num_elements());
Array<OneD, NekDouble> DzD3(ptsx.num_elements());
// Ideally this will be stored in m_geomfactors
m_xmap->PhysDeriv(ptsx,DxD1,DxD2,DxD3);
m_xmap->PhysDeriv(ptsy,DyD1,DyD2,DyD3);
m_xmap->PhysDeriv(ptsz,DzD1,DzD2,DzD3);
int cnt=0;
Array<OneD, DNekMatSharedPtr > I(3);
Array<OneD, NekDouble> eta(3);
F1 = F2 = F3 = 2000; // Starting value of Function
while(cnt++ < MaxIterations)
{
// evaluate lagrange interpolant at Lcoords
m_xmap->LocCoordToLocCollapsed(Lcoords,eta);
I[0] = m_xmap->GetBasis(0)->GetI(eta );
I[1] = m_xmap->GetBasis(1)->GetI(eta+1);
I[2] = m_xmap->GetBasis(2)->GetI(eta+2);
//calculate the global point `corresponding to Lcoords
xmap = m_xmap->PhysEvaluate(I, ptsx);
ymap = m_xmap->PhysEvaluate(I, ptsy);
zmap = m_xmap->PhysEvaluate(I, ptsz);
F1 = coords[0] - xmap;
F2 = coords[1] - ymap;
F3 = coords[2] - zmap;
if(F1*F1 + F2*F2 + F3*F3 < ScaledTol)
{
resid = sqrt(F1*F1 + F2*F2 + F3*F3);
break;
}
//Interpolate derivative metric at Lcoords
derx_1 = m_xmap->PhysEvaluate(I, DxD1);
derx_2 = m_xmap->PhysEvaluate(I, DxD2);
derx_3 = m_xmap->PhysEvaluate(I, DxD3);
dery_1 = m_xmap->PhysEvaluate(I, DyD1);
dery_2 = m_xmap->PhysEvaluate(I, DyD2);
dery_3 = m_xmap->PhysEvaluate(I, DyD3);
derz_1 = m_xmap->PhysEvaluate(I, DzD1);
derz_2 = m_xmap->PhysEvaluate(I, DzD2);
derz_3 = m_xmap->PhysEvaluate(I, DzD3);
jac = derx_1*(dery_2*derz_3 - dery_3*derz_2)
- derx_2*(dery_1*derz_3 - dery_3*derz_1)
+ derx_3*(dery_1*derz_2 - dery_2*derz_1);
// use analytical inverse of derivitives which are also similar to
// those of metric factors.
Lcoords[0] = Lcoords[0]
+((dery_2*derz_3 - dery_3*derz_2)*(coords[0]-xmap)
- (derx_2*derz_3 - derx_3*derz_2)*(coords[1]-ymap)
+ (derx_2*dery_3 - derx_3*dery_2)*(coords[2]-zmap)
)/jac;
Lcoords[1] = Lcoords[1]
-((dery_1*derz_3 - dery_3*derz_1)*(coords[0]-xmap)
- (derx_1*derz_3 - derx_3*derz_1)*(coords[1]-ymap)
+ (derx_1*dery_3 - derx_3*dery_1)*(coords[2]-zmap)
)/jac;
Lcoords[2] = Lcoords[2]
+((dery_1*derz_2 - dery_2*derz_1)*(coords[0]-xmap)
- (derx_1*derz_2 - derx_2*derz_1)*(coords[1]-ymap)
+ (derx_1*dery_2 - derx_2*dery_1)*(coords[2]-zmap)
)/jac;
if (fabs(Lcoords[0]) > LcoordDiv || fabs(Lcoords[1]) > LcoordDiv ||
fabs(Lcoords[0]) > LcoordDiv)
{
break; // lcoords have diverged so stop iteration
}
}
resid = sqrt(F1*F1 + F2*F2 + F3*F3);
if(cnt >= MaxIterations)
{
Array<OneD, NekDouble> collCoords(3);
m_xmap->LocCoordToLocCollapsed(Lcoords,collCoords);
// if coordinate is inside element dump error!
if((collCoords[0] >= -1.0 && collCoords[0] <= 1.0)&&
(collCoords[1] >= -1.0 && collCoords[1] <= 1.0)&&
(collCoords[2] >= -1.0 && collCoords[2] <= 1.0))
{
std::ostringstream ss;
ss << "Reached MaxIterations (" << MaxIterations << ") in Newton iteration ";
ss << "Init value ("<< setprecision(4) << init0 << "," << init1<< "," << init2 <<") ";
ss << "Fin value ("<<Lcoords[0] << "," << Lcoords[1]<< "," << Lcoords[2] << ") ";
ss << "Resid = " << resid << " Tolerance = " << sqrt(ScaledTol) ;
WARNINGL1(cnt < MaxIterations,ss.str());
}
}
}
void Nektar::SpatialDomains::Geometry3D::v_AddElmtConnected ( int  gvo_id,
int  locid 
)
protectedvirtual

Reimplemented from Nektar::SpatialDomains::Geometry.

Definition at line 508 of file Geometry3D.cpp.

References m_elmtmap.

{
CompToElmt ee(gvo_id,locid);
m_elmtmap.push_back(ee);
}
void Nektar::SpatialDomains::Geometry3D::v_FillGeom ( )
protectedvirtual

Put all quadrature information into face/edge structure and backward transform.

Note verts, edges, and faces are listed according to anticlockwise convention but points in _coeffs have to be in array format from left to right.

Reimplemented from Nektar::SpatialDomains::Geometry.

Definition at line 253 of file Geometry3D.cpp.

References Nektar::SpatialDomains::ePtsFilled, Nektar::SpatialDomains::Geometry::GetXmap(), Nektar::SpatialDomains::Geometry::m_coeffs, Nektar::SpatialDomains::Geometry::m_coordim, m_faces, m_forient, Nektar::SpatialDomains::Geometry::m_state, and Nektar::SpatialDomains::Geometry::m_xmap.

Referenced by Nektar::SpatialDomains::TetGeom::v_ContainsPoint(), Nektar::SpatialDomains::PrismGeom::v_ContainsPoint(), Nektar::SpatialDomains::HexGeom::v_ContainsPoint(), Nektar::SpatialDomains::PyrGeom::v_GenGeomFactors(), Nektar::SpatialDomains::PrismGeom::v_GenGeomFactors(), Nektar::SpatialDomains::HexGeom::v_GenGeomFactors(), v_GenGeomFactors(), Nektar::SpatialDomains::TetGeom::v_GetLocCoords(), Nektar::SpatialDomains::PyrGeom::v_GetLocCoords(), Nektar::SpatialDomains::PrismGeom::v_GetLocCoords(), and Nektar::SpatialDomains::HexGeom::v_GetLocCoords().

{
return;
int i,j,k;
for(i = 0; i < m_forient.size(); i++)
{
m_faces[i]->FillGeom();
int nFaceCoeffs = m_faces[i]->GetXmap()->GetNcoeffs();
Array<OneD, unsigned int> mapArray (nFaceCoeffs);
Array<OneD, int> signArray(nFaceCoeffs);
if (m_forient[i] < 9)
{
m_xmap->GetFaceToElementMap(
i, m_forient[i], mapArray, signArray,
m_faces[i]->GetXmap()->GetEdgeNcoeffs(0),
m_faces[i]->GetXmap()->GetEdgeNcoeffs(1));
}
else
{
m_xmap->GetFaceToElementMap(
i, m_forient[i], mapArray, signArray,
m_faces[i]->GetXmap()->GetEdgeNcoeffs(1),
m_faces[i]->GetXmap()->GetEdgeNcoeffs(0));
}
for (j = 0; j < m_coordim; j++)
{
const Array<OneD, const NekDouble> &coeffs =
m_faces[i]->GetCoeffs(j);
for (k = 0; k < nFaceCoeffs; k++)
{
NekDouble v = signArray[k] * coeffs[k];
m_coeffs[j][mapArray[k]] = v;
}
}
}
}
void Nektar::SpatialDomains::Geometry3D::v_GenGeomFactors ( )
protectedvirtual

Generate the geometry factors for this element.

Implements Nektar::SpatialDomains::Geometry.

Reimplemented in Nektar::SpatialDomains::HexGeom, Nektar::SpatialDomains::PrismGeom, and Nektar::SpatialDomains::PyrGeom.

Definition at line 303 of file Geometry3D.cpp.

References Nektar::SpatialDomains::eDeformed, Nektar::SpatialDomains::ePtsFilled, Nektar::SpatialDomains::eRegular, Nektar::SpatialDomains::Geometry::m_coeffs, Nektar::SpatialDomains::Geometry::m_coordim, Nektar::SpatialDomains::Geometry::m_geomFactors, Nektar::SpatialDomains::Geometry::m_geomFactorsState, Nektar::SpatialDomains::Geometry::m_xmap, and v_FillGeom().

{
{
GeomType Gtype = eRegular;
// check to see if expansions are linear
for(int i = 0; i < m_coordim; ++i)
{
if (m_xmap->GetBasisNumModes(0) != 2 ||
m_xmap->GetBasisNumModes(1) != 2 ||
m_xmap->GetBasisNumModes(2) != 2)
{
Gtype = eDeformed;
}
}
m_geomFactors = MemoryManager<GeomFactors>::AllocateSharedPtr(
Gtype, m_coordim, m_xmap, m_coeffs);
}
}
const LibUtilities::BasisSharedPtr Nektar::SpatialDomains::Geometry3D::v_GetBasis ( const int  i)
protectedvirtual

Return the j-th basis of the i-th co-ordinate dimension.

Reimplemented from Nektar::SpatialDomains::Geometry.

Definition at line 452 of file Geometry3D.cpp.

References Nektar::SpatialDomains::Geometry::m_xmap.

{
return m_xmap->GetBasis(i);
}
NekDouble Nektar::SpatialDomains::Geometry3D::v_GetCoord ( const int  i,
const Array< OneD, const NekDouble > &  Lcoord 
)
protectedvirtual

Given local collapsed coordinate Lcoord return the value of physical coordinate in direction i.

Reimplemented from Nektar::SpatialDomains::Geometry.

Definition at line 332 of file Geometry3D.cpp.

References ASSERTL1, Nektar::SpatialDomains::ePtsFilled, Nektar::SpatialDomains::Geometry::m_coeffs, Nektar::SpatialDomains::Geometry::m_state, and Nektar::SpatialDomains::Geometry::m_xmap.

{
"Geometry is not in physical space");
Array<OneD, NekDouble> tmp(m_xmap->GetTotPoints());
m_xmap->BwdTrans(m_coeffs[i], tmp);
return m_xmap->PhysEvaluate(Lcoord, tmp);
}
virtual int Nektar::SpatialDomains::Geometry3D::v_GetDir ( const int  faceidx,
const int  facedir 
) const
protectedpure virtual

Implemented in Nektar::SpatialDomains::HexGeom, Nektar::SpatialDomains::PrismGeom, Nektar::SpatialDomains::TetGeom, and Nektar::SpatialDomains::PyrGeom.

Referenced by GetDir().

const SegGeomSharedPtr Nektar::SpatialDomains::Geometry3D::v_GetEdge ( int  i) const
protectedvirtual

Return edge i of this element.

Definition at line 379 of file Geometry3D.cpp.

References ASSERTL2, and m_edges.

{
ASSERTL2(i >= 0 && i <= m_edges.size() - 1,
"Edge ID must be between 0 and "+
boost::lexical_cast<string>(m_edges.size() - 1));
return m_edges[i];
}
int Nektar::SpatialDomains::Geometry3D::v_GetEid ( int  i) const
protectedvirtual

Return the ID of edge i in this element.

Reimplemented from Nektar::SpatialDomains::Geometry.

Definition at line 402 of file Geometry3D.cpp.

References ASSERTL2, and m_edges.

{
ASSERTL2(i >= 0 && i <= m_edges.size() - 1,
"Edge ID must be between 0 and "+
boost::lexical_cast<string>(m_edges.size() - 1));
return m_edges[i]->GetEid();
}
int Nektar::SpatialDomains::Geometry3D::v_GetEid ( ) const
protectedvirtual

Return the ID of this element.

Definition at line 444 of file Geometry3D.cpp.

References m_eid.

Referenced by GetEid().

{
return m_eid;
}
StdRegions::Orientation Nektar::SpatialDomains::Geometry3D::v_GetEorient ( const int  i) const
inlineprotectedvirtual

Return the orientation of edge i in this element.

Reimplemented from Nektar::SpatialDomains::Geometry.

Definition at line 390 of file Geometry3D.cpp.

References ASSERTL2, m_edges, and m_eorient.

{
ASSERTL2(i >= 0 && i <= m_edges.size() - 1,
"Edge ID must be between 0 and "+
boost::lexical_cast<string>(m_edges.size() - 1));
return m_eorient[i];
}
const Geometry2DSharedPtr Nektar::SpatialDomains::Geometry3D::v_GetFace ( int  i) const
protectedvirtual

Return face i in this element.

Definition at line 413 of file Geometry3D.cpp.

References ASSERTL2, and m_faces.

Referenced by GetFace().

{
ASSERTL2((i >=0) && (i <= 5),"Edge id must be between 0 and 4");
return m_faces[i];
}
StdRegions::Orientation Nektar::SpatialDomains::Geometry3D::v_GetFaceOrient ( const int  i) const
protectedvirtual

Return the orientation of face i in this element.

Definition at line 422 of file Geometry3D.cpp.

References ASSERTL2, m_faces, and m_forient.

Referenced by GetFaceOrient().

{
ASSERTL2(i >= 0 && i <= m_faces.size() - 1,
"Face ID must be between 0 and "+
boost::lexical_cast<string>(m_faces.size() - 1));
return m_forient[i];
}
int Nektar::SpatialDomains::Geometry3D::v_GetFid ( int  i) const
protectedvirtual

Return the ID of face i in this element.

Reimplemented from Nektar::SpatialDomains::Geometry.

Definition at line 433 of file Geometry3D.cpp.

References ASSERTL2, and m_faces.

{
ASSERTL2(i >= 0 && i <= m_faces.size() - 1,
"Face ID must be between 0 and "+
boost::lexical_cast<string>(m_faces.size() - 1));
return m_faces[i]->GetFid();
}
int Nektar::SpatialDomains::Geometry3D::v_GetShapeDim ( ) const
protectedvirtual

Return the dimension of this element.

Reimplemented from Nektar::SpatialDomains::Geometry.

Definition at line 352 of file Geometry3D.cpp.

{
return 3;
}
PointGeomSharedPtr Nektar::SpatialDomains::Geometry3D::v_GetVertex ( int  i) const
protectedvirtual

Return vertex i in this element.

Implements Nektar::SpatialDomains::Geometry.

Definition at line 371 of file Geometry3D.cpp.

References m_verts.

{
return m_verts[i];
}
int Nektar::SpatialDomains::Geometry3D::v_GetVid ( int  i) const
protectedvirtual

Return the vertex ID of vertex i.

Reimplemented from Nektar::SpatialDomains::Geometry.

Definition at line 360 of file Geometry3D.cpp.

References ASSERTL2, and m_verts.

{
ASSERTL2(i >= 0 && i <= m_verts.size() - 1,
"Vertex ID must be between 0 and "+
boost::lexical_cast<string>(m_verts.size() - 1));
return m_verts[i]->GetVid();
}
bool Nektar::SpatialDomains::Geometry3D::v_IsElmtConnected ( int  gvo_id,
int  locid 
) const
protectedvirtual

Reimplemented from Nektar::SpatialDomains::Geometry.

Definition at line 519 of file Geometry3D.cpp.

References Nektar::StdRegions::find(), and m_elmtmap.

{
std::list<CompToElmt>::const_iterator def;
CompToElmt ee(gvo_id,locid);
def = find(m_elmtmap.begin(),m_elmtmap.end(),ee);
// Found the element connectivity object in the list
return (def != m_elmtmap.end());
}
int Nektar::SpatialDomains::Geometry3D::v_NumElmtConnected ( ) const
protectedvirtual

Reimplemented from Nektar::SpatialDomains::Geometry.

Definition at line 514 of file Geometry3D.cpp.

References m_elmtmap.

{
return int(m_elmtmap.size());
}
void Nektar::SpatialDomains::Geometry3D::v_SetOwnData ( )
protectedvirtual

Reimplemented from Nektar::SpatialDomains::Geometry.

Definition at line 530 of file Geometry3D.cpp.

References m_owndata.

{
m_owndata = true;
}
int Nektar::SpatialDomains::Geometry3D::v_WhichEdge ( SegGeomSharedPtr  edge)
protectedvirtual

Return the local ID of a given edge.

The local ID of an edge is a number between 0 and the number of edges in this element. If the edge is not found, this function returns -1.

Definition at line 464 of file Geometry3D.cpp.

References Nektar::iterator, and m_edges.

{
int returnval = -1;
int i;
for (i=0,edgeIter = m_edges.begin(); edgeIter != m_edges.end(); ++edgeIter,++i)
{
if (*edgeIter == edge)
{
returnval = i;
break;
}
}
return returnval;
}
int Nektar::SpatialDomains::Geometry3D::v_WhichFace ( Geometry2DSharedPtr  face)
protectedvirtual

Return the local ID of a given face.

The local ID of a face is a number between 0 and the number of faces in this element. If the face is not found, this function returns -1.

Definition at line 489 of file Geometry3D.cpp.

References Nektar::iterator, and m_faces.

{
int i = 0;
for (i = 0, f = m_faces.begin(); f != m_faces.end(); ++f,++i)
{
if (*f == face)
{
break;
}
}
return i;
}

Member Data Documentation

SegGeomVector Nektar::SpatialDomains::Geometry3D::m_edges
protected

Definition at line 92 of file Geometry3D.h.

Referenced by Nektar::SpatialDomains::PyrGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::TetGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::PrismGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::HexGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::PyrGeom::SetUpLocalEdges(), Nektar::SpatialDomains::TetGeom::SetUpLocalEdges(), Nektar::SpatialDomains::PrismGeom::SetUpLocalEdges(), Nektar::SpatialDomains::HexGeom::SetUpLocalEdges(), Nektar::SpatialDomains::PyrGeom::SetUpLocalVertices(), Nektar::SpatialDomains::TetGeom::SetUpLocalVertices(), Nektar::SpatialDomains::PrismGeom::SetUpLocalVertices(), Nektar::SpatialDomains::HexGeom::SetUpLocalVertices(), v_GetEdge(), v_GetEid(), v_GetEorient(), and v_WhichEdge().

int Nektar::SpatialDomains::Geometry3D::m_eid
protected

Definition at line 98 of file Geometry3D.h.

Referenced by v_GetEid().

std::list<CompToElmt> Nektar::SpatialDomains::Geometry3D::m_elmtmap
protected

Definition at line 96 of file Geometry3D.h.

Referenced by v_AddElmtConnected(), v_IsElmtConnected(), and v_NumElmtConnected().

std::vector<StdRegions::Orientation> Nektar::SpatialDomains::Geometry3D::m_eorient
protected

Definition at line 94 of file Geometry3D.h.

Referenced by Nektar::SpatialDomains::HexGeom::HexGeom(), Nektar::SpatialDomains::PrismGeom::PrismGeom(), Nektar::SpatialDomains::PyrGeom::PyrGeom(), Nektar::SpatialDomains::PyrGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::TetGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::PrismGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::HexGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::TetGeom::TetGeom(), and v_GetEorient().

Geometry2DVector Nektar::SpatialDomains::Geometry3D::m_faces
protected

Definition at line 93 of file Geometry3D.h.

Referenced by Nektar::SpatialDomains::HexGeom::HexGeom(), Nektar::SpatialDomains::PrismGeom::PrismGeom(), Nektar::SpatialDomains::PyrGeom::PyrGeom(), Nektar::SpatialDomains::PyrGeom::SetUpFaceOrientation(), Nektar::SpatialDomains::TetGeom::SetUpFaceOrientation(), Nektar::SpatialDomains::PrismGeom::SetUpFaceOrientation(), Nektar::SpatialDomains::HexGeom::SetUpFaceOrientation(), Nektar::SpatialDomains::PyrGeom::SetUpLocalEdges(), Nektar::SpatialDomains::TetGeom::SetUpLocalEdges(), Nektar::SpatialDomains::PrismGeom::SetUpLocalEdges(), Nektar::SpatialDomains::HexGeom::SetUpLocalEdges(), Nektar::SpatialDomains::TetGeom::TetGeom(), v_FillGeom(), v_GetFace(), v_GetFaceOrient(), v_GetFid(), and v_WhichFace().

std::vector<StdRegions::Orientation> Nektar::SpatialDomains::Geometry3D::m_forient
protected

Definition at line 95 of file Geometry3D.h.

Referenced by Nektar::SpatialDomains::HexGeom::HexGeom(), Nektar::SpatialDomains::PrismGeom::PrismGeom(), Nektar::SpatialDomains::PyrGeom::PyrGeom(), Nektar::SpatialDomains::PyrGeom::SetUpFaceOrientation(), Nektar::SpatialDomains::TetGeom::SetUpFaceOrientation(), Nektar::SpatialDomains::PrismGeom::SetUpFaceOrientation(), Nektar::SpatialDomains::HexGeom::SetUpFaceOrientation(), Nektar::SpatialDomains::TetGeom::TetGeom(), v_FillGeom(), and v_GetFaceOrient().

bool Nektar::SpatialDomains::Geometry3D::m_owndata
protected

Definition at line 97 of file Geometry3D.h.

Referenced by v_SetOwnData().

bool Nektar::SpatialDomains::Geometry3D::m_ownverts
protected

Definition at line 99 of file Geometry3D.h.

PointGeomVector Nektar::SpatialDomains::Geometry3D::m_verts
protected

Definition at line 91 of file Geometry3D.h.

Referenced by Nektar::SpatialDomains::PyrGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::TetGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::PrismGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::HexGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::PyrGeom::SetUpFaceOrientation(), Nektar::SpatialDomains::TetGeom::SetUpFaceOrientation(), Nektar::SpatialDomains::PrismGeom::SetUpFaceOrientation(), Nektar::SpatialDomains::HexGeom::SetUpFaceOrientation(), Nektar::SpatialDomains::PyrGeom::SetUpLocalVertices(), Nektar::SpatialDomains::TetGeom::SetUpLocalVertices(), Nektar::SpatialDomains::PrismGeom::SetUpLocalVertices(), Nektar::SpatialDomains::HexGeom::SetUpLocalVertices(), Nektar::SpatialDomains::PyrGeom::v_GenGeomFactors(), Nektar::SpatialDomains::PrismGeom::v_GenGeomFactors(), Nektar::SpatialDomains::HexGeom::v_GenGeomFactors(), Nektar::SpatialDomains::TetGeom::v_GetLocCoords(), Nektar::SpatialDomains::PyrGeom::v_GetLocCoords(), Nektar::SpatialDomains::PrismGeom::v_GetLocCoords(), v_GetVertex(), and v_GetVid().