Nektar++
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions | Variables
Nektar::LocalRegions Namespace Reference

Classes

class  Expansion
 
class  Expansion0D
 
class  Expansion1D
 
class  Expansion2D
 
class  Expansion3D
 
class  HexExp
 
class  IndexMapKey
 
struct  IndexValue
 
class  LinSysKey
 
class  MatrixKey
 
class  NodalTetExp
 
class  NodalTriExp
 
class  PointExp
 
class  PrismExp
 
class  PyrExp
 
class  QuadExp
 
class  SegExp
 
class  TetExp
 
class  TriExp
 

Typedefs

typedef Array< OneD, Array< OneD, NekDouble > > NormalVector
 
typedef std::shared_ptr< ExpansionExpansionSharedPtr
 
typedef std::weak_ptr< ExpansionExpansionWeakPtr
 
typedef std::vector< ExpansionSharedPtrExpansionVector
 
typedef std::map< MetricType, Array< OneD, NekDouble > > MetricMap
 
typedef std::shared_ptr< Expansion0DExpansion0DSharedPtr
 
typedef std::vector< Expansion0DSharedPtrExpansion0DVector
 
typedef std::shared_ptr< Expansion2DExpansion2DSharedPtr
 
typedef std::weak_ptr< Expansion2DExpansion2DWeakPtr
 
typedef std::shared_ptr< Expansion1DExpansion1DSharedPtr
 
typedef std::weak_ptr< Expansion1DExpansion1DWeakPtr
 
typedef std::vector< Expansion1DSharedPtrExpansion1DVector
 
typedef std::shared_ptr< Expansion3DExpansion3DSharedPtr
 
typedef std::weak_ptr< Expansion3DExpansion3DWeakPtr
 
typedef std::vector< Expansion2DSharedPtrExpansion2DVector
 
typedef std::vector< Expansion3DSharedPtrExpansion3DVector
 
typedef std::shared_ptr< HexExpHexExpSharedPtr
 
typedef std::vector< HexExpSharedPtrHexExpVector
 
typedef Array< OneD, IndexValueIndexMapValues
 
typedef std::shared_ptr< IndexMapKeyIndexMapKeySharedPtr
 
typedef std::shared_ptr< IndexMapValuesIndexMapValuesSharedPtr
 
typedef std::shared_ptr< NodalTriExpNodalTriExpSharedPtr
 
typedef std::vector< NodalTriExpSharedPtrNodalTriExpVector
 
typedef std::shared_ptr< PointExpPointExpSharedPtr
 
typedef std::vector< PointExpSharedPtrPointExpVector
 
typedef std::shared_ptr< PrismExpPrismExpSharedPtr
 
typedef std::vector< PrismExpSharedPtrPrismExpVector
 
typedef std::shared_ptr< PyrExpPyrExpSharedPtr
 
typedef std::vector< PyrExpSharedPtrPyrExpVector
 
typedef std::shared_ptr< QuadExpQuadExpSharedPtr
 
typedef std::vector< QuadExpSharedPtrQuadExpVector
 
typedef std::shared_ptr< SegExpSegExpSharedPtr
 
typedef std::vector< SegExpSharedPtrSegExpVector
 
typedef std::shared_ptr< TetExpTetExpSharedPtr
 
typedef std::vector< TetExpSharedPtrTetExpVector
 
typedef std::shared_ptr< TriExpTriExpSharedPtr
 
typedef std::vector< TriExpSharedPtrTriExpVector
 

Enumerations

enum  MetricType {
  eMetricLaplacian00 , eMetricLaplacian01 , eMetricLaplacian02 , eMetricLaplacian11 ,
  eMetricLaplacian12 , eMetricLaplacian22 , eMetricQuadrature
}
 
enum  BndToLocMatrixMapType { eBndToFullMatrixCG , eBndToBndMatrixCG , eBndToTraceMatrixDG }
 
enum  GeomState { eNotFilled , ePtsFilled }
 
enum  IndexMapType {
  eEdgeToElement , eFaceToElement , eEdgeInterior , eFaceInterior ,
  eBoundary , eVertex
}
 

Functions

void GetTraceQuadRange (const LibUtilities::ShapeType shapeType, const LibUtilities::BasisKeyVector &bkeys, int traceid, std::vector< int > &q_begin, std::vector< int > &q_end)
 
bool operator< (const IndexMapKey &lhs, const IndexMapKey &rhs)
 
bool operator== (const IndexMapKey &lhs, const IndexMapKey &rhs)
 
std::ostream & operator<< (std::ostream &os, const IndexMapKey &rhs)
 
template<class InputIterator , class EqualityComparable >
InputIterator find (InputIterator first, InputIterator last, InputIterator startingpoint, const EqualityComparable &value)
 
bool operator< (const MatrixKey &lhs, const MatrixKey &rhs)
 

Variables

const char *const IndexMapTypeMap []
 
static const Array< OneD, PointExpSharedPtrNullPointExpSharedPtrArray {}
 

Typedef Documentation

◆ Expansion0DSharedPtr

Definition at line 47 of file Expansion0D.h.

◆ Expansion0DVector

Definition at line 48 of file Expansion0D.h.

◆ Expansion1DSharedPtr

Definition at line 50 of file Expansion1D.h.

◆ Expansion1DVector

Definition at line 52 of file Expansion1D.h.

◆ Expansion1DWeakPtr

Definition at line 51 of file Expansion1D.h.

◆ Expansion2DSharedPtr

Definition at line 46 of file Expansion1D.h.

◆ Expansion2DVector

Definition at line 53 of file Expansion2D.h.

◆ Expansion2DWeakPtr

Definition at line 47 of file Expansion1D.h.

◆ Expansion3DSharedPtr

Definition at line 47 of file Expansion2D.h.

◆ Expansion3DVector

Definition at line 53 of file Expansion3D.h.

◆ Expansion3DWeakPtr

Definition at line 48 of file Expansion2D.h.

◆ ExpansionSharedPtr

Definition at line 66 of file Expansion.h.

◆ ExpansionVector

Definition at line 68 of file Expansion.h.

◆ ExpansionWeakPtr

Definition at line 67 of file Expansion.h.

◆ HexExpSharedPtr

Definition at line 258 of file HexExp.h.

◆ HexExpVector

Definition at line 259 of file HexExp.h.

◆ IndexMapKeySharedPtr

Definition at line 125 of file IndexMapKey.h.

◆ IndexMapValues

Definition at line 53 of file IndexMapKey.h.

◆ IndexMapValuesSharedPtr

Definition at line 126 of file IndexMapKey.h.

◆ MetricMap

Definition at line 69 of file Expansion.h.

◆ NodalTriExpSharedPtr

Definition at line 182 of file NodalTriExp.h.

◆ NodalTriExpVector

Definition at line 183 of file NodalTriExp.h.

◆ NormalVector

Definition at line 53 of file Expansion.h.

◆ PointExpSharedPtr

Definition at line 130 of file PointExp.h.

◆ PointExpVector

Definition at line 131 of file PointExp.h.

◆ PrismExpSharedPtr

Definition at line 207 of file PrismExp.h.

◆ PrismExpVector

Definition at line 208 of file PrismExp.h.

◆ PyrExpSharedPtr

Definition at line 183 of file PyrExp.h.

◆ PyrExpVector

Definition at line 184 of file PyrExp.h.

◆ QuadExpSharedPtr

Definition at line 255 of file QuadExp.h.

◆ QuadExpVector

Definition at line 256 of file QuadExp.h.

◆ SegExpSharedPtr

Definition at line 252 of file SegExp.h.

◆ SegExpVector

Definition at line 253 of file SegExp.h.

◆ TetExpSharedPtr

Definition at line 212 of file TetExp.h.

◆ TetExpVector

Definition at line 213 of file TetExp.h.

◆ TriExpSharedPtr

Definition at line 250 of file TriExp.h.

◆ TriExpVector

Definition at line 251 of file TriExp.h.

Enumeration Type Documentation

◆ BndToLocMatrixMapType

Enumerator
eBndToFullMatrixCG 
eBndToBndMatrixCG 
eBndToTraceMatrixDG 

Definition at line 2021 of file Expansion2D.cpp.

◆ GeomState

Enumerator
eNotFilled 
ePtsFilled 

Definition at line 41 of file LocalRegions.hpp.

42{
43 eNotFilled,
44 ePtsFilled,
45};

◆ IndexMapType

Enumerator
eEdgeToElement 
eFaceToElement 
eEdgeInterior 
eFaceInterior 
eBoundary 
eVertex 

Definition at line 78 of file LocalRegions.hpp.

◆ MetricType

Enumerator
eMetricLaplacian00 
eMetricLaplacian01 
eMetricLaplacian02 
eMetricLaplacian11 
eMetricLaplacian12 
eMetricLaplacian22 
eMetricQuadrature 

Definition at line 55 of file Expansion.h.

Function Documentation

◆ find()

template<class InputIterator , class EqualityComparable >
InputIterator Nektar::LocalRegions::find ( InputIterator  first,
InputIterator  last,
InputIterator  startingpoint,
const EqualityComparable &  value 
)

Definition at line 53 of file LocalRegions.hpp.

55{
56
57 InputIterator val;
58
59 if (startingpoint == first)
60 {
61 val = find(first, last, value);
62 }
63 else
64 {
65 val = find(startingpoint, last, value);
66 if (val == last)
67 {
68 val = find(first, startingpoint, value);
69 if (val == startingpoint)
70 {
71 val = last;
72 }
73 }
74 }
75 return val;
76}

References find().

Referenced by find().

◆ GetTraceQuadRange()

void Nektar::LocalRegions::GetTraceQuadRange ( const LibUtilities::ShapeType  shapeType,
const LibUtilities::BasisKeyVector bkeys,
int  traceid,
std::vector< int > &  q_begin,
std::vector< int > &  q_end 
)

Definition at line 1016 of file Expansion.cpp.

1019{
1020 auto DIM = LibUtilities::ShapeTypeDimMap[shapeType];
1021
1022 if (DIM == 1)
1023 {
1024 q_begin.resize(1);
1025 q_end.resize(1);
1026 LibUtilities::GetEffectiveQuadRange(bkeys[0].GetPointsKey(), q_begin[0],
1027 q_end[0]);
1028 return;
1029 }
1030 else if (DIM == 2)
1031 {
1032 q_begin.resize(2);
1033 q_end.resize(2);
1034 LibUtilities::GetEffectiveQuadRange(bkeys[0].GetPointsKey(), q_begin[0],
1035 q_end[0]);
1036 LibUtilities::GetEffectiveQuadRange(bkeys[1].GetPointsKey(), q_begin[1],
1037 q_end[1]);
1038 }
1039 else if (DIM == 3)
1040 {
1041 q_begin.resize(3);
1042 q_end.resize(3);
1043 LibUtilities::GetEffectiveQuadRange(bkeys[0].GetPointsKey(), q_begin[0],
1044 q_end[0]);
1045 LibUtilities::GetEffectiveQuadRange(bkeys[1].GetPointsKey(), q_begin[1],
1046 q_end[1]);
1047 LibUtilities::GetEffectiveQuadRange(bkeys[2].GetPointsKey(), q_begin[2],
1048 q_end[2]);
1049 }
1050
1051 switch (shapeType)
1052 {
1053 case LibUtilities::eTriangle:
1054 {
1055 switch (traceid)
1056 {
1057 case 0:
1058 {
1059 // assume it always includes the end points
1060 q_begin[1] = 0;
1061 q_end[1] = 1;
1062 return;
1063 }
1064 case 1:
1065 {
1066 // assume it always includes the end points
1067 q_begin[0] = bkeys[0].GetNumPoints() - 1;
1068 q_end[0] = bkeys[0].GetNumPoints();
1069 return;
1070 }
1071 case 2:
1072 {
1073 q_begin[0] = 0;
1074 q_end[0] = 1;
1075 return;
1076 }
1077 default:
1078 {
1079 NEKERROR(ErrorUtil::efatal, "Invalid trace id");
1080 break;
1081 }
1082 }
1083 }
1084 break;
1085 case LibUtilities::eQuadrilateral:
1086 {
1087 switch (traceid)
1088 {
1089 case 0:
1090 {
1091 q_begin[1] = 0;
1092 q_end[1] = 1;
1093 return;
1094 }
1095 case 1:
1096 {
1097 q_begin[0] = bkeys[0].GetNumPoints() - 1;
1098 q_end[0] = bkeys[0].GetNumPoints();
1099 return;
1100 }
1101 case 2:
1102 {
1103 q_begin[1] = bkeys[1].GetNumPoints() - 1;
1104 q_end[1] = bkeys[1].GetNumPoints();
1105 return;
1106 }
1107 case 3:
1108 {
1109 q_begin[0] = 0;
1110 q_end[0] = 1;
1111 return;
1112 }
1113 default:
1114 {
1115 NEKERROR(ErrorUtil::efatal, "Invalid trace id");
1116 break;
1117 }
1118 }
1119 }
1120 break;
1121 case LibUtilities::eHexahedron:
1122 {
1123 switch (traceid)
1124 {
1125 case 0:
1126 {
1127 q_begin[2] = 0;
1128 q_end[2] = 1;
1129 return;
1130 }
1131 case 1:
1132 {
1133 q_begin[1] = 0;
1134 q_end[1] = 1;
1135 return;
1136 }
1137 case 2:
1138 {
1139 q_begin[0] = bkeys[0].GetNumPoints() - 1;
1140 q_end[0] = bkeys[0].GetNumPoints();
1141 return;
1142 }
1143 case 3:
1144 {
1145 q_begin[1] = bkeys[1].GetNumPoints() - 1;
1146 q_end[1] = bkeys[1].GetNumPoints();
1147 return;
1148 }
1149 case 4:
1150 {
1151 q_begin[0] = 0;
1152 q_end[0] = 1;
1153 return;
1154 }
1155 case 5:
1156 {
1157 q_begin[2] = bkeys[2].GetNumPoints() - 1;
1158 q_end[2] = bkeys[2].GetNumPoints();
1159 return;
1160 }
1161 default:
1162 {
1163 NEKERROR(ErrorUtil::efatal, "Invalid trace id");
1164 break;
1165 }
1166 }
1167 }
1168 break;
1169 case LibUtilities::eTetrahedron:
1170 {
1171 switch (traceid)
1172 {
1173 case 0:
1174 {
1175 q_begin[2] = 0;
1176 q_end[2] = 1;
1177 return;
1178 }
1179 case 1:
1180 {
1181 q_begin[1] = 0;
1182 q_end[1] = 1;
1183 return;
1184 }
1185 case 2:
1186 {
1187 q_begin[0] = bkeys[0].GetNumPoints() - 1;
1188 q_end[0] = bkeys[0].GetNumPoints();
1189 return;
1190 }
1191 case 3:
1192 {
1193 q_begin[0] = 0;
1194 q_end[0] = 1;
1195 return;
1196 }
1197 default:
1198 {
1199 NEKERROR(ErrorUtil::efatal, "Invalid trace id");
1200 break;
1201 }
1202 }
1203 }
1204 break;
1205 case LibUtilities::ePrism:
1206 {
1207 switch (traceid)
1208 {
1209 case 0:
1210 {
1211 q_begin[2] = 0;
1212 q_end[2] = 1;
1213 return;
1214 }
1215 case 1:
1216 {
1217 q_begin[1] = 0;
1218 q_end[1] = 1;
1219 return;
1220 }
1221 case 2:
1222 {
1223 q_begin[0] = bkeys[0].GetNumPoints() - 1;
1224 q_end[0] = bkeys[0].GetNumPoints();
1225 return;
1226 }
1227 case 3:
1228 {
1229 q_begin[1] = bkeys[1].GetNumPoints() - 1;
1230 q_end[1] = bkeys[1].GetNumPoints();
1231 return;
1232 }
1233 case 4:
1234 {
1235 q_begin[0] = 0;
1236 q_end[0] = 1;
1237 return;
1238 }
1239 default:
1240 {
1241 NEKERROR(ErrorUtil::efatal, "Invalid trace id");
1242 break;
1243 }
1244 }
1245 }
1246 break;
1247 case LibUtilities::ePyramid:
1248 {
1249 switch (traceid)
1250 {
1251 case 0:
1252 {
1253 q_begin[2] = 0;
1254 q_end[2] = 1;
1255 return;
1256 }
1257 case 1:
1258 {
1259 q_begin[1] = 0;
1260 q_end[1] = 1;
1261 return;
1262 }
1263 case 2:
1264 {
1265 q_begin[0] = bkeys[0].GetNumPoints() - 1;
1266 q_end[0] = bkeys[0].GetNumPoints();
1267 return;
1268 }
1269 case 3:
1270 {
1271 q_begin[0] = bkeys[1].GetNumPoints() - 1;
1272 q_end[0] = bkeys[1].GetNumPoints();
1273 return;
1274 }
1275 case 4:
1276 {
1277 q_begin[1] = 0;
1278 q_end[1] = 1;
1279 return;
1280 }
1281 default:
1282 {
1283 NEKERROR(ErrorUtil::efatal, "Invalid trace id");
1284 break;
1285 }
1286 }
1287 }
1288 break;
1289 default:
1290 return;
1291 }
1292}
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...

References Nektar::ErrorUtil::efatal, Nektar::LibUtilities::eHexahedron, Nektar::LibUtilities::ePrism, Nektar::LibUtilities::ePyramid, Nektar::LibUtilities::eQuadrilateral, Nektar::LibUtilities::eTetrahedron, Nektar::LibUtilities::eTriangle, Nektar::LibUtilities::GetEffectiveQuadRange(), NEKERROR, and Nektar::LibUtilities::ShapeTypeDimMap.

◆ operator<() [1/2]

bool Nektar::LocalRegions::operator< ( const IndexMapKey lhs,
const IndexMapKey rhs 
)

Definition at line 71 of file IndexMapKey.cpp.

72{
73 if (lhs.m_indexMapType < rhs.m_indexMapType)
74 {
75 return true;
76 }
77
78 if (lhs.m_indexMapType > rhs.m_indexMapType)
79 {
80 return false;
81 }
82
83 if (lhs.m_shapeType < rhs.m_shapeType)
84 {
85 return true;
86 }
87
88 if (lhs.m_shapeType > rhs.m_shapeType)
89 {
90 return false;
91 }
92
93 if (lhs.m_p < rhs.m_p)
94 {
95 return true;
96 }
97
98 if (lhs.m_p > rhs.m_p)
99 {
100 return false;
101 }
102
103 if (lhs.m_q < rhs.m_q)
104 {
105 return true;
106 }
107
108 if (lhs.m_q > rhs.m_q)
109 {
110 return false;
111 }
112
113 if (lhs.m_r < rhs.m_r)
114 {
115 return true;
116 }
117
118 if (lhs.m_r > rhs.m_r)
119 {
120 return false;
121 }
122
123 if (lhs.m_entityID < rhs.m_entityID)
124 {
125 return true;
126 }
127 if (lhs.m_entityID > rhs.m_entityID)
128 {
129 return false;
130 }
131
132 if (lhs.m_orientation < rhs.m_orientation)
133 {
134 return true;
135 }
136 if (lhs.m_orientation > rhs.m_orientation)
137 {
138 return false;
139 }
140
141 return false;
142}
LibUtilities::ShapeType m_shapeType
StdRegions::Orientation m_orientation

◆ operator<() [2/2]

bool Nektar::LocalRegions::operator< ( const MatrixKey lhs,
const MatrixKey rhs 
)

Definition at line 73 of file MatrixKey.cpp.

74{
75 if (lhs.m_metricinfo.get() < rhs.m_metricinfo.get())
76 {
77 return true;
78 }
79
80 if (lhs.m_metricinfo.get() > rhs.m_metricinfo.get())
81 {
82 return false;
83 }
84
85 return (*dynamic_cast<const StdRegions::StdMatrixKey *>(&lhs) <
86 *dynamic_cast<const StdRegions::StdMatrixKey *>(&rhs));
87}
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
Definition MatrixKey.h:88

◆ operator<<()

std::ostream & Nektar::LocalRegions::operator<< ( std::ostream &  os,
const IndexMapKey rhs 
)

Definition at line 184 of file IndexMapKey.cpp.

185{
186 os << "IndexMapType: " << IndexMapTypeMap[rhs.GetIndexMapType()]
187 << std::endl;
188 return os;
189}
IndexMapType GetIndexMapType() const
Definition IndexMapKey.h:89
const char *const IndexMapTypeMap[]

References Nektar::LocalRegions::IndexMapKey::GetIndexMapType(), and IndexMapTypeMap.

◆ operator==()

bool Nektar::LocalRegions::operator== ( const IndexMapKey lhs,
const IndexMapKey rhs 
)

Definition at line 144 of file IndexMapKey.cpp.

145{
146 if (lhs.m_indexMapType != rhs.m_indexMapType)
147 {
148 return false;
149 }
150
151 if (lhs.m_shapeType != rhs.m_shapeType)
152 {
153 return false;
154 }
155
156 if (lhs.m_p != rhs.m_p)
157 {
158 return false;
159 }
160
161 if (lhs.m_q != rhs.m_q)
162 {
163 return false;
164 }
165
166 if (lhs.m_r != rhs.m_r)
167 {
168 return false;
169 }
170
171 if (lhs.m_entityID != rhs.m_entityID)
172 {
173 return false;
174 }
175
176 if (lhs.m_orientation != rhs.m_orientation)
177 {
178 return false;
179 }
180
181 return true;
182}

Variable Documentation

◆ IndexMapTypeMap

const char* const Nektar::LocalRegions::IndexMapTypeMap[]
Initial value:
= {"EdgeToElement", "FaceToElement",
"EdgeInterior", "FaceInterior",
"Boundary", "Vertex"}

Definition at line 88 of file LocalRegions.hpp.

88 {"EdgeToElement", "FaceToElement",
89 "EdgeInterior", "FaceInterior",
90 "Boundary", "Vertex"};

Referenced by operator<<().

◆ NullPointExpSharedPtrArray

const Array<OneD, PointExpSharedPtr> Nektar::LocalRegions::NullPointExpSharedPtrArray {}
static

Definition at line 133 of file PointExp.h.

133{};