Nektar++
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 264 of file ShapeType.hpp.

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

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 237 of file ShapeType.hpp.

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

References ASSERTL1.

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