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

Definition at line 318 of file ShapeType.hpp.

319{
320 ASSERTL1(Na > 1, "Order in 'a' direction must be > 1.");
321 ASSERTL1(Nb > 1, "Order in 'b' direction must be > 1.");
322 ASSERTL1(Nc > 1, "Order in 'c' direction must be > 1.");
323 ASSERTL1(Na <= Nc, "Order in 'a' direction is higher "
324 "than order in 'c' direction.");
325 ASSERTL1(Nb <= Nc, "Order in 'b' direction is higher "
326 "than order in 'c' direction.");
327
328 return Na * Nb // base
329 + 2 * (Na * (Na + 1) / 2 + (Nc - Na) * Na) // front and back
330 + 2 * (Nb * (Nb + 1) / 2 + (Nc - Nb) * Nb) // sides
331 - 2 * Na - 2 * Nb - 4 * Nc // less edges
332 + 5; // plus vertices
333}
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....

References ASSERTL1.

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

◆ getNumberOfCoefficients()

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

Definition at line 291 of file ShapeType.hpp.

292{
293 ASSERTL1(Na > 1, "Order in 'a' direction must be > 1.");
294 ASSERTL1(Nb > 1, "Order in 'b' direction must be > 1.");
295 ASSERTL1(Nc > 1, "Order in 'c' direction must be > 1.");
296 ASSERTL1(Na <= Nc, "Order in 'a' direction is higher "
297 "than order in 'c' direction.");
298 ASSERTL1(Nb <= Nc, "Order in 'b' direction is higher "
299 "than order in 'c' direction.");
300
301 // Count number of coefficients explicitly.
302 int nCoeff = 0;
303
304 // Count number of interior tet modes
305 for (int a = 0; a < Na; ++a)
306 {
307 for (int b = 0; b < Nb; ++b)
308 {
309 for (int c = 0; c < Nc - std::max(a, b); ++c)
310 {
311 ++nCoeff;
312 }
313 }
314 }
315 return nCoeff;
316}

References ASSERTL1.

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