Nektar++
Functions
Nektar::LibUtilities::StdPyrData Namespace Reference

Functions

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

Function Documentation

◆ getNumberOfBndCoefficients()

int Nektar::LibUtilities::StdPyrData::getNumberOfBndCoefficients ( int  Na,
int  Nb,
int  Nc 
)
inline

Definition at line 259 of file ShapeType.hpp.

260{
261 ASSERTL1(Na > 1, "Order in 'a' direction must be > 1.");
262 ASSERTL1(Nb > 1, "Order in 'b' direction must be > 1.");
263 ASSERTL1(Nc > 1, "Order in 'c' direction must be > 1.");
264 ASSERTL1(Na <= Nc, "Order in 'a' direction is higher "
265 "than order in 'c' direction.");
266 ASSERTL1(Nb <= Nc, "Order in 'b' direction is higher "
267 "than order in 'c' direction.");
268
269 return Na * Nb // base
270 + 2 * (Na * (Na + 1) / 2 + (Nc - Na) * Na) // front and back
271 + 2 * (Nb * (Nb + 1) / 2 + (Nc - Nb) * Nb) // sides
272 - 2 * Na - 2 * Nb - 4 * Nc // less edges
273 + 5; // plus vertices
274}
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Definition: ErrorUtil.hpp:242

References ASSERTL1.

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

◆ getNumberOfCoefficients()

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

Definition at line 232 of file ShapeType.hpp.

233{
234 ASSERTL1(Na > 1, "Order in 'a' direction must be > 1.");
235 ASSERTL1(Nb > 1, "Order in 'b' direction must be > 1.");
236 ASSERTL1(Nc > 1, "Order in 'c' direction must be > 1.");
237 ASSERTL1(Na <= Nc, "Order in 'a' direction is higher "
238 "than order in 'c' direction.");
239 ASSERTL1(Nb <= Nc, "Order in 'b' direction is higher "
240 "than order in 'c' direction.");
241
242 // Count number of coefficients explicitly.
243 int nCoeff = 0;
244
245 // Count number of interior tet modes
246 for (int a = 0; a < Na; ++a)
247 {
248 for (int b = 0; b < Nb; ++b)
249 {
250 for (int c = 0; c < Nc - std::max(a, b); ++c)
251 {
252 ++nCoeff;
253 }
254 }
255 }
256 return nCoeff;
257}

References ASSERTL1.

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