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

263 {
264  ASSERTL1(Na > 1, "Order in 'a' direction must be > 1.");
265  ASSERTL1(Nb > 1, "Order in 'b' direction must be > 1.");
266  ASSERTL1(Nc > 1, "Order in 'c' direction must be > 1.");
267  ASSERTL1(Na <= Nc, "Order in 'a' direction is higher "
268  "than order in 'c' direction.");
269  ASSERTL1(Nb <= Nc, "Order in 'b' direction is higher "
270  "than order in 'c' direction.");
271 
272  return Na * Nb // base
273  + 2 * (Na * (Na + 1) / 2 + (Nc - Na) * Na) // front and back
274  + 2 * (Nb * (Nb + 1) / 2 + (Nc - Nb) * Nb) // sides
275  - 2 * Na - 2 * Nb - 4 * Nc // less edges
276  + 5; // plus vertices
277 }
#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 235 of file ShapeType.hpp.

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

References ASSERTL1.

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