Nektar++
SegGeom.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////////////
2//
3// File: SegGeom.h
4//
5// For more information, please see: http://www.nektar.info/
6//
7// The MIT License
8//
9// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10// Department of Aeronautics, Imperial College London (UK), and Scientific
11// Computing and Imaging Institute, University of Utah (USA).
12//
13// Permission is hereby granted, free of charge, to any person obtaining a
14// copy of this software and associated documentation files (the "Software"),
15// to deal in the Software without restriction, including without limitation
16// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17// and/or sell copies of the Software, and to permit persons to whom the
18// Software is furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included
21// in all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29// DEALINGS IN THE SOFTWARE.
30//
31// Description: Segment geometry information
32//
33////////////////////////////////////////////////////////////////////////////////
34
35#ifndef NEKTAR_SPATIALDOMAINS_SEGGEOM_H
36#define NEKTAR_SPATIALDOMAINS_SEGGEOM_H
37
44
45namespace Nektar
46{
47
48namespace SpatialDomains
49{
50class SegGeom;
51typedef std::shared_ptr<SegGeom> SegGeomSharedPtr;
52typedef std::map<int, SegGeomSharedPtr> SegGeomMap;
53
54class SegGeom : public Geometry1D
55{
56public:
59 int id, const int coordim, const PointGeomSharedPtr vertex[],
60 const CurveSharedPtr curve = CurveSharedPtr());
61
63
65
67
69 const SegGeom &edge1, const SegGeom &edge2);
70
72 {
73 return m_curve;
74 }
75
76 SPATIAL_DOMAINS_EXPORT static const int kNverts = 2;
77
78protected:
81
82 virtual PointGeomSharedPtr v_GetVertex(const int i) const override;
84 virtual void v_GenGeomFactors() override;
85 virtual void v_FillGeom() override;
86 virtual void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces) override;
87 virtual void v_Setup() override;
88 virtual NekDouble v_GetCoord(
89 const int i, const Array<OneD, const NekDouble> &Lcoord) override;
90 virtual int v_GetNumVerts() const override;
92 Array<OneD, NekDouble> &xi) override;
93
94private:
95 /// Boolean indicating whether object owns the data
97
98 void SetUpXmap();
99};
100} // namespace SpatialDomains
101} // namespace Nektar
102
103#endif // NEKTAR_SPATIALDOMAINS_SEGGEOM_H
#define SPATIAL_DOMAINS_EXPORT
1D geometry information
Definition: Geometry1D.h:55
virtual void v_Setup() override
Definition: SegGeom.cpp:325
virtual PointGeomSharedPtr v_GetVertex(const int i) const override
Definition: SegGeom.cpp:335
virtual int v_GetNumVerts() const override
Get the number of vertices of this object.
Definition: SegGeom.cpp:347
virtual LibUtilities::ShapeType v_GetShapeType() const
Definition: SegGeom.cpp:165
StdRegions::Orientation m_porient[kNverts]
Definition: SegGeom.h:80
virtual void v_FillGeom() override
Populate the coordinate mapping Geometry::m_coeffs information from any children geometry elements.
Definition: SegGeom.cpp:243
CurveSharedPtr GetCurve()
Definition: SegGeom.h:71
SegGeomSharedPtr GenerateOneSpaceDimGeom(void)
Generate a one dimensional space segment geometry where the vert[0] has the same x value and vert[1] ...
Definition: SegGeom.cpp:107
CurveSharedPtr m_curve
Boolean indicating whether object owns the data.
Definition: SegGeom.h:96
virtual void v_GenGeomFactors() override
Definition: SegGeom.cpp:220
SpatialDomains::PointGeomSharedPtr m_verts[kNverts]
Definition: SegGeom.h:79
static StdRegions::Orientation GetEdgeOrientation(const SegGeom &edge1, const SegGeom &edge2)
Get the orientation of edge1.
Definition: SegGeom.cpp:196
virtual NekDouble v_FindDistance(const Array< OneD, const NekDouble > &xs, Array< OneD, NekDouble > &xi) override
Definition: SegGeom.cpp:352
static const int kNverts
Definition: SegGeom.h:76
virtual NekDouble v_GetCoord(const int i, const Array< OneD, const NekDouble > &Lcoord) override
Given local collapsed coordinate Lcoord, return the value of physical coordinate in direction i.
Definition: SegGeom.cpp:170
virtual void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces) override
Reset this geometry object: unset the current state, zero Geometry::m_coeffs and remove allocated Geo...
Definition: SegGeom.cpp:311
std::map< int, SegGeomSharedPtr > SegGeomMap
Definition: SegGeom.h:52
std::shared_ptr< Curve > CurveSharedPtr
Definition: Curve.hpp:60
std::unordered_map< int, CurveSharedPtr > CurveMap
Definition: Curve.hpp:61
std::shared_ptr< SegGeom > SegGeomSharedPtr
Definition: Geometry2D.h:62
std::shared_ptr< PointGeom > PointGeomSharedPtr
Definition: Geometry.h:60
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:2
double NekDouble