|
Nektar++
|
#include <SegGeom.h>
Public Member Functions | |
| SegGeom () | |
| SegGeom (int id, int coordim, std::array< PointGeom *, kNverts > vertex, Curve *curve=nullptr) | |
| SegGeom (const SegGeom &in) | |
| SegGeomUniquePtr | GenerateOneSpaceDimGeom (EntityHolder1D &holder) |
| Generate a one dimensional space segment geometry where the vert[0] has the same x value and vert[1] is set to vert[0] plus the length of the original segment. | |
| ~SegGeom () override=default | |
| Curve * | GetCurve () |
| void | SetCurve (Curve *curvePtr) |
Public Member Functions inherited from Nektar::SpatialDomains::Geometry1D | |
| Geometry1D () | |
| Geometry1D (const int coordim) | |
| ~Geometry1D () override=default | |
Public Member Functions inherited from Nektar::SpatialDomains::Geometry | |
| Geometry () | |
| Default constructor. | |
| Geometry (int coordim) | |
| Constructor when supplied a coordinate dimension. | |
| virtual | ~Geometry ()=default |
| int | GetCoordim () const |
| Return the coordinate dimension of this object (i.e. the dimension of the space in which this object is embedded). | |
| void | SetCoordim (int coordim) |
| Sets the coordinate dimension of this object (i.e. the dimension of the space in which this object is embedded). | |
| GeomFactorsUniquePtr | GenGeomFactors (LibUtilities::PointsKeyVector &keyTgt) |
| Used by Expansion to generate associated GeomFactors. | |
| LibUtilities::ShapeType | GetShapeType (void) |
| Get the geometric shape type of this object. | |
| int | GetGlobalID (void) const |
| Get the ID of this object. | |
| void | SetGlobalID (int globalid) |
| Set the ID of this object. | |
| int | GetVid (int i) const |
Returns global id of vertex i of this object. | |
| int | GetEid (int i) const |
Get the ID of edge i of this object. | |
| int | GetFid (int i) const |
Get the ID of face i of this object. | |
| int | GetTid (int i) const |
Get the ID of trace i of this object. | |
| PointGeom * | GetVertex (int i) const |
Returns vertex i of this object. | |
| Geometry1D * | GetEdge (int i) const |
Returns edge i of this object. | |
| Geometry2D * | GetFace (int i) const |
Returns face i of this object. | |
| StdRegions::Orientation | GetEorient (const int i) const |
Returns the orientation of edge i with respect to the ordering of edges in the standard element. | |
| StdRegions::Orientation | GetForient (const int i) const |
Returns the orientation of face i with respect to the ordering of faces in the standard element. | |
| int | GetNumVerts () const |
| Get the number of vertices of this object. | |
| int | GetNumEdges () const |
| Get the number of edges of this object. | |
| int | GetNumFaces () const |
| Get the number of faces of this object. | |
| int | GetShapeDim () const |
| Get the object's shape dimension. | |
| StdRegions::StdExpansionSharedPtr | GetXmap () const |
| Return the mapping object Geometry::m_xmap that represents the coordinate transformation from standard element to physical element. | |
| const Array< OneD, const NekDouble > & | GetCoeffs (const int i) const |
Return the coefficients of the transformation Geometry::m_xmap in coordinate direction i. | |
| void | FillGeom () |
| Populate the coordinate mapping Geometry::m_coeffs information from any children geometry elements. | |
| std::array< NekDouble, 6 > | GetBoundingBox () |
| Generates the bounding box for the element. | |
| 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)\). | |
| 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)\). | |
| 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)\). | |
| 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. | |
| 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. | |
| 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. | |
| bool | MinMaxCheck (const Array< OneD, const NekDouble > &gloCoord) |
| Check if given global coord is within the BoundingBox of the element. | |
| bool | ClampLocCoords (Array< OneD, NekDouble > &locCoord, NekDouble tol=std::numeric_limits< NekDouble >::epsilon()) |
| Clamp local coords to be within standard regions [-1, 1]^dim. | |
| 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. | |
| int | GetVertexFaceMap (int i, int j) const |
| Returns the standard element face IDs that are connected to a given vertex. | |
| int | GetEdgeFaceMap (int i, int j) const |
| Returns the standard element edge IDs that are connected to a given face. | |
| int | GetEdgeNormalToFaceVert (int i, int j) const |
| Returns the standard lement edge IDs that are normal to a given face vertex. | |
| int | GetDir (const int i, const int j=0) const |
| Returns the element coordinate direction corresponding to a given face coordinate direction. | |
| GeomType | CalcGeomType () |
| void | Reset (CurveMap &curvedEdges, CurveMap &curvedFaces) |
| Reset this geometry object: unset the current state, zero Geometry::m_coeffs and remove allocated GeomFactors. | |
| void | ResetNonRecursive (CurveMap &curvedEdges, CurveMap &curvedFaces) |
| Reset this geometry object non-recursively: unset the current state, zero Geometry::m_coeffs and remove allocated GeomFactors. | |
| void | Setup () |
Static Public Member Functions | |
| static StdRegions::Orientation | GetEdgeOrientation (const SegGeom &edge1, const SegGeom &edge2) |
Get the orientation of edge1. | |
Static Public Attributes | |
| static const int | kNverts = 2 |
| static const int | kNfacets = kNverts |
Static Public Attributes inherited from Nektar::SpatialDomains::Geometry1D | |
| static const int | kDim = 1 |
Protected Member Functions | |
| PointGeom * | v_GetVertex (const int i) const override |
Returns vertex i of this object. | |
| virtual LibUtilities::ShapeType | v_GetShapeType () const |
| GeomType | v_CalcGeomType () override |
| GeomFactorsUniquePtr | v_GenGeomFactors (LibUtilities::PointsKeyVector &keyTgt) override |
| Used by Expansion to generate associated GeomFactors. | |
| void | v_FillGeom () override |
| Populate the coordinate mapping Geometry::m_coeffs information from any children geometry elements. | |
| void | v_Reset (CurveMap &curvedEdges, CurveMap &curvedFaces) override |
| Reset this geometry object: unset the current state, zero Geometry::m_coeffs and remove allocated GeomFactors. | |
| void | v_Setup () override |
| 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. | |
| int | v_GetNumVerts () const override |
| Get the number of vertices of this object. | |
| NekDouble | v_FindDistance (const Array< OneD, const NekDouble > &xs, Array< OneD, NekDouble > &xi) override |
Protected Member Functions inherited from Nektar::SpatialDomains::Geometry1D | |
| int | v_GetShapeDim () const override |
| Get the object's shape dimension. | |
| 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. | |
Protected Member Functions inherited from Nektar::SpatialDomains::Geometry | |
| virtual int | v_GetVid (int i) const |
Get the ID of vertex i of this object. | |
| virtual Geometry1D * | v_GetEdge (const int i) const |
Returns edge i of this object. | |
| virtual Geometry2D * | v_GetFace (const int i) const |
Returns face i of this object. | |
| 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. | |
| 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. | |
| virtual int | v_GetNumEdges () const |
| Get the number of edges of this object. | |
| virtual int | v_GetNumFaces () const |
| Get the number of faces of this object. | |
| virtual StdRegions::StdExpansionSharedPtr | v_GetXmap () const |
| Return the mapping object Geometry::m_xmap that represents the coordinate transformation from standard element to physical element. | |
| 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)\). | |
| virtual int | v_AllLeftCheck (const Array< OneD, const NekDouble > &gloCoord) |
| virtual int | v_GetVertexEdgeMap (int i, int j) const |
| Returns the standard element edge IDs that are connected to a given vertex. | |
| virtual int | v_GetVertexFaceMap (int i, int j) const |
| Returns the standard element face IDs that are connected to a given vertex. | |
| virtual int | v_GetEdgeFaceMap (int i, int j) const |
| Returns the standard element edge IDs that are connected to a given face. | |
| 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. | |
| virtual int | v_GetDir (const int faceidx, const int facedir) const |
| Returns the element coordinate direction corresponding to a given face coordinate direction. | |
| void | SetUpCoeffs (const int nCoeffs) |
| Initialise the Geometry::m_coeffs array. | |
| virtual void | v_CalculateInverseIsoParam () |
Protected Attributes | |
| std::array< SpatialDomains::PointGeom *, kNverts > | m_verts |
| StdRegions::Orientation | m_porient [kNverts] |
Protected Attributes inherited from Nektar::SpatialDomains::Geometry | |
| int | m_coordim |
| Coordinate dimension of this geometry object. | |
| StdRegions::StdExpansionSharedPtr | m_xmap |
| \(\chi\) mapping containing isoparametric transformation. | |
| GeomState | m_state |
| Enumeration to dictate whether coefficients are filled. | |
| bool | m_setupState |
| Wether or not the setup routines have been run. | |
| LibUtilities::ShapeType | m_shapeType |
| Type of shape. | |
| int | m_globalID |
| Global ID. | |
| std::vector< Array< OneD, NekDouble > > | m_coeffs |
Array containing expansion coefficients of m_xmap. | |
| Array< OneD, NekDouble > | m_boundingBox |
| Array containing bounding box. | |
| Array< OneD, Array< OneD, NekDouble > > | m_isoParameter |
| Array< OneD, Array< OneD, NekDouble > > | m_invIsoParam |
| int | m_straightEdge |
Private Member Functions | |
| void | SetUpXmap () |
Private Attributes | |
| Curve * | m_curve = nullptr |
| Boolean indicating whether object owns the data. | |
| Nektar::SpatialDomains::SegGeom::SegGeom | ( | ) |
Definition at line 64 of file SegGeom.cpp.
References Nektar::LibUtilities::eSegment, and Nektar::SpatialDomains::Geometry::m_shapeType.
| Nektar::SpatialDomains::SegGeom::SegGeom | ( | int | id, |
| int | coordim, | ||
| std::array< PointGeom *, kNverts > | vertex, | ||
| Curve * | curve = nullptr |
||
| ) |
Definition at line 69 of file SegGeom.cpp.
References Nektar::SpatialDomains::eNotFilled, Nektar::LibUtilities::eSegment, m_curve, Nektar::SpatialDomains::Geometry::m_globalID, Nektar::SpatialDomains::Geometry::m_shapeType, Nektar::SpatialDomains::Geometry::m_state, and m_verts.
| Nektar::SpatialDomains::SegGeom::SegGeom | ( | const SegGeom & | in | ) |
Definition at line 80 of file SegGeom.cpp.
References Nektar::SpatialDomains::Geometry::m_coordim, Nektar::SpatialDomains::Geometry::m_globalID, Nektar::SpatialDomains::Geometry::m_shapeType, Nektar::SpatialDomains::Geometry::m_state, m_verts, Nektar::SpatialDomains::Geometry::m_xmap, and Nektar::SpatialDomains::Geometry::SetUpCoeffs().
|
overridedefault |
| SegGeomUniquePtr Nektar::SpatialDomains::SegGeom::GenerateOneSpaceDimGeom | ( | EntityHolder1D & | holder | ) |
Generate a one dimensional space segment geometry where the vert[0] has the same x value and vert[1] is set to vert[0] plus the length of the original segment.
Definition at line 122 of file SegGeom.cpp.
References Nektar::ObjPoolManager< DataType >::AllocateUniquePtr(), Nektar::SpatialDomains::eNotFilled, Nektar::SpatialDomains::Geometry::GetGlobalID(), Nektar::SpatialDomains::Geometry::m_globalID, Nektar::SpatialDomains::EntityHolder1D::m_pointVec, m_verts, Nektar::SpatialDomains::Geometry::m_xmap, and v_GenGeomFactors().
|
inline |
Definition at line 80 of file SegGeom.h.
References m_curve.
Referenced by export_GeomElements(), and Nektar::SpatialDomains::ZoneBase::ZoneBase().
|
static |
Get the orientation of edge1.
If edge1 is connected to edge2 in the same direction as the points comprising edge1 then it is forward, otherwise it is backward.
For example, assume edge1 is comprised of points 1 and 2, and edge2 is comprised of points 2 and 3, then edge1 is forward.
If edge1 is comprised of points 2 and 1 and edge2 is comprised of points 3 and 2, then edge1 is backward.
Since both edges are passed, it does not need any information from the EdgeComponent instance.
Definition at line 211 of file SegGeom.cpp.
References Nektar::StdRegions::eBackwards, Nektar::ErrorUtil::efatal, Nektar::StdRegions::eForwards, Nektar::SpatialDomains::Geometry::GetGlobalID(), Nektar::SpatialDomains::Geometry::GetVertex(), and NEKERROR.
Referenced by Nektar::SpatialDomains::TriGeom::TriGeom().
|
private |
Definition at line 98 of file SegGeom.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eModified_A, m_curve, Nektar::SpatialDomains::Curve::m_points, and Nektar::SpatialDomains::Geometry::m_xmap.
|
overrideprotectedvirtual |
Calculates the GeomType (deformed, regular etc).
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 235 of file SegGeom.cpp.
References Nektar::SpatialDomains::eDeformed, Nektar::SpatialDomains::eRegular, Nektar::SpatialDomains::Geometry::m_setupState, Nektar::SpatialDomains::Geometry::m_xmap, v_FillGeom(), and v_Setup().
|
overrideprotectedvirtual |
Populate the coordinate mapping Geometry::m_coeffs information from any children geometry elements.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 261 of file SegGeom.cpp.
References Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::SpatialDomains::ePtsFilled, Nektar::ErrorUtil::ewarning, Nektar::eWrapper, Nektar::NekVector< DataType >::GetPtr(), Nektar::NekConstants::kVertexTheSameDouble, Nektar::SpatialDomains::Geometry::m_coeffs, Nektar::SpatialDomains::Geometry::m_coordim, m_curve, Nektar::SpatialDomains::Geometry::m_globalID, Nektar::SpatialDomains::Curve::m_points, Nektar::SpatialDomains::Curve::m_ptype, Nektar::SpatialDomains::Geometry::m_state, m_verts, Nektar::SpatialDomains::Geometry::m_xmap, NEKERROR, and Nektar::LibUtilities::PointsManager().
Referenced by v_CalcGeomType().
|
overrideprotectedvirtual |
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 370 of file SegGeom.cpp.
References Nektar::SpatialDomains::Geometry::CalcGeomType(), Nektar::SpatialDomains::Geometry::ClampLocCoords(), Nektar::SpatialDomains::eDeformed, Nektar::ErrorUtil::efatal, Nektar::SpatialDomains::eRegular, Nektar::SpatialDomains::Geometry::GetCoord(), Nektar::SpatialDomains::Geometry::GetCoordim(), Nektar::SpatialDomains::Geometry::GetLocCoords(), Nektar::NekConstants::kNewtonIterations, Nektar::SpatialDomains::Geometry::m_coeffs, Nektar::SpatialDomains::Geometry::m_coordim, Nektar::SpatialDomains::Geometry::m_xmap, NEKERROR, and tinysimd::sqrt().
|
overrideprotectedvirtual |
Used by Expansion to generate associated GeomFactors.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 253 of file SegGeom.cpp.
References Nektar::ObjPoolManager< DataType >::AllocateUniquePtr(), Nektar::SpatialDomains::Geometry::CalcGeomType(), Nektar::SpatialDomains::Geometry::m_coeffs, Nektar::SpatialDomains::Geometry::m_coordim, and Nektar::SpatialDomains::Geometry::m_xmap.
Referenced by GenerateOneSpaceDimGeom().
|
overrideprotectedvirtual |
Given local collapsed coordinate Lcoord, return the value of physical coordinate in direction i.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 182 of file SegGeom.cpp.
References Nektar::SpatialDomains::ePtsFilled, Nektar::ErrorUtil::ewarning, Nektar::SpatialDomains::Geometry::m_coeffs, Nektar::SpatialDomains::Geometry::m_state, Nektar::SpatialDomains::Geometry::m_xmap, and NEKERROR.
|
overrideprotectedvirtual |
Get the number of vertices of this object.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 365 of file SegGeom.cpp.
References kNverts.
|
protectedvirtual |
Definition at line 177 of file SegGeom.cpp.
References Nektar::LibUtilities::eSegment.
|
overrideprotectedvirtual |
Returns vertex i of this object.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 353 of file SegGeom.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 329 of file SegGeom.cpp.
References m_curve, 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 343 of file SegGeom.cpp.
References Nektar::SpatialDomains::Geometry::m_setupState, Nektar::SpatialDomains::Geometry::m_xmap, Nektar::SpatialDomains::Geometry::SetUpCoeffs(), and SetUpXmap().
Referenced by v_CalcGeomType().
|
static |
|
static |
Definition at line 62 of file SegGeom.h.
Referenced by v_GetNumVerts(), and v_GetVertex().
|
private |
Boolean indicating whether object owns the data.
Definition at line 109 of file SegGeom.h.
Referenced by GetCurve(), SegGeom(), SetCurve(), SetUpXmap(), v_FillGeom(), and v_Reset().
|
protected |
|
protected |
Definition at line 90 of file SegGeom.h.
Referenced by GenerateOneSpaceDimGeom(), SegGeom(), SegGeom(), v_FillGeom(), and v_GetVertex().