|
Nektar++
|
Specialisation of the NodalUtil class to support nodal triangular elements. More...
#include <NodalUtil.h>
Public Member Functions | |
| NodalUtilTriangle (size_t degree, Array< OneD, NekDouble > r, Array< OneD, NekDouble > s) | |
| Construct the nodal utility class for a triangle. More... | |
| ~NodalUtilTriangle () override | |
Public Member Functions inherited from Nektar::LibUtilities::NodalUtil | |
| virtual | ~NodalUtil ()=default |
| NekVector< NekDouble > | GetWeights () |
| Obtain the integration weights for the given nodal distribution. More... | |
| SharedMatrix | GetVandermonde () |
| Return the Vandermonde matrix for the nodal distribution. More... | |
| SharedMatrix | GetVandermondeForDeriv (size_t dir) |
| Return the Vandermonde matrix of the derivative of the basis functions for the nodal distribution. More... | |
| SharedMatrix | GetDerivMatrix (size_t dir) |
| Return the derivative matrix for the nodal distribution. More... | |
| SharedMatrix | GetInterpolationMatrix (Array< OneD, Array< OneD, NekDouble > > &xi) |
Construct the interpolation matrix used to evaluate the basis at the points xi inside the element. More... | |
Protected Member Functions | |
| 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 given mode. More... | |
| 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 points m_xi for a given mode. More... | |
| 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. More... | |
| NekDouble | v_ModeZeroIntegral () override |
| Return the value of the integral of the zero-th mode for this element. More... | |
| size_t | v_NumModes () override |
| Calculate the number of degrees of freedom for this element. More... | |
Protected Member Functions inherited from Nektar::LibUtilities::NodalUtil | |
| NodalUtil (size_t degree, size_t dim) | |
| Set up the NodalUtil object. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| virtual NekDouble | v_ModeZeroIntegral ()=0 |
| Return the value of the integral of the zero-th mode for this element. More... | |
| virtual size_t | v_NumModes ()=0 |
| Calculate the number of degrees of freedom for this element. More... | |
Protected Attributes | |
| std::vector< std::pair< int, int > > | m_ordering |
| Mapping from the \( (i,j) \) indexing of the basis to a continuous ordering. More... | |
| Array< OneD, Array< OneD, NekDouble > > | m_eta |
| Collapsed coordinates \( (\eta_1, \eta_2) \) of the nodal points. More... | |
Protected Attributes inherited from Nektar::LibUtilities::NodalUtil | |
| size_t | m_dim |
| Dimension of the nodal element. More... | |
| size_t | m_degree |
| Degree of the nodal element. More... | |
| size_t | m_numPoints |
| Total number of nodal points. More... | |
| Array< OneD, Array< OneD, NekDouble > > | m_xi |
| Coordinates of the nodal points defining the basis. More... | |
Specialisation of the NodalUtil class to support nodal triangular elements.
Definition at line 165 of file NodalUtil.h.
| Nektar::LibUtilities::NodalUtilTriangle::NodalUtilTriangle | ( | size_t | degree, |
| Array< OneD, NekDouble > | r, | ||
| Array< OneD, NekDouble > | s | ||
| ) |
Construct the nodal utility class for a triangle.
The constructor of this class sets up two member variables used in the evaluation of the orthogonal basis:
| degree | Polynomial order of this nodal triangle. |
| r | \( \xi_1 \)-coordinates of nodal points in the standard element. |
| s | \( \xi_2 \)-coordinates of nodal points in the standard element. |
Definition at line 234 of file NodalUtil.cpp.
References Nektar::NekConstants::kNekZeroTol, Nektar::LibUtilities::NodalUtil::m_degree, m_eta, Nektar::LibUtilities::NodalUtil::m_numPoints, m_ordering, and Nektar::LibUtilities::NodalUtil::m_xi.
|
inlineoverride |
Definition at line 172 of file NodalUtil.h.
|
inlineoverrideprotectedvirtual |
Construct a NodalUtil object of the appropriate element type for a given set of points.
This function is used inside NodalUtil::GetInterpolationMatrix so that the (potentially non-square) Vandermonde matrix can be constructed to create the interpolation matrix at an arbitrary set of points in the domain.
| xi | Distribution of nodal points to create utility with. |
Implements Nektar::LibUtilities::NodalUtil.
Definition at line 188 of file NodalUtil.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and Nektar::LibUtilities::NodalUtil::m_degree.
|
inlineoverrideprotectedvirtual |
Return the value of the integral of the zero-th mode for this element.
Note that for the orthogonal basis under consideration, all modes integrate to zero asides from the zero-th mode. This function is used in NodalUtil::GetWeights to determine integration weights.
Implements Nektar::LibUtilities::NodalUtil.
Definition at line 195 of file NodalUtil.h.
References tinysimd::sqrt().
|
inlineoverrideprotectedvirtual |
Calculate the number of degrees of freedom for this element.
Implements Nektar::LibUtilities::NodalUtil.
Definition at line 200 of file NodalUtil.h.
References Nektar::LibUtilities::NodalUtil::m_degree.
|
overrideprotectedvirtual |
Return the value of the modal functions for the triangular element at the nodal points m_xi for a given mode.
In a triangle, we use the orthogonal basis
\[ \psi_{m(ij)} = \sqrt{2} P^{(0,0)}_i(\xi_1) P_j^{(2i+1,0)}(\xi_2) (1-\xi_2)^i \]
where \( m(ij) \) is the mapping defined in NodalUtilTriangle::m_ordering and \( J_n^{(\alpha,\beta)}(z) \) denotes the standard Jacobi polynomial.
| mode | The mode of the orthogonal basis to evaluate. |
Implements Nektar::LibUtilities::NodalUtil.
Definition at line 289 of file NodalUtil.cpp.
References Polylib::jacobfd(), m_eta, Nektar::LibUtilities::NodalUtil::m_numPoints, m_ordering, CG_Iterations::modes, and tinysimd::sqrt().
|
overrideprotectedvirtual |
Return the value of the derivative of the modal functions for the triangular element at the nodal points m_xi for a given mode.
Note that this routine must use the chain rule combined with the collapsed coordinate derivatives as described in Sherwin & Karniadakis (2nd edition), pg 150.
| dir | Coordinate direction in which to evaluate the derivative. |
| mode | The mode of the orthogonal basis to evaluate. |
Implements Nektar::LibUtilities::NodalUtil.
Definition at line 326 of file NodalUtil.cpp.
References Polylib::jacobd(), Polylib::jacobfd(), m_eta, Nektar::LibUtilities::NodalUtil::m_numPoints, m_ordering, CG_Iterations::modes, and tinysimd::sqrt().
Collapsed coordinates \( (\eta_1, \eta_2) \) of the nodal points.
Definition at line 182 of file NodalUtil.h.
Referenced by NodalUtilTriangle(), v_OrthoBasis(), and v_OrthoBasisDeriv().
|
protected |
Mapping from the \( (i,j) \) indexing of the basis to a continuous ordering.
Definition at line 179 of file NodalUtil.h.
Referenced by NodalUtilTriangle(), v_OrthoBasis(), and v_OrthoBasisDeriv().