Nektar++
Loading...
Searching...
No Matches
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 250 of file ShapeType.hpp.

251{
252 ASSERTL1(Na > 1, "Order in 'a' direction must be > 1.");
253 ASSERTL1(Nb > 1, "Order in 'b' direction must be > 1.");
254 ASSERTL1(Nc > 1, "Order in 'c' direction must be > 1.");
255 ASSERTL1(Na <= Nc, "Order in 'a' direction is higher "
256 "than order in 'c' direction.");
257 ASSERTL1(Nb <= Nc, "Order in 'b' direction is higher "
258 "than order in 'c' direction.");
259
260 return Na * Nb // base
261 + 2 * (Na * (Na + 1) / 2 + (Nc - Na) * Na) // front and back
262 + 2 * (Nb * (Nb + 1) / 2 + (Nc - Nb) * Nb) // sides
263 - 2 * Na - 2 * Nb - 4 * Nc // less edges
264 + 5; // plus vertices
265}
#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()

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

Definition at line 223 of file ShapeType.hpp.

224{
225 ASSERTL1(Na > 1, "Order in 'a' direction must be > 1.");
226 ASSERTL1(Nb > 1, "Order in 'b' direction must be > 1.");
227 ASSERTL1(Nc > 1, "Order in 'c' direction must be > 1.");
228 ASSERTL1(Na <= Nc, "Order in 'a' direction is higher "
229 "than order in 'c' direction.");
230 ASSERTL1(Nb <= Nc, "Order in 'b' direction is higher "
231 "than order in 'c' direction.");
232
233 // Count number of coefficients explicitly.
234 int nCoeff = 0;
235
236 // Count number of interior tet modes
237 for (int a = 0; a < Na; ++a)
238 {
239 for (int b = 0; b < Nb; ++b)
240 {
241 for (int c = 0; c < Nc - std::max(a, b); ++c)
242 {
243 ++nCoeff;
244 }
245 }
246 }
247 return nCoeff;
248}

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().