131 const size_t mode) = 0;
188 const size_t mode)
override;
199 return 2.0 *
sqrt(2.0);
214 typedef std::tuple<int, int, int>
Mode;
237 const size_t mode)
override;
248 return 8.0 *
sqrt(2.0) / 3.0;
263 typedef std::tuple<int, int, int>
Mode;
285 const size_t mode)
override;
296 return 4.0 *
sqrt(2.0);
325 const size_t mode)
override;
350 typedef std::tuple<int, int, int>
Mode;
368 const size_t mode)
override;
#define LIB_UTILITIES_EXPORT
Specialisation of the NodalUtil class to support nodal hex elements.
virtual 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...
virtual 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.
NodalUtilHex(size_t degree, Array< OneD, NekDouble > r, Array< OneD, NekDouble > s, Array< OneD, NekDouble > t)
Construct the nodal utility class for a hexahedron.
virtual 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.
virtual size_t v_NumModes() override
Calculate the number of degrees of freedom for this element.
std::vector< Mode > m_ordering
Mapping from the indexing of the basis to a continuous ordering.
std::tuple< int, int, int > Mode
virtual NekDouble v_ModeZeroIntegral() override
Return the value of the integral of the zero-th mode for this element.
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.
virtual 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...
NodalUtilPrism(size_t degree, Array< OneD, NekDouble > r, Array< OneD, NekDouble > s, Array< OneD, NekDouble > t)
Construct the nodal utility class for a prism.
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.
virtual 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...
virtual NekDouble v_ModeZeroIntegral() override
Return the value of the integral of the zero-th mode for this element.
virtual size_t v_NumModes() override
Calculate the number of degrees of freedom for this element.
virtual ~NodalUtilPrism()
virtual 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
Specialisation of the NodalUtil class to support nodal quad elements.
virtual size_t v_NumModes() override
Calculate the number of degrees of freedom for this element.
virtual NekDouble v_ModeZeroIntegral() override
Return the value of the integral of the zero-th mode for this element.
NodalUtilQuad(size_t degree, Array< OneD, NekDouble > r, Array< OneD, NekDouble > s)
Construct the nodal utility class for a quadrilateral.
virtual 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::vector< std::pair< int, int > > m_ordering
Mapping from the indexing of the basis to a continuous ordering.
virtual 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...
virtual 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.
std::tuple< int, int, int > Mode
virtual 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.
virtual size_t v_NumModes() override
Calculate the number of degrees of freedom for this element.
virtual 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...
NodalUtilTetrahedron(size_t degree, Array< OneD, NekDouble > r, Array< OneD, NekDouble > s, Array< OneD, NekDouble > t)
Construct the nodal utility class for a tetrahedron.
std::vector< Mode > m_ordering
Mapping from the indexing of the basis to a continuous ordering.
virtual 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.
virtual ~NodalUtilTetrahedron()
virtual 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 triangular elements.
virtual 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...
virtual NekDouble v_ModeZeroIntegral() override
Return the value of the integral of the zero-th mode for this element.
std::vector< std::pair< int, int > > m_ordering
Mapping from the indexing of the basis to a continuous ordering.
virtual size_t v_NumModes() override
Calculate the number of degrees of freedom for this element.
NodalUtilTriangle(size_t degree, Array< OneD, NekDouble > r, Array< OneD, NekDouble > s)
Construct the nodal utility class for a triangle.
virtual 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.
virtual ~NodalUtilTriangle()
Array< OneD, Array< OneD, NekDouble > > m_eta
Collapsed coordinates of the nodal points.
virtual 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
The above copyright notice and this permission notice shall be included.
scalarT< T > sqrt(scalarT< T > in)