Nektar++
PrismGeom.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // File: PrismGeom.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: Prismatic geometry definition.
32 //
33 ////////////////////////////////////////////////////////////////////////////////
34 
35 #ifndef NEKTAR_SPATIALDOMAINS_PRISMGEOM_H
36 #define NEKTAR_SPATIALDOMAINS_PRISMGEOM_H
37 
40 #include <SpatialDomains/TriGeom.h>
41 
42 namespace Nektar
43 {
44 namespace SpatialDomains
45 {
46 
47 class PrismGeom : public Geometry3D
48 {
49 public:
53 
54  SPATIAL_DOMAINS_EXPORT static const int kNverts = 6;
55  SPATIAL_DOMAINS_EXPORT static const int kNedges = 9;
56  SPATIAL_DOMAINS_EXPORT static const int kNqfaces = 3;
57  SPATIAL_DOMAINS_EXPORT static const int kNtfaces = 2;
58  SPATIAL_DOMAINS_EXPORT static const int kNfaces = kNqfaces + kNtfaces;
59  SPATIAL_DOMAINS_EXPORT static const std::string XMLElementType;
60 
61 protected:
62  virtual void v_GenGeomFactors();
64  Array<OneD, NekDouble> &Lcoords);
65  virtual bool v_ContainsPoint(const Array<OneD, const NekDouble> &gloCoord,
66  Array<OneD, NekDouble> &locCoord,
67  NekDouble tol,
68  NekDouble &resid);
69  virtual int v_GetVertexEdgeMap(const int i, const int j) const;
70  virtual int v_GetVertexFaceMap(const int i, const int j) const;
71  virtual int v_GetEdgeFaceMap(const int i, const int j) const;
72  virtual int v_GetDir(const int faceidx, const int facedir) const;
73  virtual void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces);
74  virtual void v_Setup();
75 
76 private:
77  void SetUpLocalEdges();
78  void SetUpLocalVertices();
79  void SetUpEdgeOrientation();
80  void SetUpFaceOrientation();
81  void SetUpXmap();
82 
83  static const unsigned int VertexEdgeConnectivity[6][3];
84  static const unsigned int VertexFaceConnectivity[6][3];
85  static const unsigned int EdgeFaceConnectivity[9][2];
86 };
87 
88 typedef std::shared_ptr<PrismGeom> PrismGeomSharedPtr;
89 typedef std::map<int, PrismGeomSharedPtr> PrismGeomMap;
90 }
91 }
92 
93 #endif // NEKTAR_SPATIALDOMAINS_PRISMGEOM_H
std::shared_ptr< Geometry2D > Geometry2DSharedPtr
Definition: Geometry.h:65
std::unordered_map< int, CurveSharedPtr > CurveMap
Definition: Curve.hpp:62
virtual bool v_ContainsPoint(const Array< OneD, const NekDouble > &gloCoord, Array< OneD, NekDouble > &locCoord, NekDouble tol, NekDouble &resid)
Definition: PrismGeom.cpp:101
void SetUpXmap()
Set up the m_xmap object by determining the order of each direction from derived faces.
Definition: PrismGeom.cpp:839
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...
Definition: PrismGeom.cpp:193
std::map< int, PrismGeomSharedPtr > PrismGeomMap
Definition: PrismGeom.h:89
static const unsigned int VertexFaceConnectivity[6][3]
Definition: PrismGeom.h:84
virtual int v_GetDir(const int faceidx, const int facedir) const
Definition: PrismGeom.cpp:85
virtual void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces)
Reset this geometry object: unset the current state, zero Geometry::m_coeffs and remove allocated Geo...
Definition: PrismGeom.cpp:811
static const unsigned int EdgeFaceConnectivity[9][2]
Definition: PrismGeom.h:85
double NekDouble
virtual int v_GetVertexFaceMap(const int i, const int j) const
Returns the standard element face IDs that are connected to a given vertex.
Definition: PrismGeom.cpp:289
virtual int v_GetVertexEdgeMap(const int i, const int j) const
Returns the standard element edge IDs that are connected to a given vertex.
Definition: PrismGeom.cpp:284
3D geometry information
Definition: Geometry3D.h:67
static const unsigned int VertexEdgeConnectivity[6][3]
Definition: PrismGeom.h:83
std::shared_ptr< PrismGeom > PrismGeomSharedPtr
Definition: PrismGeom.h:88
static const std::string XMLElementType
Definition: PrismGeom.h:59
virtual int v_GetEdgeFaceMap(const int i, const int j) const
Returns the standard element edge IDs that are connected to a given face.
Definition: PrismGeom.cpp:294
#define SPATIAL_DOMAINS_EXPORT