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

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

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

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

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