48 : m_coordim(0), m_state(
eNotFilled), m_setupState(false),
49 m_shapeType(LibUtilities::
eNoShapeType), m_globalID(-1), m_straightEdge(0)
57 : m_coordim(coordim), m_state(
eNotFilled), m_setupState(false),
58 m_shapeType(LibUtilities::
eNoShapeType), m_globalID(-1), m_straightEdge(0)
102 "This function is only valid for shape type geometries");
112 "This function is only valid for shape type geometries");
122 "This function is only valid for shape type geometries");
132 "This function is only valid for shape type geometries");
140 [[maybe_unused]]
const int i)
const
143 "This function is not valid for this geometry.");
151 [[maybe_unused]]
const int i)
const
154 "This function is not valid for this geometry.");
180 "This function is only valid for shape type geometries");
190 "This function is only valid for shape type geometries");
201 "This function is only valid for shape type geometries");
214 "This function is only valid for shape type geometries");
238 dist = std::numeric_limits<double>::max();
250 m_xmap->LocCoordToLocCollapsed(locCoord, eta);
255 dist = std::numeric_limits<double>::max();
271 "This function has not been defined for this geometry");
279 [[maybe_unused]]
const int j)
const
282 "This function has not been defined for this geometry");
290 [[maybe_unused]]
const int j)
const
293 "This function has not been defined for this geometry");
301 [[maybe_unused]]
const int j)
const
304 "This function has not been defined for this geometry");
312 [[maybe_unused]]
const int j)
const
315 "This function has not been defined for this geometry");
323 [[maybe_unused]]
const int j)
const
326 "This function has not been defined for this geometry");
334 [[maybe_unused]]
const int i,
338 "This function is only valid for expansion type geometries");
350 "This function is only valid for expansion type geometries");
360 "This function is only valid for expansion type geometries");
367 [[maybe_unused]]
CurveMap &curvedFaces)
376 "This function is only valid for expansion type geometries");
401 p->GetCoords(x[0], x[1], x[2]);
402 for (
int j = 0; j < 3; ++j)
410 p->GetCoords(x[0], x[1], x[2]);
411 for (
int j = 0; j < 3; ++j)
413 min[j] = (x[j] <
min[j] ? x[j] :
min[j]);
414 max[j] = (x[j] >
max[j] ? x[j] :
max[j]);
422 const int nq =
GetXmap()->GetTotPoints();
424 for (
int j = 0; j < 3; ++j)
432 for (
int j = 0; j < 3; ++j)
434 for (
int i = 0; i < nq; ++i)
436 min[j] = (xvec[j][i] <
min[j] ? xvec[j][i] :
min[j]);
437 max[j] = (xvec[j][i] >
max[j] ? xvec[j][i] :
max[j]);
443 for (
int j = 0; j < 3; ++j)
453 for (
int j = 0; j < 3; ++j)
506 "Expects number of global coordinates supplied to be greater than "
507 "or equal to the mesh dimension.");
512 if ((gloCoord[i] < minMax[i]) || (gloCoord[i] > minMax[i + 3]))
529 "Expects local coordinates to be same or "
530 "larger than shape dimension.");
539 if (!std::isfinite(locCoord[i]))
544 else if (locCoord[i] < -(1. + tol))
546 locCoord[i] = -(1. + tol);
549 else if (locCoord[i] > (1. + tol))
551 locCoord[i] = 1. + tol;
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Base class for shape geometry information.
virtual int v_GetNumEdges() const
Get the number of edges 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 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.
Array< OneD, NekDouble > m_boundingBox
Array containing bounding box.
GeomState m_state
Enumeration to dictate whether coefficients are filled.
virtual void v_CalculateInverseIsoParam()
virtual int v_AllLeftCheck(const Array< OneD, const NekDouble > &gloCoord)
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 ge...
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 element...
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.
int GetShapeDim() const
Get the object's shape dimension.
virtual void v_FillGeom()
Populate the coordinate mapping Geometry::m_coeffs information from any children geometry elements.
Geometry()
Default constructor.
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 ge...
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 standar...
virtual void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces)
Reset this geometry object: unset the current state, zero Geometry::m_coeffs and remove allocated Geo...
bool ClampLocCoords(Array< OneD, NekDouble > &locCoord, NekDouble tol=std::numeric_limits< NekDouble >::epsilon())
Clamp local coords to be within standard regions [-1, 1]^dim.
int GetGlobalID(void) const
Get the ID of this object.
PointGeom * GetVertex(int i) const
Returns vertex i of this object.
int GetCoordim() const
Return the coordinate dimension of this object (i.e. the dimension of the space in which this object ...
int GetFid(int i) const
Get the ID of face i of this object.
std::vector< Array< OneD, NekDouble > > m_coeffs
Array containing expansion coefficients of m_xmap.
virtual int v_GetEdgeFaceMap(int i, int j) const
Returns the standard element edge IDs that are connected to a given face.
LibUtilities::ShapeType m_shapeType
Type of shape.
StdRegions::StdExpansionSharedPtr m_xmap
mapping containing isoparametric transformation.
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.
StdRegions::StdExpansionSharedPtr GetXmap() const
Return the mapping object Geometry::m_xmap that represents the coordinate transformation from standar...
virtual PointGeom * v_GetVertex(const int i) const
Returns vertex i of this object.
std::array< NekDouble, 6 > GetBoundingBox()
Generates the bounding box for the element.
int GetNumVerts() const
Get the number of vertices 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.
bool MinMaxCheck(const Array< OneD, const NekDouble > &gloCoord)
Check if given global coord is within the BoundingBox of the element.
virtual GeomType v_CalcGeomType()
virtual int v_GetVertexEdgeMap(int i, int j) const
Returns the standard element edge IDs that are connected to a given vertex.
virtual Geometry1D * v_GetEdge(const int i) const
Returns edge i of this object.
virtual NekDouble v_FindDistance(const Array< OneD, const NekDouble > &xs, Array< OneD, NekDouble > &xi)
virtual int v_GetNumVerts() const
Get the number of vertices of this object.
int m_coordim
Coordinate dimension of this geometry object.
virtual int v_GetDir(const int faceidx, const int facedir) const
Returns the element coordinate direction corresponding to a given face coordinate direction.
virtual Geometry2D * v_GetFace(const int i) const
Returns face i of this object.
virtual int v_GetVid(int i) const
Get the ID of vertex i of this object.
virtual int v_GetShapeDim() const
Get the object's shape dimension.
virtual int v_GetVertexFaceMap(int i, int j) const
Returns the standard element face IDs that are connected to a given vertex.
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 .
int GetEid(int i) const
Get the ID of edge i of this object.
virtual GeomFactorsUniquePtr v_GenGeomFactors(LibUtilities::PointsKeyVector &keyTgt)
Used by Expansion to generate associated GeomFactors.
std::vector< PointsKey > PointsKeyVector
static const NekDouble kGeomFactorsTol
static const NekDouble kFindDistanceMin
bool GlobalIdEquality(const Geometry *&lhs, const Geometry *&rhs)
bool SortByGlobalId(const Geometry *&lhs, const Geometry *&rhs)
Less than operator to sort Geometry objects by global id when sorting STL containers.
unique_ptr_objpool< GeomFactors > GeomFactorsUniquePtr
std::map< int, CurveUniquePtr > CurveMap
GeomType
Indicates the type of element geometry.
@ eRegular
Geometry is straight-sided with constant geometric factors.
@ eNoGeomType
No type defined.
@ eNotFilled
Geometric information has not been generated.
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
scalarT< T > max(scalarT< T > lhs, scalarT< T > rhs)
scalarT< T > min(scalarT< T > lhs, scalarT< T > rhs)