129 const size_t mode) = 0;
184 for (
int i = 0; i < nq - 2; ++i)
186 sorted[cnt++] = 3 + i;
190 for (
int j = 0; j < nq - 2; ++j)
193 sorted[cnt++] = 3 + 2 * (nq - 2) + nq - 3 - j;
194 for (
int i = 0; i < nq - 3 - j; ++i)
196 sorted[cnt++] = 3 + 3 * (nq - 2) + cnt1++;
198 sorted[cnt++] = 3 + (nq - 2) + j;
203 "No of sorted points not the same as number in expansion");
216 const size_t mode)
override;
227 return 2.0 *
sqrt(2.0);
242 typedef std::tuple<int, int, int>
Mode;
262 for (
int i = 0; i < nq - 2; ++i)
264 sorted[cnt++] = 4 + i;
268 for (
int j = 0; j < nq - 2; ++j)
270 sorted[cnt++] = 4 + 2 * (nq - 2) + nq - 3 -
272 for (
int i = 0; i < nq - 3 - j; ++i)
274 sorted[cnt++] = 4 + 6 * (nq - 2) + cnt1++;
276 sorted[cnt++] = 4 + (nq - 2) + j;
284 for (
int k = 0; k < nq - 2; ++k)
286 sorted[cnt++] = 4 + 3 * (nq - 2) + k;
287 for (
int i = 0; i < nq - 3 - k; ++i)
290 4 + 6 * (nq - 2) + (nq - 3) * (nq - 2) / 2 + cnt1++;
292 sorted[cnt++] = 4 + 4 * (nq - 2) + k;
294 for (
int j = 0; j < nq - 3 - k; ++j)
296 sorted[cnt++] = 4 + 6 * (nq - 2) + 3 * (nq - 3) * (nq - 2) / 2 +
298 for (
int i = 0; i < nq - 4 - k - j; ++i)
301 4 + 6 * (nq - 2) + 4 * (nq - 3) * (nq - 2) / 2 + cint++;
303 sorted[cnt++] = 4 + 6 * (nq - 2) + 2 * (nq - 3) * (nq - 2) / 2 +
306 sorted[cnt++] = 4 + 5 * (nq - 2) + k;
309 ASSERTL1(cnt == nq * (nq + 1) * (nq + 2) / 6,
310 "No of sorted points not the same as number in expansion");
324 const size_t mode)
override;
335 return 8.0 *
sqrt(2.0) / 3.0;
350 typedef std::tuple<int, int, int>
Mode;
369 for (
int i = 0; i < nq - 2; ++i)
371 sorted[cnt++] = 6 + i;
375 for (
int j = 0; j < nq - 2; ++j)
377 sorted[cnt++] = 6 + 3 * (nq - 2) + nq - 3 -
379 for (
int i = 0; i < nq - 2; ++i)
381 sorted[cnt++] = 6 + 9 * (nq - 2) + cnt1++;
383 sorted[cnt++] = 6 + (nq - 2) + j;
386 for (
int i = 0; i < nq - 2; ++i)
388 sorted[cnt++] = 6 + 2 * (nq - 2) + nq - 3 - i;
397 for (
int k = 0; k < nq - 2; ++k)
399 sorted[cnt++] = 6 + 4 * (nq - 2) + k;
400 for (
int i = 0; i < nq - 3 - k; ++i)
402 sorted[cnt++] = 6 + 9 * (nq - 2) + (nq - 2) * (nq - 2) + cnt1++;
404 sorted[cnt++] = 6 + 5 * (nq - 2) + k;
406 for (
int j = 0; j < nq - 2; ++j)
408 sorted[cnt++] = 6 + 9 * (nq - 2) + 2 * (nq - 3) * (nq - 2) / 2 +
409 2 * (nq - 2) * (nq - 2) + cnt4++;
411 for (
int i = 0; i < nq - 3 - k; ++i)
413 sorted[cnt++] = 6 + 9 * (nq - 2) +
414 2 * (nq - 3) * (nq - 2) / 2 +
415 3 * (nq - 2) * (nq - 2) + cint++;
417 sorted[cnt++] = 6 + 9 * (nq - 2) + (nq - 3) * (nq - 2) / 2 +
418 (nq - 2) * (nq - 2) + cnt2++;
421 sorted[cnt++] = 6 + 7 * (nq - 2) + k;
422 for (
int i = 0; i < nq - 3 - k; ++i)
424 sorted[cnt++] = 6 + 9 * (nq - 2) + (nq - 3) * (nq - 2) / 2 +
425 2 * (nq - 2) * (nq - 2) + cnt3++;
427 sorted[cnt++] = 6 + 6 * (nq - 2) + k;
431 for (
int j = 0; j < nq - 2; ++j)
433 sorted[cnt++] = 6 + 8 * (nq - 2) + j;
437 ASSERTL1(cnt == nq * nq * (nq + 1) / 2,
438 "No of sorted points not the same as number in expansion");
452 const size_t mode)
override;
463 return 4.0 *
sqrt(2.0);
492 const size_t mode)
override;
517 typedef std::tuple<int, int, int>
Mode;
535 const size_t mode)
override;
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
#define LIB_UTILITIES_EXPORT
Specialisation of the NodalUtil class to support nodal hex elements.
size_t v_NumModes() override
Calculate the number of degrees of freedom for this element.
NekVector< NekDouble > v_OrthoBasis(const size_t mode) override
Return the value of the modal functions for the hex element at the nodal points m_xi for a given mode...
NekDouble v_ModeZeroIntegral() override
Return the value of the integral of the zero-th mode for this element.
NekVector< NekDouble > v_OrthoBasisDeriv(const size_t dir, const size_t mode) override
Return the values of the derivative of the orthogonal basis at the nodal points for a given mode.
std::vector< Mode > m_ordering
Mapping from the indexing of the basis to a continuous ordering.
std::shared_ptr< NodalUtil > v_CreateUtil(Array< OneD, Array< OneD, NekDouble > > &xi) override
Construct a NodalUtil object of the appropriate element type for a given set of points.
std::tuple< int, int, int > Mode
A class to assist in the construction of nodal simplex and hybrid elements in two and three dimension...
virtual ~NodalUtil()=default
size_t m_dim
Dimension of the nodal element.
SharedMatrix GetDerivMatrix(size_t dir)
Return the derivative matrix for the nodal distribution.
virtual std::shared_ptr< NodalUtil > v_CreateUtil(Array< OneD, Array< OneD, NekDouble > > &xi)=0
Construct a NodalUtil object of the appropriate element type for a given set of points.
Array< OneD, Array< OneD, NekDouble > > m_xi
Coordinates of the nodal points defining the basis.
NekVector< NekDouble > GetWeights()
Obtain the integration weights for the given nodal distribution.
SharedMatrix GetVandermonde()
Return the Vandermonde matrix for the nodal distribution.
virtual NekVector< NekDouble > v_OrthoBasisDeriv(const size_t dir, const size_t mode)=0
Return the values of the derivative of the orthogonal basis at the nodal points for a given mode.
size_t m_degree
Degree of the nodal element.
size_t m_numPoints
Total number of nodal points.
SharedMatrix GetVandermondeForDeriv(size_t dir)
Return the Vandermonde matrix of the derivative of the basis functions for the nodal distribution.
virtual NekDouble v_ModeZeroIntegral()=0
Return the value of the integral of the zero-th mode for this element.
virtual NekVector< NekDouble > v_OrthoBasis(const size_t mode)=0
Return the values of the orthogonal basis at the nodal points for a given mode.
virtual size_t v_NumModes()=0
Calculate the number of degrees of freedom for this element.
SharedMatrix GetInterpolationMatrix(Array< OneD, Array< OneD, NekDouble > > &xi)
Construct the interpolation matrix used to evaluate the basis at the points xi inside the element.
NodalUtil(size_t degree, size_t dim)
Set up the NodalUtil object.
Specialisation of the NodalUtil class to support nodal prismatic elements.
std::shared_ptr< NodalUtil > v_CreateUtil(Array< OneD, Array< OneD, NekDouble > > &xi) override
Construct a NodalUtil object of the appropriate element type for a given set of points.
NekVector< NekDouble > v_OrthoBasisDeriv(const size_t dir, const size_t mode) override
Return the value of the derivative of the modal functions for the prismatic element at the nodal poin...
static void CartesianOrdering(const int nq, Array< OneD, int > &sorted)
Array< OneD, Array< OneD, NekDouble > > m_eta
Collapsed coordinates of the nodal points.
std::vector< Mode > m_ordering
Mapping from the indexing of the basis to a continuous ordering.
NekVector< NekDouble > v_OrthoBasis(const size_t mode) override
Return the value of the modal functions for the prismatic element at the nodal points m_xi for a give...
size_t v_NumModes() override
Calculate the number of degrees of freedom for this element.
~NodalUtilPrism() override
std::tuple< int, int, int > Mode
NekDouble v_ModeZeroIntegral() override
Return the value of the integral of the zero-th mode for this element.
Specialisation of the NodalUtil class to support nodal quad elements.
std::shared_ptr< NodalUtil > v_CreateUtil(Array< OneD, Array< OneD, NekDouble > > &xi) override
Construct a NodalUtil object of the appropriate element type for a given set of points.
NekDouble v_ModeZeroIntegral() override
Return the value of the integral of the zero-th mode for this element.
~NodalUtilQuad() override
std::vector< std::pair< int, int > > m_ordering
Mapping from the indexing of the basis to a continuous ordering.
size_t v_NumModes() override
Calculate the number of degrees of freedom for this element.
NekVector< NekDouble > v_OrthoBasis(const size_t mode) override
Return the value of the modal functions for the quad element at the nodal points m_xi for a given mod...
NekVector< NekDouble > v_OrthoBasisDeriv(const size_t dir, const size_t mode) override
Return the value of the derivative of the modal functions for the quadrilateral element at the nodal ...
Specialisation of the NodalUtil class to support nodal tetrahedral elements.
NekDouble v_ModeZeroIntegral() override
Return the value of the integral of the zero-th mode for this element.
std::tuple< int, int, int > Mode
NekVector< NekDouble > v_OrthoBasis(const size_t mode) override
Return the value of the modal functions for the tetrahedral element at the nodal points m_xi for a gi...
Array< OneD, Array< OneD, NekDouble > > m_eta
Collapsed coordinates of the nodal points.
std::shared_ptr< NodalUtil > v_CreateUtil(Array< OneD, Array< OneD, NekDouble > > &xi) override
Construct a NodalUtil object of the appropriate element type for a given set of points.
size_t v_NumModes() override
Calculate the number of degrees of freedom for this element.
NekVector< NekDouble > v_OrthoBasisDeriv(const size_t dir, const size_t mode) override
Return the value of the derivative of the modal functions for the tetrahedral element at the nodal po...
std::vector< Mode > m_ordering
Mapping from the indexing of the basis to a continuous ordering.
static void CartesianOrdering(const int nq, Array< OneD, int > &sorted)
~NodalUtilTetrahedron() override
Specialisation of the NodalUtil class to support nodal triangular elements.
NekVector< NekDouble > v_OrthoBasisDeriv(const size_t dir, const size_t mode) override
Return the value of the derivative of the modal functions for the triangular element at the nodal poi...
~NodalUtilTriangle() override
std::vector< std::pair< int, int > > m_ordering
Mapping from the indexing of the basis to a continuous ordering.
NekDouble v_ModeZeroIntegral() override
Return the value of the integral of the zero-th mode for this element.
static void CartesianOrdering(const int nq, Array< OneD, int > &sorted)
size_t v_NumModes() override
Calculate the number of degrees of freedom for this element.
std::shared_ptr< NodalUtil > v_CreateUtil(Array< OneD, Array< OneD, NekDouble > > &xi) override
Construct a NodalUtil object of the appropriate element type for a given set of points.
Array< OneD, Array< OneD, NekDouble > > m_eta
Collapsed coordinates of the nodal points.
NekVector< NekDouble > v_OrthoBasis(const size_t mode) override
Return the value of the modal functions for the triangular element at the nodal points m_xi for a giv...
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< NekMatrix< NekDouble > > SharedMatrix
scalarT< T > sqrt(scalarT< T > in)