Nektar++
Functions
Nektar::LibUtilities::StdTetData 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::StdTetData::getNumberOfBndCoefficients ( int  Na,
int  Nb,
int  Nc 
)
inline

Definition at line 210 of file ShapeType.hpp.

211{
212 ASSERTL2(Na > 1, "Order in 'a' direction must be > 1.");
213 ASSERTL2(Nb > 1, "Order in 'b' direction must be > 1.");
214 ASSERTL2(Nc > 1, "Order in 'c' direction must be > 1.");
215 ASSERTL1(Na <= Nc, "order in 'a' direction is higher "
216 "than order in 'c' direction");
217 ASSERTL1(Nb <= Nc, "order in 'b' direction is higher "
218 "than order in 'c' direction");
219
220 int nCoef = Na * (Na + 1) / 2 + (Nb - Na) * Na // base
221 + Na * (Na + 1) / 2 + (Nc - Na) * Na // front
222 + 2 * (Nb * (Nb + 1) / 2 + (Nc - Nb) * Nb) // 2 other sides
223 - Na - 2 * Nb - 3 * Nc // less edges
224 + 4; // plus vertices
225
226 return nCoef;
227}
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Definition: ErrorUtil.hpp:242
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed to...
Definition: ErrorUtil.hpp:265

References ASSERTL1, and ASSERTL2.

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

◆ getNumberOfCoefficients()

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

Adds up the number of cells in a truncated Nc by Nc by Nc pyramid, where the longest Na rows and longest Nb columns are kept. Example: (Na, Nb, Nc) = (3, 4, 5); The number of coefficients is the sum of the elements of the following matrix:

|5 4 3 2 0| |4 3 2 0 | |3 2 0 | |0 0 | |0 |

Sum = 28 = number of tet coefficients.

Definition at line 187 of file ShapeType.hpp.

188{
189 ASSERTL2(Na > 1, "Order in 'a' direction must be > 1.");
190 ASSERTL2(Nb > 1, "Order in 'b' direction must be > 1.");
191 ASSERTL2(Nc > 1, "Order in 'c' direction must be > 1.");
192 ASSERTL1(Na <= Nc, "order in 'a' direction is higher "
193 "than order in 'c' direction");
194 ASSERTL1(Nb <= Nc, "order in 'b' direction is higher "
195 "than order in 'c' direction");
196 int nCoef = 0;
197 for (int a = 0; a < Na; ++a)
198 {
199 for (int b = 0; b < Nb - a; ++b)
200 {
201 for (int c = 0; c < Nc - a - b; ++c)
202 {
203 ++nCoef;
204 }
205 }
206 }
207 return nCoef;
208}

References ASSERTL1, and ASSERTL2.

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