|
Nektar++
|
#include <QuadGeom.h>
Public Member Functions | |
| QuadGeom () | |
| QuadGeom (const QuadGeom &in) | |
| QuadGeom (const int id, std::array< SegGeom *, kNverts > edges, const CurveSharedPtr curve=CurveSharedPtr()) | |
| ~QuadGeom () override=default | |
Public Member Functions inherited from Nektar::SpatialDomains::Geometry2D | |
| Geometry2D () | |
| Geometry2D (const int coordim, CurveSharedPtr curve) | |
| ~Geometry2D () override=default | |
| CurveSharedPtr | GetCurve () |
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). | |
| GeomFactorsSharedPtr | GetGeomFactors () |
| Get the geometric factors for this object, generating them if required. | |
| GeomFactorsSharedPtr | GetRefGeomFactors (const Array< OneD, const LibUtilities::BasisSharedPtr > &tbasis) |
| GeomFactorsSharedPtr | GetMetricInfo () |
| Get the geometric factors for this object. | |
| 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. | |
| 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 () |
| void | GenGeomFactors () |
| Handles generation of geometry factors. | |
Static Public Member Functions | |
| static StdRegions::Orientation | GetFaceOrientation (const QuadGeom &face1, const QuadGeom &face2, bool doRot=false, int dir=0, NekDouble angle=0.0, NekDouble tol=1e-8) |
| Get the orientation of face1. | |
| static StdRegions::Orientation | GetFaceOrientation (std::array< PointGeom *, 4 > face1, std::array< PointGeom *, 4 > face2, bool doRot=false, int dir=0, NekDouble angle=0.0, NekDouble tol=1e-8) |
Static Public Attributes | |
| static const int | kNedges = 4 |
| static const int | kNverts = 4 |
| static const int | kNfacets = kNedges |
| static const std::string | XMLElementType |
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. | |
| 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. | |
| 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 |
| void | PreSolveStraightEdge () |
| int | v_AllLeftCheck (const Array< OneD, const NekDouble > &gloCoord) override |
| int | v_GetNumVerts () const final |
| Get the number of vertices of this object. | |
| int | v_GetNumEdges () const final |
| Get the number of edges of this object. | |
| PointGeom * | v_GetVertex (const int i) const final |
Returns vertex i of this object. | |
| Geometry1D * | v_GetEdge (const int i) const final |
Returns edge i of this object. | |
| StdRegions::Orientation | v_GetEorient (const int i) const final |
Returns the orientation of edge i with respect to the ordering of edges in the standard element. | |
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. | |
| 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_GetShapeDim () const override |
| Get the object's shape dimension. | |
| NekDouble | v_FindDistance (const Array< OneD, const NekDouble > &xs, Array< OneD, NekDouble > &xi) override |
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 Geometry2D * | v_GetFace (int i) const |
Returns face i of this object. | |
| 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_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_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. | |
| void | SetUpCoeffs (const int nCoeffs) |
| Initialise the Geometry::m_coeffs array. | |
Protected Attributes | |
| std::array< PointGeom *, kNverts > | m_verts |
| std::array< SegGeom *, kNedges > | m_edges |
| std::array< StdRegions::Orientation, kNedges > | m_eorient |
Protected Attributes inherited from Nektar::SpatialDomains::Geometry2D | |
| 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. | |
| GeomFactorsSharedPtr | m_geomFactors |
| Geometric factors. | |
| GeomState | m_geomFactorsState |
| State of the geometric factors. | |
| 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. | |
| GeomType | m_geomType |
| Type of geometry. | |
| LibUtilities::ShapeType | m_shapeType |
| Type of shape. | |
| int | m_globalID |
| Global ID. | |
| Array< OneD, 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 () |
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. | |
Static Protected Attributes inherited from Nektar::SpatialDomains::Geometry | |
| static GeomFactorsVector | m_regGeomFactorsManager |
Definition at line 52 of file QuadGeom.h.
| Nektar::SpatialDomains::QuadGeom::QuadGeom | ( | ) |
Definition at line 54 of file QuadGeom.cpp.
References Nektar::LibUtilities::eQuadrilateral, and Nektar::SpatialDomains::Geometry::m_shapeType.
| Nektar::SpatialDomains::QuadGeom::QuadGeom | ( | const QuadGeom & | in | ) |
Definition at line 90 of file QuadGeom.cpp.
References kNedges, m_edges, m_eorient, Nektar::SpatialDomains::Geometry::m_globalID, Nektar::SpatialDomains::Geometry::m_shapeType, and m_verts.
| Nektar::SpatialDomains::QuadGeom::QuadGeom | ( | const int | id, |
| std::array< SegGeom *, kNverts > | edges, | ||
| const CurveSharedPtr | curve = CurveSharedPtr() |
||
| ) |
|
overridedefault |
|
static |
Get the orientation of face1.
Definition at line 222 of file QuadGeom.cpp.
References GetFaceOrientation(), and m_verts.
Referenced by Nektar::MultiRegions::DisContField::FindPeriodicTraces(), and GetFaceOrientation().
|
static |
Calculate the orientation of face2 to face1 (note this is not face1 to face2!).
Definition at line 236 of file QuadGeom.cpp.
References ASSERTL0, Nektar::SpatialDomains::PointGeom::dist(), Nektar::StdRegions::eDir1BwdDir1_Dir2BwdDir2, Nektar::StdRegions::eDir1BwdDir1_Dir2FwdDir2, Nektar::StdRegions::eDir1BwdDir2_Dir2BwdDir1, Nektar::StdRegions::eDir1BwdDir2_Dir2FwdDir1, Nektar::StdRegions::eDir1FwdDir1_Dir2BwdDir2, Nektar::StdRegions::eDir1FwdDir1_Dir2FwdDir2, Nektar::StdRegions::eDir1FwdDir2_Dir2BwdDir1, Nektar::StdRegions::eDir1FwdDir2_Dir2FwdDir1, Nektar::SpatialDomains::PointGeom::Rotate(), and tinysimd::sqrt().
|
protected |
Definition at line 551 of file QuadGeom.cpp.
References Nektar::LibUtilities::beta, Nektar::SpatialDomains::Geometry::m_isoParameter, Nektar::SpatialDomains::Geometry::m_straightEdge, and Vmath::Vcopy().
Referenced by v_GenGeomFactors().
|
private |
Definition at line 191 of file QuadGeom.cpp.
References Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eModified_A, Nektar::SpatialDomains::GetStdQuadFactory(), Nektar::SpatialDomains::Geometry::GetXmap(), m_edges, and Nektar::SpatialDomains::Geometry::m_xmap.
|
overrideprotectedvirtual |
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 105 of file QuadGeom.cpp.
References Nektar::SpatialDomains::Geometry::GetGlobalID(), Nektar::SpatialDomains::Geometry::GetXmap(), Nektar::SpatialDomains::Geometry::m_coordim, Nektar::SpatialDomains::Geometry2D::m_edgeNormal, m_edges, Nektar::SpatialDomains::Geometry2D::m_manifold, and m_verts.
|
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 476 of file QuadGeom.cpp.
References ASSERTL0, Nektar::SpatialDomains::ePtsFilled, Nektar::SpatialDomains::Geometry::GetXmap(), Nektar::LibUtilities::Interp2D(), kNedges, Nektar::SpatialDomains::Geometry::m_coeffs, Nektar::SpatialDomains::Geometry::m_coordim, Nektar::SpatialDomains::Geometry2D::m_curve, m_edges, m_eorient, Nektar::SpatialDomains::Geometry::m_globalID, Nektar::SpatialDomains::Geometry::m_state, Nektar::SpatialDomains::Geometry::m_xmap, and tinysimd::sqrt().
Referenced by v_GenGeomFactors().
|
overrideprotectedvirtual |
Set up GeoFac for this geometry using Coord quadrature distribution
Implements Nektar::SpatialDomains::Geometry.
Definition at line 347 of file QuadGeom.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::SpatialDomains::eDeformed, Nektar::SpatialDomains::ePtsFilled, Nektar::SpatialDomains::eRegular, Nektar::NekConstants::kNekZeroTol, 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, m_verts, Nektar::SpatialDomains::Geometry::m_xmap, Nektar::SpatialDomains::PointGeom::Mult(), PreSolveStraightEdge(), 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 211 of file QuadGeom.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 600 of file QuadGeom.cpp.
|
inlinefinalprotectedvirtual |
Returns edge i of this object.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 107 of file QuadGeom.h.
References m_edges.
|
inlinefinalprotectedvirtual |
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 112 of file QuadGeom.h.
References m_eorient.
|
inlinefinalprotectedvirtual |
Get the number of edges of this object.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 97 of file QuadGeom.h.
References kNedges.
|
inlinefinalprotectedvirtual |
Get the number of vertices of this object.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 92 of file QuadGeom.h.
References kNverts.
|
inlinefinalprotectedvirtual |
Returns vertex i of this object.
Reimplemented from Nektar::SpatialDomains::Geometry.
Definition at line 102 of file QuadGeom.h.
References m_verts.
|
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 605 of file QuadGeom.cpp.
References Nektar::SpatialDomains::Geometry2D::m_curve, 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 624 of file QuadGeom.cpp.
References m_edges, Nektar::SpatialDomains::Geometry::m_setupState, Nektar::SpatialDomains::Geometry::m_xmap, Nektar::SpatialDomains::Geometry::SetUpCoeffs(), and SetUpXmap().
Referenced by v_GenGeomFactors().
|
static |
Definition at line 55 of file QuadGeom.h.
Referenced by QuadGeom(), v_FillGeom(), and v_GetNumEdges().
|
static |
Definition at line 57 of file QuadGeom.h.
|
static |
Definition at line 56 of file QuadGeom.h.
Referenced by Nektar::SpatialDomains::HexGeom::SetUpFaceOrientation(), Nektar::SpatialDomains::PrismGeom::SetUpFaceOrientation(), and v_GetNumVerts().
Definition at line 118 of file QuadGeom.h.
Referenced by QuadGeom(), SetUpXmap(), v_AllLeftCheck(), v_FillGeom(), v_GetEdge(), v_Reset(), and v_Setup().
|
protected |
Definition at line 119 of file QuadGeom.h.
Referenced by QuadGeom(), v_FillGeom(), and v_GetEorient().
Definition at line 117 of file QuadGeom.h.
Referenced by GetFaceOrientation(), QuadGeom(), v_AllLeftCheck(), v_GenGeomFactors(), and v_GetVertex().
|
static |
Definition at line 76 of file QuadGeom.h.