|
Nektar++
|
Inverse mapping for a segment. More...
#include <GeometryLocator.h>
Public Member Functions | |
| GeometryLocator (Geometry *geom) | |
Public Member Functions inherited from Nektar::SpatialDomains::GeometryLocator | |
| GeometryLocator (Geometry *geom) | |
| virtual | ~GeometryLocator ()=default |
| void | Build () |
| Populate the cache. Called by Create() once the concrete type exists, since it dispatches virtually. | |
| Geometry * | GetGeometry () const |
| 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 the element contains a Cartesian coordinate. | |
| bool | ContainsPoint (const Array< OneD, const NekDouble > &gloCoord, Array< OneD, NekDouble > &locCoord, NekDouble tol) |
| Determine whether the element contains a Cartesian coordinate. | |
| bool | ContainsPoint (const Array< OneD, const NekDouble > &gloCoord, Array< OneD, NekDouble > &locCoord, NekDouble tol, NekDouble &dist) |
| NekDouble | GetLocCoords (const Array< OneD, const NekDouble > &coords, Array< OneD, NekDouble > &Lcoords) |
| Determine the local collapsed coordinates corresponding to a given Cartesian coordinate. | |
| NekDouble | FindDistance (const Array< OneD, const NekDouble > &xs, Array< OneD, NekDouble > &xi) |
| int | PreliminaryCheck (const Array< OneD, const NekDouble > &gloCoord, NekDouble &edgeDist) |
| 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. | |
Protected Member Functions | |
| NekDouble | v_GetLocCoords (const Array< OneD, const NekDouble > &coords, Array< OneD, NekDouble > &Lcoords) override |
| NekDouble | v_FindDistance (const Array< OneD, const NekDouble > &xs, Array< OneD, NekDouble > &xi) override |
Protected Member Functions inherited from Nektar::SpatialDomains::GeometryLocator | |
| virtual int | v_AllLeftCheck (const Array< OneD, const NekDouble > &gloCoord, NekDouble &edgeDist) |
| virtual void | v_CalculateInverseIsoParam () |
| virtual void | v_PreSolveStraightEdge () |
Additional Inherited Members | |
Static Public Member Functions inherited from Nektar::SpatialDomains::GeometryLocator | |
| static std::unique_ptr< GeometryLocator > | Create (Geometry *geom) |
Build the locator appropriate to geom's dimension, with its cache already populated. | |
| static bool | ClampLocCoords (Array< OneD, NekDouble > &locCoord, int dim, NekDouble tol=std::numeric_limits< NekDouble >::epsilon()) |
| Clamp local coordinates into the reference element \([-1-tol,1+tol]^{dim}\), returning whether anything was clamped. Depends only on the reference element, so it needs no locator. | |
Protected Attributes inherited from Nektar::SpatialDomains::GeometryLocator | |
| Geometry * | m_geom |
| The geometry being searched. Not owned. | |
| IsoParam | m_iso |
| The shape's isoparametric coefficients. The straight-edged 2D solve rewrites them into a factored form, so the locator keeps its own copy rather than sharing the geometry's. | |
| int | m_straightEdge = 0 |
| Non-zero if every \(\chi\) basis is linear. Bits 1 and 2 are used by the 2D straight-edged solve to record which axes were swapped. | |
| std::array< std::array< NekDouble, kMaxGeomDim >, kMaxGeomDim > | m_invIsoParam {} |
Inverse of the linear part of m_iso, for regular elements. | |
| bool | m_newtonConverged = false |
| Whether the Newton iteration of the last GetLocCoords call converged, i.e. whether its local coordinates map to the point. Set only by elements located by Newton iteration; read by ContainsPoint. | |
| bool | m_hasBoundingBox = false |
| Element bounding box as (xmin, ymin, zmin, xmax, ymax, zmax). | |
| std::array< NekDouble, 6 > | m_boundingBox {} |
| bool | m_edgeNormalBuilt = false |
2D only: inward edge normals used to reject points outside straight-sided elements. A curved edge gets no normal, so m_hasEdgeNormal records which entries are usable. | |
| std::array< bool, kMaxGeomVerts > | m_hasEdgeNormal {} |
| std::array< std::array< NekDouble, 2 >, kMaxGeomVerts > | m_edgeNormal {} |
Inverse mapping for a segment.
Definition at line 199 of file GeometryLocator.h.
|
explicit |
Definition at line 105 of file GeometryLocator.cpp.
|
overrideprotectedvirtual |
Reimplemented from Nektar::SpatialDomains::GeometryLocator.
Definition at line 514 of file GeometryLocator.cpp.
References Nektar::StdRegions::StdExpansion::BwdTrans(), Nektar::SpatialDomains::Geometry::CalcGeomType(), Nektar::SpatialDomains::GeometryLocator::ClampLocCoords(), Nektar::SpatialDomains::eDeformed, Nektar::ErrorUtil::efatal, Nektar::SpatialDomains::eRegular, Nektar::SpatialDomains::Geometry::GetCoeffs(), Nektar::SpatialDomains::Geometry::GetCoord(), Nektar::SpatialDomains::Geometry::GetCoordim(), Nektar::SpatialDomains::GeometryLocator::GetLocCoords(), Nektar::SpatialDomains::Geometry::GetShapeDim(), Nektar::StdRegions::StdExpansion::GetTotPoints(), Nektar::SpatialDomains::Geometry::GetXmap(), Nektar::NekConstants::kNewtonIterations, Nektar::SpatialDomains::GeometryLocator::m_geom, NEKERROR, Nektar::StdRegions::StdExpansion::PhysEvaluate(), and tinysimd::sqrt().
|
overrideprotectedvirtual |
Reimplemented from Nektar::SpatialDomains::GeometryLocator.
Definition at line 473 of file GeometryLocator.cpp.
References Nektar::StdRegions::StdExpansion::BwdTrans(), Nektar::SpatialDomains::Geometry::CalcGeomType(), Nektar::ErrorUtil::efatal, Nektar::SpatialDomains::eRegular, Nektar::SpatialDomains::Geometry::FillGeom(), Nektar::SpatialDomains::Geometry::GetCoeffs(), Nektar::SpatialDomains::Geometry::GetCoordim(), Nektar::StdRegions::StdExpansion::GetTotPoints(), Nektar::SpatialDomains::Geometry::GetXmap(), Nektar::SpatialDomains::GeometryLocator::m_geom, NEKERROR, and tinysimd::sqrt().