Nektar++
Loading...
Searching...
No Matches
Functions
Nektar::LibUtilities::StdTetData 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::StdTetData::getNumberOfBndCoefficients ( int  Na,
int  Nb,
int  Nc 
)
inlineconstexpr

Definition at line 227 of file ShapeType.hpp.

228{
229 ASSERTL2(Na > 1, "Order in 'a' direction must be > 1.");
230 ASSERTL2(Nb > 1, "Order in 'b' direction must be > 1.");
231 ASSERTL2(Nc > 1, "Order in 'c' direction must be > 1.");
232 ASSERTL1(Na <= Nc, "order in 'a' direction is higher "
233 "than order in 'c' direction");
234 ASSERTL1(Nb <= Nc, "order in 'b' direction is higher "
235 "than order in 'c' direction");
236
237 int nCoef = Na * (Na + 1) / 2 + (Nb - Na) * Na // base
238 + Na * (Na + 1) / 2 + (Nc - Na) * Na // front
239 + 2 * (Nb * (Nb + 1) / 2 + (Nc - Nb) * Nb) // 2 other sides
240 - Na - 2 * Nb - 3 * Nc // less edges
241 + 4; // plus vertices
242
243 return nCoef;
244}
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed to...

References ASSERTL1, and ASSERTL2.

Referenced by Nektar::SpatialDomains::MeshPartition::CalculateElementWeight(), and Nektar::StdRegions::StdTetExp::v_NumBndryCoeffs().

◆ getNumberOfCoefficients()

constexpr int Nektar::LibUtilities::StdTetData::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 214 of file ShapeType.hpp.

215{
216 ASSERTL2(Na > 1, "Order in 'a' direction must be > 1.");
217 ASSERTL2(Nb > 1, "Order in 'b' direction must be > 1.");
218 ASSERTL2(Nc > 1, "Order in 'c' direction must be > 1.");
219 ASSERTL1(Na <= Nc, "order in 'a' direction is higher "
220 "than order in 'c' direction");
221 ASSERTL1(Nb <= Nc, "order in 'b' direction is higher "
222 "than order in 'c' direction");
223 int nCoef = Na * Nb * Nc - Na * Nc * (Na - 1) / 2 - Na * Nb * (Nb - 1) / 2 +
224 Na * (Na - 1) * (Na - 2) / 6;
225 return nCoef;
226}

References ASSERTL1, and ASSERTL2.

Referenced by Nektar::SpatialDomains::MeshPartition::CalculateElementWeight(), Nektar::LibUtilities::GetNumberOfCoefficients(), Nektar::LibUtilities::GetNumberOfCoefficients(), Nektar::LibUtilities::GetNumberOfDataPoints(), Nektar::Collections::TetIProduct(), Nektar::StdRegions::StdTetExp::v_CalcNumberOfCoefficients(), Nektar::StdRegions::StdTetExp::v_GenMatrix(), and Nektar::FieldUtils::ProcessEquiSpacedOutput::v_Process().