Nektar++
|
#include <TriGeom.h>
Public Member Functions | |
TriGeom () | |
TriGeom (const TriGeom &in) | |
TriGeom (const int id, const SegGeomSharedPtr edges[], const CurveSharedPtr curve=CurveSharedPtr()) | |
~TriGeom () override | |
Public Member Functions inherited from Nektar::SpatialDomains::Geometry2D | |
Geometry2D () | |
Geometry2D (const int coordim, CurveSharedPtr curve) | |
~Geometry2D () override | |
CurveSharedPtr | GetCurve () |
Public Member Functions inherited from Nektar::SpatialDomains::Geometry | |
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... | |
void | ClearBoundingBox () |
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 &dist) |
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... | |
int | PreliminaryCheck (const Array< OneD, const NekDouble > &gloCoord) |
A fast and robust check if a given global coord is outside of a deformed element. For regular elements, this check is unnecessary. More... | |
bool | MinMaxCheck (const Array< OneD, const NekDouble > &gloCoord) |
Check if given global coord is within the BoundingBox of the element. More... | |
bool | ClampLocCoords (Array< OneD, NekDouble > &locCoord, NekDouble tol=std::numeric_limits< NekDouble >::epsilon()) |
Clamp local coords to be within standard regions [-1, 1]^dim. More... | |
NekDouble | FindDistance (const Array< OneD, const NekDouble > &xs, Array< OneD, NekDouble > &xi) |
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... | |
int | GetEdgeNormalToFaceVert (int i, int j) const |
Returns the standard lement edge IDs that are normal to a given face vertex. More... | |
int | GetDir (const int i, const int j=0) const |
Returns the element coordinate direction corresponding to a given face coordinate direction. 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 | ResetNonRecursive (CurveMap &curvedEdges, CurveMap &curvedFaces) |
Reset this geometry object non-recursively: unset the current state, zero Geometry::m_coeffs and remove allocated GeomFactors. More... | |
void | Setup () |
void | GenGeomFactors () |
Handles generation of geometry factors. More... | |
Static Public Member Functions | |
static StdRegions::Orientation | GetFaceOrientation (const TriGeom &face1, const TriGeom &face2, bool doRot, int dir, NekDouble angle, NekDouble tol) |
static StdRegions::Orientation | GetFaceOrientation (const PointGeomVector &face1, const PointGeomVector &face2, bool doRot, int dir, NekDouble angle, NekDouble tol) |
Static Public Attributes | |
static const int | kNedges = 3 |
Get the orientation of face1. More... | |
static const int | kNverts = 3 |
Static Public Attributes inherited from Nektar::SpatialDomains::Geometry2D | |
static const int | kDim = 2 |
Protected Member Functions | |
NekDouble | v_GetCoord (const int i, const Array< OneD, const NekDouble > &Lcoord) override |
Given local collapsed coordinate Lcoord , return the value of physical coordinate in direction i . More... | |
void | v_GenGeomFactors () override |
void | v_FillGeom () override |
int | v_GetDir (const int faceidx, const int facedir) const override |
Returns the element coordinate direction corresponding to a given face coordinate direction. More... | |
void | v_Reset (CurveMap &curvedEdges, CurveMap &curvedFaces) override |
Reset this geometry object: unset the current state, zero Geometry::m_coeffs and remove allocated GeomFactors. More... | |
void | v_Setup () override |
Protected Member Functions inherited from Nektar::SpatialDomains::Geometry2D | |
NekDouble | v_GetLocCoords (const Array< OneD, const NekDouble > &coords, Array< OneD, NekDouble > &Lcoords) override |
Determine the local collapsed coordinates that correspond to a given Cartesian coordinate for this geometry object. More... | |
void | NewtonIterationForLocCoord (const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &ptsx, const Array< OneD, const NekDouble > &ptsy, Array< OneD, NekDouble > &Lcoords, NekDouble &dist) |
void | SolveStraightEdgeQuad (const Array< OneD, const NekDouble > &coords, Array< OneD, NekDouble > &Lcoords) |
void | v_CalculateInverseIsoParam () override |
int | v_AllLeftCheck (const Array< OneD, const NekDouble > &gloCoord) override |
int | v_GetShapeDim () const override |
Get the object's shape dimension. More... | |
PointGeomSharedPtr | v_GetVertex (int i) const override |
Geometry1DSharedPtr | v_GetEdge (int i) const override |
Returns edge i of this object. More... | |
int | v_GetNumVerts () const override |
Get the number of vertices of this object. More... | |
int | v_GetNumEdges () const override |
Get the number of edges of this object. More... | |
StdRegions::Orientation | v_GetEorient (const int i) const override |
Returns the orientation of edge i with respect to the ordering of edges in the standard element. More... | |
NekDouble | v_FindDistance (const Array< OneD, const NekDouble > &xs, Array< OneD, NekDouble > &xi) override |
Protected Member Functions inherited from Nektar::SpatialDomains::Geometry | |
virtual PointGeomSharedPtr | v_GetVertex (int i) const =0 |
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_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 int | v_GetShapeDim () const |
Get the object's shape dimension. 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 void | v_FillGeom () |
Populate the coordinate mapping Geometry::m_coeffs information from any children geometry elements. More... | |
virtual bool | v_ContainsPoint (const Array< OneD, const NekDouble > &gloCoord, Array< OneD, NekDouble > &locCoord, NekDouble tol, NekDouble &dist) |
Determine whether an element contains a particular Cartesian coordinate \(\vec{x} = (x,y,z)\). More... | |
virtual int | v_AllLeftCheck (const Array< OneD, const NekDouble > &gloCoord) |
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 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 NekDouble | v_FindDistance (const Array< OneD, const NekDouble > &xs, Array< OneD, NekDouble > &xi) |
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 int | v_GetEdgeNormalToFaceVert (const int i, const int j) const |
Returns the standard lement edge IDs that are normal to a given face vertex. More... | |
virtual int | v_GetDir (const int faceidx, const int facedir) const |
Returns the element coordinate direction corresponding to a given face coordinate direction. 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... | |
virtual void | v_CalculateInverseIsoParam () |
Private Member Functions | |
void | SetUpXmap () |
Additional Inherited Members | |
Static Protected Member Functions inherited from Nektar::SpatialDomains::Geometry | |
static GeomFactorsSharedPtr | ValidateRegGeomFactor (GeomFactorsSharedPtr geomFactor) |
Check to see if a geometric factor has already been created that contains the same regular information. More... | |
Protected Attributes inherited from Nektar::SpatialDomains::Geometry2D | |
PointGeomVector | m_verts |
SegGeomVector | m_edges |
std::vector< StdRegions::Orientation > | m_eorient |
CurveSharedPtr | m_curve |
Array< OneD, int > | m_manifold |
Array< OneD, Array< OneD, NekDouble > > | m_edgeNormal |
Protected Attributes inherited from Nektar::SpatialDomains::Geometry | |
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... | |
Array< OneD, NekDouble > | m_boundingBox |
Array containing bounding box. More... | |
Array< OneD, Array< OneD, NekDouble > > | m_isoParameter |
Array< OneD, Array< OneD, NekDouble > > | m_invIsoParam |
int | m_straightEdge |
Static Protected Attributes inherited from Nektar::SpatialDomains::Geometry | |
static GeomFactorsVector | m_regGeomFactorsManager |
Nektar::SpatialDomains::TriGeom::TriGeom | ( | ) |
Definition at line 49 of file TriGeom.cpp.
References Nektar::LibUtilities::eTriangle, and Nektar::SpatialDomains::Geometry::m_shapeType.
Nektar::SpatialDomains::TriGeom::TriGeom | ( | const TriGeom & | in | ) |
Definition at line 83 of file TriGeom.cpp.
References kNedges, Nektar::SpatialDomains::Geometry2D::m_edges, Nektar::SpatialDomains::Geometry2D::m_eorient, Nektar::SpatialDomains::Geometry::m_globalID, Nektar::SpatialDomains::Geometry::m_shapeType, and Nektar::SpatialDomains::Geometry2D::m_verts.
Nektar::SpatialDomains::TriGeom::TriGeom | ( | const int | id, |
const SegGeomSharedPtr | edges[], | ||
const CurveSharedPtr | curve = CurveSharedPtr() |
||
) |
Definition at line 54 of file TriGeom.cpp.
References ASSERTL0, Nektar::StdRegions::eBackwards, Nektar::StdRegions::eForwards, Nektar::LibUtilities::eTriangle, Nektar::SpatialDomains::SegGeom::GetEdgeOrientation(), Nektar::SpatialDomains::Geometry::GetVertex(), kNedges, Nektar::SpatialDomains::Geometry::m_coordim, Nektar::SpatialDomains::Geometry2D::m_edges, Nektar::SpatialDomains::Geometry2D::m_eorient, Nektar::SpatialDomains::Geometry::m_globalID, Nektar::SpatialDomains::Geometry::m_shapeType, and Nektar::SpatialDomains::Geometry2D::m_verts.
|
override |
Definition at line 100 of file TriGeom.cpp.
|
static |
Definition at line 125 of file TriGeom.cpp.
References ASSERTL0, Nektar::SpatialDomains::PointGeom::dist(), Nektar::StdRegions::eDir1BwdDir1_Dir2BwdDir2, Nektar::StdRegions::eDir1BwdDir1_Dir2FwdDir2, Nektar::StdRegions::eDir1BwdDir2_Dir2BwdDir1, Nektar::StdRegions::eDir1FwdDir1_Dir2FwdDir2, Nektar::StdRegions::eDir1FwdDir2_Dir2BwdDir1, Nektar::StdRegions::eDir1FwdDir2_Dir2FwdDir1, Nektar::StdRegions::eNoOrientation, Nektar::SpatialDomains::PointGeom::Rotate(), tinysimd::sqrt(), and Nektar::UnitTests::z().
|
static |
Definition at line 115 of file TriGeom.cpp.
References GetFaceOrientation(), and Nektar::SpatialDomains::Geometry2D::m_verts.
Referenced by Nektar::MultiRegions::DisContField::FindPeriodicTraces(), and GetFaceOrientation().
|
private |
Definition at line 556 of file TriGeom.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eModified_A, Nektar::LibUtilities::eModified_B, Nektar::SpatialDomains::Geometry::GetXmap(), Nektar::SpatialDomains::Geometry2D::m_edges, and Nektar::SpatialDomains::Geometry::m_xmap.
|
overrideprotectedvirtual |
Note verts and edges 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 308 of file TriGeom.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, Nektar::StdRegions::eBackwards, Nektar::StdRegions::eForwards, Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eOrtho_A, Nektar::LibUtilities::eOrtho_B, Nektar::SpatialDomains::ePtsFilled, Nektar::ErrorUtil::ewarning, Nektar::SpatialDomains::Geometry::GetXmap(), Nektar::LibUtilities::Interp2D(), kNedges, Nektar::NekConstants::kVertexTheSameDouble, Nektar::SpatialDomains::Geometry::m_coeffs, Nektar::SpatialDomains::Geometry::m_coordim, Nektar::SpatialDomains::Geometry2D::m_curve, Nektar::SpatialDomains::Geometry2D::m_edges, Nektar::SpatialDomains::Geometry2D::m_eorient, Nektar::SpatialDomains::Geometry::m_globalID, Nektar::SpatialDomains::Geometry::m_state, Nektar::SpatialDomains::Geometry2D::m_verts, Nektar::SpatialDomains::Geometry::m_xmap, NEKERROR, Nektar::LibUtilities::PointsManager(), and tinysimd::sqrt().
Referenced by v_GenGeomFactors().
|
overrideprotectedvirtual |
Implements Nektar::SpatialDomains::Geometry.
Definition at line 225 of file TriGeom.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::UnitTests::d(), 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_isoParameter, Nektar::SpatialDomains::Geometry2D::m_manifold, Nektar::SpatialDomains::Geometry::m_setupState, Nektar::SpatialDomains::Geometry::m_straightEdge, Nektar::SpatialDomains::Geometry2D::m_verts, Nektar::SpatialDomains::Geometry::m_xmap, Nektar::SpatialDomains::PointGeom::Mult(), Nektar::SpatialDomains::PointGeom::Sub(), Nektar::SpatialDomains::Geometry2D::v_CalculateInverseIsoParam(), v_FillGeom(), and v_Setup().
|
overrideprotectedvirtual |
Given local collapsed coordinate Lcoord
, return the value of physical coordinate in direction i
.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 104 of file TriGeom.cpp.
References ASSERTL1, Nektar::SpatialDomains::ePtsFilled, Nektar::SpatialDomains::Geometry::m_coeffs, Nektar::SpatialDomains::Geometry::m_state, and Nektar::SpatialDomains::Geometry::m_xmap.
|
overrideprotectedvirtual |
Returns the element coordinate direction corresponding to a given face coordinate direction.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 518 of file TriGeom.cpp.
|
overrideprotectedvirtual |
Reset this geometry object: unset the current state, zero Geometry::m_coeffs and remove allocated GeomFactors.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 523 of file TriGeom.cpp.
References Nektar::SpatialDomains::Geometry2D::m_curve, Nektar::SpatialDomains::Geometry2D::m_edges, Nektar::SpatialDomains::Geometry::m_globalID, Nektar::SpatialDomains::Geometry::m_xmap, Nektar::SpatialDomains::Geometry::SetUpCoeffs(), SetUpXmap(), and Nektar::SpatialDomains::Geometry::v_Reset().
|
overrideprotectedvirtual |
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 542 of file TriGeom.cpp.
References Nektar::SpatialDomains::Geometry2D::m_edges, Nektar::SpatialDomains::Geometry::m_setupState, Nektar::SpatialDomains::Geometry::m_xmap, Nektar::SpatialDomains::Geometry::SetUpCoeffs(), and SetUpXmap().
Referenced by v_GenGeomFactors().
|
static |
Get the orientation of face1.
Definition at line 70 of file TriGeom.h.
Referenced by Nektar::PrismCollectionTests::CreatePrism(), Nektar::PyrCollectionTests::CreatePyr(), Nektar::TetCollectionTests::CreateTet(), Nektar::TriCollectionTests::CreateTri(), TriGeom(), v_FillGeom(), Nektar::SpatialDomains::MeshGraphIOXml::v_ReadElements2D(), Nektar::SpatialDomains::MeshGraphIOXmlCompressed::v_ReadElements2D(), Nektar::SpatialDomains::MeshGraphIOXml::v_ReadFaces(), and Nektar::SpatialDomains::MeshGraphIOXmlCompressed::v_ReadFaces().
|
static |
Definition at line 71 of file TriGeom.h.
Referenced by Nektar::SpatialDomains::TetGeom::SetUpFaceOrientation().