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  NodalPrismExp
 
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< NodalPrismExpNodalPrismExpSharedPtr
 
typedef std::vector< NodalPrismExpSharedPtrNodalPrismExpVector
 
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 46 of file Expansion0D.h.

◆ Expansion0DVector

Definition at line 47 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 189 of file HexExp.h.

◆ HexExpVector

Definition at line 190 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.

◆ NodalPrismExpSharedPtr

Definition at line 157 of file NodalPrismExp.h.

◆ NodalPrismExpVector

Definition at line 158 of file NodalPrismExp.h.

◆ NodalTriExpSharedPtr

Definition at line 155 of file NodalTriExp.h.

◆ NodalTriExpVector

Definition at line 156 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 163 of file PrismExp.h.

◆ PrismExpVector

Definition at line 164 of file PrismExp.h.

◆ PyrExpSharedPtr

Definition at line 139 of file PyrExp.h.

◆ PyrExpVector

Definition at line 140 of file PyrExp.h.

◆ QuadExpSharedPtr

Definition at line 217 of file QuadExp.h.

◆ QuadExpVector

Definition at line 218 of file QuadExp.h.

◆ SegExpSharedPtr

Definition at line 208 of file SegExp.h.

◆ SegExpVector

Definition at line 209 of file SegExp.h.

◆ TetExpSharedPtr

Definition at line 165 of file TetExp.h.

◆ TetExpVector

Definition at line 166 of file TetExp.h.

◆ TriExpSharedPtr

Definition at line 203 of file TriExp.h.

◆ TriExpVector

Definition at line 204 of file TriExp.h.

Enumeration Type Documentation

◆ BndToLocMatrixMapType

Enumerator
eBndToFullMatrixCG 
eBndToBndMatrixCG 
eBndToTraceMatrixDG 

Definition at line 2199 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 1124 of file Expansion.cpp.

1127{
1128 auto DIM = LibUtilities::ShapeTypeDimMap[shapeType];
1129
1130 if (DIM == 1)
1131 {
1132 q_begin.resize(1);
1133 q_end.resize(1);
1134 LibUtilities::PointsKey::GetEffectiveQuadRange(bkeys[0].GetPointsKey(),
1135 q_begin[0], q_end[0]);
1136 return;
1137 }
1138 else if (DIM == 2)
1139 {
1140 q_begin.resize(2);
1141 q_end.resize(2);
1142 LibUtilities::PointsKey::GetEffectiveQuadRange(bkeys[0].GetPointsKey(),
1143 q_begin[0], q_end[0]);
1144 LibUtilities::PointsKey::GetEffectiveQuadRange(bkeys[1].GetPointsKey(),
1145 q_begin[1], q_end[1]);
1146 }
1147 else if (DIM == 3)
1148 {
1149 q_begin.resize(3);
1150 q_end.resize(3);
1151 LibUtilities::PointsKey::GetEffectiveQuadRange(bkeys[0].GetPointsKey(),
1152 q_begin[0], q_end[0]);
1153 LibUtilities::PointsKey::GetEffectiveQuadRange(bkeys[1].GetPointsKey(),
1154 q_begin[1], q_end[1]);
1155 LibUtilities::PointsKey::GetEffectiveQuadRange(bkeys[2].GetPointsKey(),
1156 q_begin[2], q_end[2]);
1157 }
1158
1159 switch (shapeType)
1160 {
1161 case LibUtilities::eTriangle:
1162 {
1163 switch (traceid)
1164 {
1165 case 0:
1166 {
1167 // assume it always includes the end points
1168 q_begin[1] = 0;
1169 q_end[1] = 1;
1170 return;
1171 }
1172 case 1:
1173 {
1174 // assume it always includes the end points
1175 q_begin[0] = bkeys[0].GetNumPoints() - 1;
1176 q_end[0] = bkeys[0].GetNumPoints();
1177 return;
1178 }
1179 case 2:
1180 {
1181 q_begin[0] = 0;
1182 q_end[0] = 1;
1183 return;
1184 }
1185 default:
1186 {
1187 NEKERROR(ErrorUtil::efatal, "Invalid trace id");
1188 break;
1189 }
1190 }
1191 }
1192 break;
1193 case LibUtilities::eQuadrilateral:
1194 {
1195 switch (traceid)
1196 {
1197 case 0:
1198 {
1199 q_begin[1] = 0;
1200 q_end[1] = 1;
1201 return;
1202 }
1203 case 1:
1204 {
1205 q_begin[0] = bkeys[0].GetNumPoints() - 1;
1206 q_end[0] = bkeys[0].GetNumPoints();
1207 return;
1208 }
1209 case 2:
1210 {
1211 q_begin[1] = bkeys[1].GetNumPoints() - 1;
1212 q_end[1] = bkeys[1].GetNumPoints();
1213 return;
1214 }
1215 case 3:
1216 {
1217 q_begin[0] = 0;
1218 q_end[0] = 1;
1219 return;
1220 }
1221 default:
1222 {
1223 NEKERROR(ErrorUtil::efatal, "Invalid trace id");
1224 break;
1225 }
1226 }
1227 }
1228 break;
1229 case LibUtilities::eHexahedron:
1230 {
1231 switch (traceid)
1232 {
1233 case 0:
1234 {
1235 q_begin[2] = 0;
1236 q_end[2] = 1;
1237 return;
1238 }
1239 case 1:
1240 {
1241 q_begin[1] = 0;
1242 q_end[1] = 1;
1243 return;
1244 }
1245 case 2:
1246 {
1247 q_begin[0] = bkeys[0].GetNumPoints() - 1;
1248 q_end[0] = bkeys[0].GetNumPoints();
1249 return;
1250 }
1251 case 3:
1252 {
1253 q_begin[1] = bkeys[1].GetNumPoints() - 1;
1254 q_end[1] = bkeys[1].GetNumPoints();
1255 return;
1256 }
1257 case 4:
1258 {
1259 q_begin[0] = 0;
1260 q_end[0] = 1;
1261 return;
1262 }
1263 case 5:
1264 {
1265 q_begin[2] = bkeys[2].GetNumPoints() - 1;
1266 q_end[2] = bkeys[2].GetNumPoints();
1267 return;
1268 }
1269 default:
1270 {
1271 NEKERROR(ErrorUtil::efatal, "Invalid trace id");
1272 break;
1273 }
1274 }
1275 }
1276 break;
1277 case LibUtilities::eTetrahedron:
1278 {
1279 switch (traceid)
1280 {
1281 case 0:
1282 {
1283 q_begin[2] = 0;
1284 q_end[2] = 1;
1285 return;
1286 }
1287 case 1:
1288 {
1289 q_begin[1] = 0;
1290 q_end[1] = 1;
1291 return;
1292 }
1293 case 2:
1294 {
1295 q_begin[0] = bkeys[0].GetNumPoints() - 1;
1296 q_end[0] = bkeys[0].GetNumPoints();
1297 return;
1298 }
1299 case 3:
1300 {
1301 q_begin[0] = 0;
1302 q_end[0] = 1;
1303 return;
1304 }
1305 default:
1306 {
1307 NEKERROR(ErrorUtil::efatal, "Invalid trace id");
1308 break;
1309 }
1310 }
1311 }
1312 break;
1313 case LibUtilities::ePrism:
1314 {
1315 switch (traceid)
1316 {
1317 case 0:
1318 {
1319 q_begin[2] = 0;
1320 q_end[2] = 1;
1321 return;
1322 }
1323 case 1:
1324 {
1325 q_begin[1] = 0;
1326 q_end[1] = 1;
1327 return;
1328 }
1329 case 2:
1330 {
1331 q_begin[0] = bkeys[0].GetNumPoints() - 1;
1332 q_end[0] = bkeys[0].GetNumPoints();
1333 return;
1334 }
1335 case 3:
1336 {
1337 q_begin[1] = bkeys[1].GetNumPoints() - 1;
1338 q_end[1] = bkeys[1].GetNumPoints();
1339 return;
1340 }
1341 case 4:
1342 {
1343 q_begin[0] = 0;
1344 q_end[0] = 1;
1345 return;
1346 }
1347 default:
1348 {
1349 NEKERROR(ErrorUtil::efatal, "Invalid trace id");
1350 break;
1351 }
1352 }
1353 }
1354 break;
1355 case LibUtilities::ePyramid:
1356 {
1357 switch (traceid)
1358 {
1359 case 0:
1360 {
1361 q_begin[2] = 0;
1362 q_end[2] = 1;
1363 return;
1364 }
1365 case 1:
1366 {
1367 q_begin[1] = 0;
1368 q_end[1] = 1;
1369 return;
1370 }
1371 case 2:
1372 {
1373 q_begin[0] = bkeys[0].GetNumPoints() - 1;
1374 q_end[0] = bkeys[0].GetNumPoints();
1375 return;
1376 }
1377 case 3:
1378 {
1379 q_begin[0] = bkeys[1].GetNumPoints() - 1;
1380 q_end[0] = bkeys[1].GetNumPoints();
1381 return;
1382 }
1383 case 4:
1384 {
1385 q_begin[1] = 0;
1386 q_end[1] = 1;
1387 return;
1388 }
1389 default:
1390 {
1391 NEKERROR(ErrorUtil::efatal, "Invalid trace id");
1392 break;
1393 }
1394 }
1395 }
1396 break;
1397 default:
1398 return;
1399 }
1400}
#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::PointsKey::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 74 of file MatrixKey.cpp.

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

◆ 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{};