37 #ifndef NEKTAR_SPATIALDOMAINS_GEOMETRY_H
38 #define NEKTAR_SPATIALDOMAINS_GEOMETRY_H
43 #include <boost/unordered_set.hpp>
44 #include <boost/unordered_map.hpp>
45 #include <boost/functional/hash.hpp>
46 #include <boost/shared_ptr.hpp>
51 namespace SpatialDomains
56 typedef boost::unordered_set< GeometrySharedPtr >
GeometrySet;
65 typedef boost::unordered_map<int, CurveSharedPtr>
CurveMap;
70 const boost::shared_ptr<Geometry>& rhs);
73 const boost::shared_ptr<Geometry>& rhs);
159 CurveMap &curvedEdges,
160 CurveMap &curvedFaces);
204 virtual PointGeomSharedPtr
v_GetVertex(
int i)
const = 0;
246 CurveMap &curvedEdges,
247 CurveMap &curvedFaces);
252 struct GeometryHash : std::unary_function<GeometrySharedPtr, std::size_t>
258 int nVert = p->GetNumVerts();
259 std::vector<unsigned int> ids(nVert);
261 for (i = 0; i < nVert; ++i)
263 ids[i] = p->GetVid(i);
265 std::sort(ids.begin(), ids.end());
266 boost::hash_range(seed, ids.begin(), ids.end());
496 return m_xmap->GetPointsKeys();
500 CurveMap &curvedFaces)
502 v_Reset(curvedEdges, curvedFaces);
507 #endif //NEKTAR_SPATIALDOMAINS_GEOMETRY_H
StdRegions::StdExpansionSharedPtr m_xmap
virtual StdRegions::Orientation v_GetPorient(const int i) const
StdRegions::Orientation GetPorient(const int i) const
const LibUtilities::PointsKeyVector GetPointsKeys()
GeomFactorsSharedPtr GetRefGeomFactors(const Array< OneD, const LibUtilities::BasisSharedPtr > &tbasis)
const Array< OneD, const NekDouble > & GetCoeffs(const int i) const
virtual void v_SetOwnData()
virtual PointGeomSharedPtr v_GetVertex(int i) const =0
std::vector< PointsKey > PointsKeyVector
void SetGlobalID(int globalid)
Base class for shape geometry information.
virtual bool v_ContainsPoint(const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0)
std::size_t operator()(GeometrySharedPtr const &p) const
GeomFactorsSharedPtr m_geomFactors
StdRegions::Orientation GetForient(const int i) const
virtual bool v_IsElmtConnected(int gvo_id, int locid) const
StdRegions::Orientation GetEorient(const int i) const
virtual int v_GetNumFaces() const
static GeomFactorsSharedPtr ValidateRegGeomFactor(GeomFactorsSharedPtr geomFactor)
virtual NekDouble v_GetLocCoords(const Array< OneD, const NekDouble > &coords, Array< OneD, NekDouble > &Lcoords)
GeomFactorsSharedPtr GetGeomFactors()
virtual void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces)
Reset this geometry object: unset the current state and remove allocated GeomFactors.
virtual int v_GetFid(int i) const
virtual int v_NumElmtConnected() const
static GeomFactorsVector m_regGeomFactorsManager
void Reset(CurveMap &curvedEdges, CurveMap &curvedFaces)
StdRegions::StdExpansionSharedPtr GetXmap() const
bool IsElmtConnected(int gvo_id, int locid) const
GeomState m_geomFactorsState
virtual int v_GetVid(int i) const
bool SortByGlobalId(const boost::shared_ptr< Geometry > &lhs, const boost::shared_ptr< Geometry > &rhs)
Less than operator to sort Geometry objects by global id when sorting STL containers.
virtual StdRegions::StdExpansionSharedPtr v_GetXmap() const
boost::shared_ptr< Curve > CurveSharedPtr
int NumElmtConnected() const
int GetEdgeFaceMap(int i, int j) const
const LibUtilities::BasisSharedPtr GetBasis(const int i)
Return the j-th basis of the i-th co-ordinate dimension.
std::vector< GeometrySharedPtr >::iterator GeometryVectorIter
virtual void v_GenGeomFactors()=0
virtual StdRegions::Orientation v_GetEorient(const int i) const
virtual int v_GetEdgeFaceMap(int i, int j) const
int GetVertexEdgeMap(int i, int j) const
bool GlobalIdEquality(const boost::shared_ptr< Geometry > &lhs, const boost::shared_ptr< Geometry > &rhs)
std::vector< GeomFactorsSharedPtr > GeomFactorsVector
A vector of GeomFactor pointers.
bool ContainsPoint(const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0)
GeomState
Indicates if the geometric information for an element has been populated.
void FillGeom()
Put all quadrature information into face/edge structure and backward transform.
virtual void v_AddElmtConnected(int gvo_id, int locid)
virtual int v_GetVertexFaceMap(int i, int j) const
PointGeomSharedPtr GetVertex(int i) const
virtual int v_GetShapeDim() const
std::vector< GeometrySharedPtr > GeometryVector
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
int GetVertexFaceMap(int i, int j) const
return the id of the face attached to the vertex
boost::shared_ptr< GeometryVector > GeometryVectorSharedPtr
virtual StdRegions::Orientation v_GetForient(const int i) const
boost::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
Array< OneD, Array< OneD, NekDouble > > m_coeffs
NekDouble GetLocCoords(const Array< OneD, const NekDouble > &coords, Array< OneD, NekDouble > &Lcoords)
LibUtilities::ShapeType m_shapeType
void AddElmtConnected(int gvo_id, int locid)
boost::unordered_map< int, CurveSharedPtr > CurveMap
void SetUpCoeffs(const int nCoeffs)
Initialise the m_coeffs array.
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...
virtual int v_GetVertexEdgeMap(int i, int j) const
virtual int v_GetNumEdges() const
GeomFactorsSharedPtr GetMetricInfo()
GeomType
Indicates the type of element geometry.
boost::shared_ptr< Basis > BasisSharedPtr
boost::unordered_set< GeometrySharedPtr > GeometrySet
GeomState m_state
enum identifier to determine if quad points are filled
virtual NekDouble v_GetCoord(const int i, const Array< OneD, const NekDouble > &Lcoord)
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
virtual void v_FillGeom()
virtual int v_GetNumVerts() const
int m_coordim
coordinate dimension
boost::shared_ptr< Geometry > GeometrySharedPtr
virtual const LibUtilities::BasisSharedPtr v_GetBasis(const int i)
LibUtilities::ShapeType GetShapeType(void)
boost::shared_ptr< PointGeom > PointGeomSharedPtr
virtual int v_GetEid(int i) const
#define SPATIAL_DOMAINS_EXPORT
void SetCoordim(int coordim)
virtual int v_GetCoordim() const