45 namespace SpatialDomains
90 int npts =
m_curve->m_points.size();
119 returnval->m_coordim = 1;
123 vert0->SetGlobalID(vert0->GetGlobalID());
124 returnval->m_verts[0] = vert0;
130 v.push_back(base[0]->GetPointsKey());
136 if (jac.num_elements() == 1)
145 for (
int i = 0; i < jac.num_elements(); ++i)
147 len += jac[i] * w0[i];
153 vert1->SetGlobalID(vert1->GetGlobalID());
155 returnval->m_verts[1] = vert1;
158 returnval->m_xmap =
m_xmap;
159 returnval->SetUpCoeffs(
m_xmap->GetNcoeffs());
182 return m_xmap->PhysEvaluate(Lcoord, tmp);
215 std::ostringstream errstrm;
216 errstrm <<
"Connected edges do not share a vertex. Edges ";
236 if (
m_xmap->GetBasisNumModes(0) != 2)
255 int npts =
m_curve->m_points.size();
264 "Vertex 0 is separated from first point by more than ";
265 std::stringstream strstrm;
268 err += strstrm.str();
276 "Vertex 1 is separated from last point by more than ";
277 std::stringstream strstrm;
280 err += strstrm.str();
292 for (
int j = 0; j < npts; ++j)
294 tmp[j] = (
m_curve->m_points[j]->GetPtr())[i];
318 CurveMap::iterator it = curvedEdges.find(
m_globalID);
320 if (it != curvedEdges.end())
352 const int npts =
m_xmap->GetTotPoints();
358 len += (pts[npts - 1] - pts[0]) * (pts[npts - 1] - pts[0]);
359 xi += (coords[i] - pts[0]) * (pts[npts-1] - pts[0]);
362 Lcoords[0] = 2 * xi / len - 1.0;
367 "inverse mapping must be set up to use this call");
389 if (stdCoord[0] >= -(1 + tol) && stdCoord[0] <= 1 + tol)
StdRegions::StdExpansionSharedPtr m_xmap
mapping containing isoparametric transformation.
#define ASSERTL0(condition, msg)
virtual PointGeomSharedPtr v_GetVertex(const int i) const
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
std::vector< PointsKey > PointsKeyVector
GeomFactorsSharedPtr m_geomFactors
Geometric factors.
std::unordered_map< int, CurveSharedPtr > CurveMap
bool MinMaxCheck(const Array< OneD, const NekDouble > &gloCoord)
Check if given global coord is within twice the min/max distance of the element.
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...
Principle Modified Functions .
virtual void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces)
Reset this geometry object: unset the current state, zero Geometry::m_coeffs and remove allocated Geo...
void ClampLocCoords(Array< OneD, NekDouble > &locCoord, NekDouble tol)
Clamp local coords to be within standard regions [-1, 1]^dim.
std::shared_ptr< DNekMat > DNekMatSharedPtr
static const NekDouble kVertexTheSameDouble
GeomState m_geomFactorsState
State of the geometric factors.
static StdRegions::Orientation GetEdgeOrientation(const SegGeom &edge1, const SegGeom &edge2)
Get the orientation of edge1.
int GetGlobalID(void) const
Get the ID of this object.
virtual int v_GetNumVerts() const
Get the number of vertices of this object.
SegGeomSharedPtr GenerateOneSpaceDimGeom(void)
Generate a one dimensional space segment geometry where the vert[0] has the same x value and vert[1] ...
virtual void v_GenGeomFactors()
Geometric information has not been generated.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
PointsManagerT & PointsManager(void)
Defines a specification for a set of points.
std::shared_ptr< PointGeom > PointGeomSharedPtr
bool m_setupState
Wether or not the setup routines have been run.
SpatialDomains::PointGeomSharedPtr m_verts[kNverts]
virtual bool v_ContainsPoint(const Array< OneD, const NekDouble > &gloCoord, Array< OneD, NekDouble > &locCoord, NekDouble tol, NekDouble &resid)
virtual LibUtilities::ShapeType v_GetShapeType() const
Array< OneD, Array< OneD, NekDouble > > m_coeffs
Array containing expansion coefficients of m_xmap.
CurveSharedPtr m_curve
Boolean indicating whether object owns the data.
Geometry is straight-sided with constant geometric factors.
std::shared_ptr< Curve > CurveSharedPtr
virtual int v_GetNumEdges() const
Get the number of edges of this object.
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...
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...
LibUtilities::ShapeType m_shapeType
Type of shape.
virtual void v_FillGeom()
Populate the coordinate mapping Geometry::m_coeffs information from any children geometry elements...
virtual void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces)
Reset this geometry object: unset the current state, zero Geometry::m_coeffs and remove allocated Geo...
Geometric information has been generated.
void SetUpCoeffs(const int nCoeffs)
Initialise the Geometry::m_coeffs array.
GeomFactorsSharedPtr GetMetricInfo()
Get the geometric factors for this object.
GeomType
Indicates the type of element geometry.
GeomState m_state
Enumeration to dictate whether coefficients are filled.
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
std::shared_ptr< SegGeom > SegGeomSharedPtr
Geometry is curved or has non-constant factors.
PointGeomSharedPtr GetVertex(int i) const
Returns vertex i of this object.
int m_coordim
Coordinate dimension of this geometry object.
Describes the specification for a Basis.
Array< OneD, DataType > & GetPtr()
1D Gauss-Lobatto-Legendre quadrature points