52 m_setupState(false), m_shapeType(LibUtilities::
eNoShapeType),
53 m_globalID(-1), m_straightEdge(0)
62 m_setupState(false), m_shapeType(LibUtilities::
eNoShapeType),
63 m_globalID(-1), m_straightEdge(0)
96 if (geomFactor->GetGtype() ==
eRegular)
102 if (**iter == *geomFactor)
113 returnval = geomFactor;
121 const std::shared_ptr<Geometry> &rhs)
123 return lhs->GetGlobalID() < rhs->GetGlobalID();
127 const std::shared_ptr<Geometry> &rhs)
129 return lhs->GetGlobalID() == rhs->GetGlobalID();
145 return GetEdge(i)->GetGlobalID();
153 return GetFace(i)->GetGlobalID();
162 "This function is only valid for shape type geometries");
172 "This function is only valid for shape type geometries");
182 "This function is only valid for shape type geometries");
190 [[maybe_unused]]
const int i)
const
193 "This function is not valid for this geometry.");
201 [[maybe_unused]]
const int i)
const
204 "This function is not valid for this geometry.");
230 "This function is only valid for shape type geometries");
243 "This function is only valid for shape type geometries");
267 dist = std::numeric_limits<double>::max();
279 m_xmap->LocCoordToLocCollapsed(locCoord, eta);
284 dist = std::numeric_limits<double>::max();
300 "This function has not been defined for this geometry");
308 [[maybe_unused]]
const int j)
const
311 "This function has not been defined for this geometry");
319 [[maybe_unused]]
const int j)
const
322 "This function has not been defined for this geometry");
330 [[maybe_unused]]
const int j)
const
333 "This function has not been defined for this geometry");
341 [[maybe_unused]]
const int j)
const
344 "This function has not been defined for this geometry");
352 [[maybe_unused]]
const int j)
const
355 "This function has not been defined for this geometry");
363 [[maybe_unused]]
const int i,
367 "This function is only valid for expansion type geometries");
379 "This function is only valid for expansion type geometries");
389 "This function is only valid for expansion type geometries");
396 [[maybe_unused]]
CurveMap &curvedFaces)
410 "This function is only valid for expansion type geometries");
435 p->GetCoords(x[0], x[1], x[2]);
436 for (
int j = 0; j < 3; ++j)
444 p->GetCoords(x[0], x[1], x[2]);
445 for (
int j = 0; j < 3; ++j)
447 min[j] = (x[j] < min[j] ? x[j] : min[j]);
448 max[j] = (x[j] > max[j] ? x[j] : max[j]);
456 const int nq =
GetXmap()->GetTotPoints();
458 for (
int j = 0; j < 3; ++j)
466 for (
int j = 0; j < 3; ++j)
468 for (
int i = 0; i < nq; ++i)
470 min[j] = (xvec[j][i] < min[j] ? xvec[j][i] : min[j]);
471 max[j] = (xvec[j][i] > max[j] ? xvec[j][i] : max[j]);
477 for (
int j = 0; j < 3; ++j)
487 for (
int j = 0; j < 3; ++j)
493 return {{min[0], min[1], min[2], max[0], max[1], max[2]}};
542 "Expects number of global coordinates supplied to be greater than "
543 "or equal to the mesh dimension.");
548 if ((gloCoord[i] < minMax[i]) || (gloCoord[i] > minMax[i + 3]))
565 "Expects local coordinates to be same or "
566 "larger than shape dimension.");
575 if (!std::isfinite(locCoord[i]))
580 else if (locCoord[i] < -(1. + tol))
582 locCoord[i] = -(1. + tol);
585 else if (locCoord[i] > (1. + tol))
587 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....
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.
PointGeomSharedPtr GetVertex(int i) const
Returns vertex i of this object.
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.
Geometry1DSharedPtr GetEdge(int i) const
Returns edge i of this object.
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 Geometry2DSharedPtr v_GetFace(int i) const
Returns face i of this object.
int GetVid(int i) const
Get the ID of vertex i 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 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 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.
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.
Array< OneD, Array< OneD, NekDouble > > m_coeffs
Array containing expansion coefficients of m_xmap.
virtual ~Geometry()
Default destructor.
GeomState m_geomFactorsState
State of the geometric factors.
GeomFactorsSharedPtr GetMetricInfo()
Get the geometric factors for this object.
StdRegions::StdExpansionSharedPtr m_xmap
mapping containing isoparametric transformation.
virtual Geometry1DSharedPtr v_GetEdge(int i) const
Returns edge 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.
StdRegions::StdExpansionSharedPtr GetXmap() const
Return the mapping object Geometry::m_xmap that represents the coordinate transformation from standar...
static GeomFactorsVector m_regGeomFactorsManager
std::array< NekDouble, 6 > GetBoundingBox()
Generates the bounding box for the element.
int GetNumVerts() const
Get the number of vertices of this object.
Geometry2DSharedPtr 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 int v_GetVertexEdgeMap(int i, int j) const
Returns the standard element edge IDs that are connected to a given vertex.
virtual NekDouble v_FindDistance(const Array< OneD, const NekDouble > &xs, Array< OneD, NekDouble > &xi)
GeomFactorsSharedPtr GetGeomFactors()
Get the geometric factors for this object, generating them if required.
static GeomFactorsSharedPtr ValidateRegGeomFactor(GeomFactorsSharedPtr geomFactor)
Check to see if a geometric factor has already been created that contains the same regular informatio...
virtual int v_GetNumVerts() const
Get the number of vertices of this object.
GeomFactorsSharedPtr m_geomFactors
Geometric factors.
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 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.
static const NekDouble kGeomFactorsTol
static const NekDouble kFindDistanceMin
std::vector< GeomFactorsSharedPtr > GeomFactorsVector
A vector of GeomFactor pointers.
bool GlobalIdEquality(const std::shared_ptr< Geometry > &lhs, const std::shared_ptr< Geometry > &rhs)
std::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
bool SortByGlobalId(const std::shared_ptr< Geometry > &lhs, const std::shared_ptr< Geometry > &rhs)
Less than operator to sort Geometry objects by global id when sorting STL containers.
std::unordered_map< int, CurveSharedPtr > CurveMap
@ eRegular
Geometry is straight-sided with constant geometric factors.
std::shared_ptr< PointGeom > PointGeomSharedPtr
std::shared_ptr< Geometry2D > Geometry2DSharedPtr
@ eNotFilled
Geometric information has not been generated.
std::shared_ptr< Geometry1D > Geometry1DSharedPtr
std::shared_ptr< StdExpansion > StdExpansionSharedPtr