Nektar++
TetGeom.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////////////
2//
3// File: TetGeom.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: Tetrahedral geometry information.
32//
33////////////////////////////////////////////////////////////////////////////////
34
35#ifndef NEKTAR_SPATIALDOMAINS_TETGEOM
36#define NEKTAR_SPATIALDOMAINS_TETGEOM
37
41
43{
44
45class TetGeom : public Geometry3D
46{
47public:
49 SPATIAL_DOMAINS_EXPORT TetGeom(int id, const TriGeomSharedPtr faces[]);
51
52 SPATIAL_DOMAINS_EXPORT static const int kNverts = 4;
53 SPATIAL_DOMAINS_EXPORT static const int kNedges = 6;
54 SPATIAL_DOMAINS_EXPORT static const int kNqfaces = 0;
55 SPATIAL_DOMAINS_EXPORT static const int kNtfaces = 4;
57 SPATIAL_DOMAINS_EXPORT static const std::string XMLElementType;
58
59protected:
60 int v_GetVertexEdgeMap(const int i, const int j) const override;
61 int v_GetVertexFaceMap(const int i, const int j) const override;
62 int v_GetEdgeFaceMap(const int i, const int j) const override;
63 int v_GetEdgeNormalToFaceVert(const int i, const int j) const override;
64 int v_GetDir(const int faceidx, const int facedir) const override;
65 void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces) override;
66 void v_Setup() override;
67 void v_GenGeomFactors() override;
68
69private:
70 void SetUpLocalEdges();
71 void SetUpLocalVertices();
74 void SetUpXmap();
75
76 static const unsigned int VertexEdgeConnectivity[4][3];
77 static const unsigned int VertexFaceConnectivity[4][3];
78 static const unsigned int EdgeFaceConnectivity[6][2];
79 static const unsigned int EdgeNormalToFaceVert[4][3];
80};
81
82typedef std::shared_ptr<TetGeom> TetGeomSharedPtr;
83typedef std::vector<TetGeomSharedPtr> TetGeomVector;
84typedef std::map<int, TetGeomSharedPtr> TetGeomMap;
85
86} // namespace Nektar::SpatialDomains
87
88#endif // NEKTAR_SPATIALDOMAINS_TETGEOM
#define SPATIAL_DOMAINS_EXPORT
3D geometry information
Definition: Geometry3D.h:65
int v_GetEdgeFaceMap(const int i, const int j) const override
Returns the standard element edge IDs that are connected to a given face.
Definition: TetGeom.cpp:108
static const int kNverts
Definition: TetGeom.h:52
int v_GetVertexFaceMap(const int i, const int j) const override
Returns the standard element face IDs that are connected to a given vertex.
Definition: TetGeom.cpp:103
int v_GetVertexEdgeMap(const int i, const int j) const override
Returns the standard element edge IDs that are connected to a given vertex.
Definition: TetGeom.cpp:98
static const unsigned int VertexEdgeConnectivity[4][3]
Definition: TetGeom.h:76
static const unsigned int EdgeNormalToFaceVert[4][3]
Definition: TetGeom.h:79
int v_GetEdgeNormalToFaceVert(const int i, const int j) const override
Returns the standard lement edge IDs that are normal to a given face vertex.
Definition: TetGeom.cpp:113
static const int kNfaces
Definition: TetGeom.h:56
void v_GenGeomFactors() override
Definition: TetGeom.cpp:602
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: TetGeom.cpp:575
static const int kNqfaces
Definition: TetGeom.h:54
static const int kNtfaces
Definition: TetGeom.h:55
void SetUpXmap()
Set up the m_xmap object by determining the order of each direction from derived faces.
Definition: TetGeom.cpp:654
static const int kNedges
Definition: TetGeom.h:53
static const std::string XMLElementType
Definition: TetGeom.h:57
int v_GetDir(const int faceidx, const int facedir) const override
Returns the element coordinate direction corresponding to a given face coordinate direction.
Definition: TetGeom.cpp:82
static const unsigned int VertexFaceConnectivity[4][3]
Definition: TetGeom.h:77
static const unsigned int EdgeFaceConnectivity[6][2]
Definition: TetGeom.h:78
std::unordered_map< int, CurveSharedPtr > CurveMap
Definition: Curve.hpp:59
std::map< int, TetGeomSharedPtr > TetGeomMap
Definition: TetGeom.h:84
std::vector< TetGeomSharedPtr > TetGeomVector
Definition: TetGeom.h:83
std::shared_ptr< TetGeom > TetGeomSharedPtr
Definition: TetGeom.h:82
std::shared_ptr< TriGeom > TriGeomSharedPtr
Definition: TriGeom.h:56