Nektar++
|
3D geometry information More...
#include <Geometry3D.h>
Public Member Functions | |
Geometry3D () | |
Geometry3D (const int coordim) | |
virtual | ~Geometry3D () |
int | GetDir (const int faceidx, const int facedir) const |
Returns the element coordinate direction corresponding to a given face coordinate direction. More... | |
![]() | |
Geometry () | |
Default constructor. More... | |
Geometry (int coordim) | |
Constructor when supplied a coordinate dimension. More... | |
virtual | ~Geometry () |
Default destructor. More... | |
int | GetCoordim () const |
Return the coordinate dimension of this object (i.e. the dimension of the space in which this object is embedded). More... | |
void | SetCoordim (int coordim) |
Sets the coordinate dimension of this object (i.e. the dimension of the space in which this object is embedded). More... | |
GeomFactorsSharedPtr | GetGeomFactors () |
Get the geometric factors for this object, generating them if required. More... | |
GeomFactorsSharedPtr | GetRefGeomFactors (const Array< OneD, const LibUtilities::BasisSharedPtr > &tbasis) |
GeomFactorsSharedPtr | GetMetricInfo () |
Get the geometric factors for this object. More... | |
LibUtilities::ShapeType | GetShapeType (void) |
Get the geometric shape type of this object. More... | |
int | GetGlobalID (void) const |
Get the ID of this object. More... | |
void | SetGlobalID (int globalid) |
Set the ID of this object. More... | |
int | GetVid (int i) const |
Get the ID of vertex i of this object. More... | |
int | GetEid (int i) const |
Get the ID of edge i of this object. More... | |
int | GetFid (int i) const |
Get the ID of face i of this object. More... | |
int | GetTid (int i) const |
Get the ID of trace i of this object. More... | |
PointGeomSharedPtr | GetVertex (int i) const |
Returns vertex i of this object. More... | |
Geometry1DSharedPtr | GetEdge (int i) const |
Returns edge i of this object. More... | |
Geometry2DSharedPtr | GetFace (int i) const |
Returns face i of this object. More... | |
StdRegions::Orientation | GetEorient (const int i) const |
Returns the orientation of edge i with respect to the ordering of edges in the standard element. More... | |
StdRegions::Orientation | GetForient (const int i) const |
Returns the orientation of face i with respect to the ordering of faces in the standard element. More... | |
int | GetNumVerts () const |
Get the number of vertices of this object. More... | |
int | GetNumEdges () const |
Get the number of edges of this object. More... | |
int | GetNumFaces () const |
Get the number of faces of this object. More... | |
int | GetShapeDim () const |
Get the object's shape dimension. More... | |
StdRegions::StdExpansionSharedPtr | GetXmap () const |
Return the mapping object Geometry::m_xmap that represents the coordinate transformation from standard element to physical element. More... | |
const Array< OneD, const NekDouble > & | GetCoeffs (const int i) const |
Return the coefficients of the transformation Geometry::m_xmap in coordinate direction i . More... | |
void | FillGeom () |
Populate the coordinate mapping Geometry::m_coeffs information from any children geometry elements. More... | |
std::array< NekDouble, 6 > | GetBoundingBox () |
Generates the bounding box for the element. More... | |
bool | ContainsPoint (const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0) |
Determine whether an element contains a particular Cartesian coordinate \((x,y,z)\). More... | |
bool | ContainsPoint (const Array< OneD, const NekDouble > &gloCoord, Array< OneD, NekDouble > &locCoord, NekDouble tol) |
Determine whether an element contains a particular Cartesian coordinate \((x,y,z)\). More... | |
bool | ContainsPoint (const Array< OneD, const NekDouble > &gloCoord, Array< OneD, NekDouble > &locCoord, NekDouble tol, NekDouble &resid) |
Determine whether an element contains a particular Cartesian coordinate \(\vec{x} = (x,y,z)\). More... | |
NekDouble | GetLocCoords (const Array< OneD, const NekDouble > &coords, Array< OneD, NekDouble > &Lcoords) |
Determine the local collapsed coordinates that correspond to a given Cartesian coordinate for this geometry object. More... | |
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 . More... | |
bool | MinMaxCheck (const Array< OneD, const NekDouble > &gloCoord) |
Check if given global coord is within twice the min/max distance of the element. More... | |
void | ClampLocCoords (Array< OneD, NekDouble > &locCoord, NekDouble tol) |
Clamp local coords to be within standard regions [-1, 1]^dim. More... | |
int | GetVertexEdgeMap (int i, int j) const |
Returns the standard element edge IDs that are connected to a given vertex. More... | |
int | GetVertexFaceMap (int i, int j) const |
Returns the standard element face IDs that are connected to a given vertex. More... | |
int | GetEdgeFaceMap (int i, int j) const |
Returns the standard element edge IDs that are connected to a given face. More... | |
void | Reset (CurveMap &curvedEdges, CurveMap &curvedFaces) |
Reset this geometry object: unset the current state, zero Geometry::m_coeffs and remove allocated GeomFactors. More... | |
void | Setup () |
Static Public Attributes | |
static const int | kDim = 3 |
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. More... | |
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. More... | |
virtual int | v_GetShapeDim () const |
Get the object's shape dimension. More... | |
virtual int | v_GetNumVerts () const |
Get the number of vertices of this object. More... | |
virtual int | v_GetNumEdges () const |
Get the number of edges of this object. More... | |
virtual int | v_GetNumFaces () const |
Get the number of faces of this object. More... | |
virtual PointGeomSharedPtr | v_GetVertex (int i) const |
virtual Geometry1DSharedPtr | v_GetEdge (int i) const |
Returns edge i of this object. More... | |
virtual Geometry2DSharedPtr | v_GetFace (int i) const |
Returns face i of this object. More... | |
virtual StdRegions::Orientation | v_GetEorient (const int i) const |
Returns the orientation of edge i with respect to the ordering of edges in the standard element. More... | |
virtual StdRegions::Orientation | v_GetForient (const int i) const |
Returns the orientation of face i with respect to the ordering of faces in the standard element. More... | |
virtual int | v_GetDir (const int faceidx, const int facedir) const =0 |
![]() | |
void | GenGeomFactors () |
Handles generation of geometry factors. More... | |
virtual StdRegions::StdExpansionSharedPtr | v_GetXmap () const |
Return the mapping object Geometry::m_xmap that represents the coordinate transformation from standard element to physical element. More... | |
virtual bool | v_ContainsPoint (const Array< OneD, const NekDouble > &gloCoord, Array< OneD, NekDouble > &locCoord, NekDouble tol, NekDouble &resid) |
virtual NekDouble | v_GetLocCoords (const Array< OneD, const NekDouble > &coords, Array< OneD, NekDouble > &Lcoords) |
Determine the local collapsed coordinates that correspond to a given Cartesian coordinate for this geometry object. More... | |
virtual int | v_GetVertexEdgeMap (int i, int j) const |
Returns the standard element edge IDs that are connected to a given vertex. More... | |
virtual int | v_GetVertexFaceMap (int i, int j) const |
Returns the standard element face IDs that are connected to a given vertex. More... | |
virtual int | v_GetEdgeFaceMap (int i, int j) const |
Returns the standard element edge IDs that are connected to a given face. More... | |
virtual void | v_Reset (CurveMap &curvedEdges, CurveMap &curvedFaces) |
Reset this geometry object: unset the current state, zero Geometry::m_coeffs and remove allocated GeomFactors. More... | |
virtual void | v_Setup () |
virtual void | v_GenGeomFactors ()=0 |
void | SetUpCoeffs (const int nCoeffs) |
Initialise the Geometry::m_coeffs array. More... | |
Protected Attributes | |
PointGeomVector | m_verts |
SegGeomVector | m_edges |
Geometry2DVector | m_faces |
std::vector< StdRegions::Orientation > | m_eorient |
std::vector< StdRegions::Orientation > | m_forient |
int | m_eid |
bool | m_ownverts |
![]() | |
int | m_coordim |
Coordinate dimension of this geometry object. More... | |
GeomFactorsSharedPtr | m_geomFactors |
Geometric factors. More... | |
GeomState | m_geomFactorsState |
State of the geometric factors. More... | |
StdRegions::StdExpansionSharedPtr | m_xmap |
\(\chi\) mapping containing isoparametric transformation. More... | |
GeomState | m_state |
Enumeration to dictate whether coefficients are filled. More... | |
bool | m_setupState |
Wether or not the setup routines have been run. More... | |
GeomType | m_geomType |
Type of geometry. More... | |
LibUtilities::ShapeType | m_shapeType |
Type of shape. More... | |
int | m_globalID |
Global ID. More... | |
Array< OneD, Array< OneD, NekDouble > > | m_coeffs |
Array containing expansion coefficients of m_xmap . More... | |
Additional Inherited Members | |
![]() | |
static GeomFactorsSharedPtr | ValidateRegGeomFactor (GeomFactorsSharedPtr geomFactor) |
Check to see if a geometric factor has already been created that contains the same regular information. More... | |
![]() | |
static GeomFactorsVector | m_regGeomFactorsManager |
3D geometry information
Definition at line 67 of file Geometry3D.h.
Nektar::SpatialDomains::Geometry3D::Geometry3D | ( | ) |
Definition at line 51 of file Geometry3D.cpp.
Nektar::SpatialDomains::Geometry3D::Geometry3D | ( | const int | coordim | ) |
Definition at line 55 of file Geometry3D.cpp.
References ASSERTL0, and Nektar::SpatialDomains::Geometry::m_coordim.
|
virtual |
Definition at line 61 of file Geometry3D.cpp.
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 73 of file Geometry3D.cpp.
References v_GetDir().
Referenced by Nektar::SpatialDomains::MeshGraph::GetFaceBasisKey().
|
protected |
Definition at line 81 of file Geometry3D.cpp.
References Nektar::SpatialDomains::Geometry::m_geomFactors, Nektar::SpatialDomains::Geometry::m_xmap, Vmath::Vsum(), and WARNINGL1.
Referenced by Nektar::SpatialDomains::PyrGeom::v_GetLocCoords(), Nektar::SpatialDomains::TetGeom::v_GetLocCoords(), Nektar::SpatialDomains::PrismGeom::v_GetLocCoords(), and Nektar::SpatialDomains::HexGeom::v_GetLocCoords().
|
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 235 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::PyrGeom::v_GenGeomFactors(), Nektar::SpatialDomains::PrismGeom::v_GenGeomFactors(), Nektar::SpatialDomains::HexGeom::v_GenGeomFactors(), Nektar::SpatialDomains::TetGeom::v_GenGeomFactors(), Nektar::SpatialDomains::PyrGeom::v_GetLocCoords(), Nektar::SpatialDomains::TetGeom::v_GetLocCoords(), Nektar::SpatialDomains::PrismGeom::v_GetLocCoords(), and Nektar::SpatialDomains::HexGeom::v_GetLocCoords().
|
protectedvirtual |
Given local collapsed coordinate Lcoord return the value of physical coordinate in direction i.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 294 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.
|
protectedpure virtual |
Implemented in Nektar::SpatialDomains::HexGeom, Nektar::SpatialDomains::PrismGeom, Nektar::SpatialDomains::TetGeom, and Nektar::SpatialDomains::PyrGeom.
Referenced by GetDir().
|
protectedvirtual |
Returns edge i
of this object.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 334 of file Geometry3D.cpp.
References ASSERTL2, and m_edges.
|
inlineprotectedvirtual |
Returns the orientation of edge i
with respect to the ordering of edges in the standard element.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 348 of file Geometry3D.cpp.
References ASSERTL2, m_edges, and m_eorient.
|
protectedvirtual |
Returns face i
of this object.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 342 of file Geometry3D.cpp.
References ASSERTL2, and m_faces.
|
protectedvirtual |
Returns the orientation of face i
with respect to the ordering of faces in the standard element.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 356 of file Geometry3D.cpp.
References ASSERTL2, m_faces, and m_forient.
|
protectedvirtual |
Get the number of edges of this object.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 319 of file Geometry3D.cpp.
References m_edges.
|
protectedvirtual |
Get the number of faces of this object.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 324 of file Geometry3D.cpp.
References m_faces.
|
protectedvirtual |
Get the number of vertices of this object.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 314 of file Geometry3D.cpp.
References m_verts.
|
protectedvirtual |
Get the object's shape dimension.
For example, a segment is one dimensional and quadrilateral is two dimensional.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 309 of file Geometry3D.cpp.
|
protectedvirtual |
Implements Nektar::SpatialDomains::Geometry.
Definition at line 329 of file Geometry3D.cpp.
References m_verts.
|
static |
Definition at line 80 of file Geometry3D.h.
|
protected |
Definition at line 84 of file Geometry3D.h.
Referenced by Nektar::SpatialDomains::PyrGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::PrismGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::TetGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::HexGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::PyrGeom::SetUpLocalEdges(), Nektar::SpatialDomains::PrismGeom::SetUpLocalEdges(), Nektar::SpatialDomains::TetGeom::SetUpLocalEdges(), Nektar::SpatialDomains::HexGeom::SetUpLocalEdges(), Nektar::SpatialDomains::PyrGeom::SetUpLocalVertices(), Nektar::SpatialDomains::PrismGeom::SetUpLocalVertices(), Nektar::SpatialDomains::TetGeom::SetUpLocalVertices(), Nektar::SpatialDomains::HexGeom::SetUpLocalVertices(), v_GetEdge(), v_GetEorient(), and v_GetNumEdges().
|
protected |
Definition at line 88 of file Geometry3D.h.
|
protected |
Definition at line 86 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().
|
protected |
Definition at line 85 of file Geometry3D.h.
Referenced by Nektar::SpatialDomains::HexGeom::HexGeom(), Nektar::SpatialDomains::PrismGeom::PrismGeom(), Nektar::SpatialDomains::PyrGeom::PyrGeom(), Nektar::SpatialDomains::PyrGeom::SetUpFaceOrientation(), Nektar::SpatialDomains::PrismGeom::SetUpFaceOrientation(), Nektar::SpatialDomains::TetGeom::SetUpFaceOrientation(), Nektar::SpatialDomains::HexGeom::SetUpFaceOrientation(), Nektar::SpatialDomains::PyrGeom::SetUpLocalEdges(), Nektar::SpatialDomains::TetGeom::SetUpLocalEdges(), Nektar::SpatialDomains::PrismGeom::SetUpLocalEdges(), Nektar::SpatialDomains::HexGeom::SetUpLocalEdges(), Nektar::SpatialDomains::PyrGeom::SetUpXmap(), Nektar::SpatialDomains::PrismGeom::SetUpXmap(), Nektar::SpatialDomains::TetGeom::SetUpXmap(), Nektar::SpatialDomains::HexGeom::SetUpXmap(), Nektar::SpatialDomains::TetGeom::TetGeom(), v_FillGeom(), v_GetFace(), v_GetForient(), v_GetNumFaces(), Nektar::SpatialDomains::PyrGeom::v_Reset(), Nektar::SpatialDomains::TetGeom::v_Reset(), Nektar::SpatialDomains::PrismGeom::v_Reset(), Nektar::SpatialDomains::HexGeom::v_Reset(), Nektar::SpatialDomains::PyrGeom::v_Setup(), Nektar::SpatialDomains::TetGeom::v_Setup(), Nektar::SpatialDomains::PrismGeom::v_Setup(), and Nektar::SpatialDomains::HexGeom::v_Setup().
|
protected |
Definition at line 87 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::SetUpXmap(), Nektar::SpatialDomains::PrismGeom::SetUpXmap(), Nektar::SpatialDomains::HexGeom::SetUpXmap(), Nektar::SpatialDomains::TetGeom::TetGeom(), v_FillGeom(), and v_GetForient().
|
protected |
Definition at line 89 of file Geometry3D.h.
|
protected |
Definition at line 83 of file Geometry3D.h.
Referenced by Nektar::SpatialDomains::PyrGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::PrismGeom::SetUpEdgeOrientation(), Nektar::SpatialDomains::TetGeom::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(), Nektar::SpatialDomains::HexGeom::v_GetLocCoords(), v_GetNumVerts(), and v_GetVertex().