Nektar++
Loading...
Searching...
No Matches
Functions
Nektar::LibUtilities::StdNodalTetData Namespace Reference

Functions

constexpr int getNumberOfCoefficients (int Na, int Nb, int Nc)
 
constexpr int getNumberOfBndCoefficients (int Na, int Nb, int Nc)
 

Function Documentation

◆ getNumberOfBndCoefficients()

constexpr int Nektar::LibUtilities::StdNodalTetData::getNumberOfBndCoefficients ( int  Na,
int  Nb,
int  Nc 
)
inlineconstexpr

Definition at line 273 of file ShapeType.hpp.

274{
275 ASSERTL1(Na == Nb, "order in 'a' direction needs to be the same as "
276 "b' direction for nodaltet");
277 ASSERTL1(Nb == Nc, "order in 'a' direction needs to be the same as "
278 "c' direction for nodaltet");
279 int nCoef = Na * (Na + 1) / 2 + (Nb - Na) * Na // base
280 + Na * (Na + 1) / 2 + (Nc - Na) * Na // front
281 + 2 * (Nb * (Nb + 1) / 2 + (Nc - Nb) * Nb) // 2 other sides
282 - Na - 2 * Nb - 3 * Nc // less edges
283 + 4; // plus vertices
284
285 return nCoef;
286}
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....

References ASSERTL1.

◆ getNumberOfCoefficients()

constexpr int Nektar::LibUtilities::StdNodalTetData::getNumberOfCoefficients ( int  Na,
int  Nb,
int  Nc 
)
inlineconstexpr

Adds up the number of cells in a truncated Nc by Nc by Nc pyramid, where the longest Na rows and longest Nb columns are kept. Example: (Na, Nb, Nc) = (3, 4, 5); The number of coefficients is the sum of the elements of the following matrix:

|5 4 3 2 0| |4 3 2 0 | |3 2 0 | |0 0 | |0 |

Sum = 28 = number of tet coefficients.

Definition at line 264 of file ShapeType.hpp.

265{
266 ASSERTL1(Na == Nb, "order in 'a' direction needs to be the same as "
267 "b' direction for nodaltet");
268 ASSERTL1(Nb == Nc, "order in 'a' direction needs to be the same as "
269 "c' direction for nodaltet");
270 return Na * (Nb + 1) * (Nc + 2) / 6;
271}

References ASSERTL1.

Referenced by Nektar::LibUtilities::GetNumberOfCoefficients().