|
Nektar++
|
Specialisation of the NodalUtil class to support nodal pyramidic elements. More...
#include <NodalUtil.h>
Public Member Functions | |
| NodalUtilPyr (size_t degree, Array< OneD, NekDouble > r, Array< OneD, NekDouble > s, Array< OneD, NekDouble > t) | |
| Construct the nodal utility class for a pyramid. | |
| ~NodalUtilPyr () override | |
Public Member Functions inherited from Nektar::LibUtilities::NodalUtil | |
| virtual | ~NodalUtil ()=default |
| NekVector< NekDouble > | GetWeights () |
| Obtain the integration weights for the given nodal distribution. | |
| SharedMatrix | GetVandermonde () |
| Return the Vandermonde matrix for the nodal distribution. | |
| SharedMatrix | GetVandermondeForDeriv (size_t dir) |
| Return the Vandermonde matrix of the derivative of the basis functions for the nodal distribution. | |
| SharedMatrix | GetDerivMatrix (size_t dir) |
| Return the derivative matrix for the nodal distribution. | |
| SharedMatrix | GetInterpolationMatrix (Array< OneD, Array< OneD, NekDouble > > &xi) |
Construct the interpolation matrix used to evaluate the basis at the points xi inside the element. | |
Static Public Member Functions | |
| static void | CartesianOrdering (const int nq, Array< OneD, int > &sorted) |
| Set up mapping from point ordering (vert, edge, face, interior) to increasing point ordering in Cartesian type format. | |
Protected Member Functions | |
| NekVector< NekDouble > | v_OrthoBasis (const size_t mode) override |
| Return the value of the modal functions for the pyramidic element at the nodal points m_xi for a given mode. | |
| 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 pyramidic element at the nodal points m_xi for a given mode. | |
| 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. | |
| size_t | v_NumModes () override |
| Calculate the number of degrees of freedom for this element. | |
Protected Member Functions inherited from Nektar::LibUtilities::NodalUtil | |
| NodalUtil (size_t degree, size_t dim) | |
| Set up the NodalUtil object. | |
Protected Attributes | |
| std::vector< Mode > | m_ordering |
| Mapping from the \( (i,j,k) \) indexing of the basis to a continuous ordering. | |
| Array< OneD, Array< OneD, NekDouble > > | m_eta |
| Collapsed coordinates \( (\eta_1, \eta_2, \eta_3) \) of the nodal points. | |
Protected Attributes inherited from Nektar::LibUtilities::NodalUtil | |
| size_t | m_dim |
| Dimension of the nodal element. | |
| size_t | m_degree |
| Degree of the nodal element. | |
| size_t | m_numPoints |
| Total number of nodal points. | |
| Array< OneD, Array< OneD, NekDouble > > | m_xi |
| Coordinates of the nodal points defining the basis. | |
Private Types | |
| typedef std::tuple< int, int, int > | Mode |
Specialisation of the NodalUtil class to support nodal pyramidic elements.
The orthogonal basis on the pyramid is constructed using the collapsed coordinate system \( (\eta_1,\eta_2,\eta_3) \), in which both \( \xi_1 \) and \( \xi_2 \) collapse towards the apex as \( \xi_3 \to 1 \). Since the base of the pyramid is a square (rather than the nested triangular collapse seen in the tetrahedron), the appropriate collapsing exponent for a given mode \( (i,j,k) \) is \( m = \max(i,j) \), rather than a cumulative sum of indices. See Bergot, Cohen & Duruflé (2010) or Sherwin & Karniadakis for further details of this basis.
Definition at line 483 of file NodalUtil.h.
|
private |
Definition at line 485 of file NodalUtil.h.
| Nektar::LibUtilities::NodalUtilPyr::NodalUtilPyr | ( | size_t | degree, |
| Array< OneD, NekDouble > | r, | ||
| Array< OneD, NekDouble > | s, | ||
| Array< OneD, NekDouble > | t | ||
| ) |
Construct the nodal utility class for a pyramid.
The constructor of this class sets up two member variables used in the evaluation of the orthogonal basis:
Note that unlike the tetrahedron – where the collapsing exponents for the second and third coordinate directions accumulate as \( i \) and \( i+j \) respectively, owing to the nested triangular collapse – the pyramid's base is a square and both \( \xi_1 \) and \( \xi_2 \) collapse independently and symmetrically towards the apex as \( \xi_3 \to 1 \). The correct collapsing exponent for a mode \( (i,j,k) \) is therefore \( m = \max(i,j) \); see Bergot, Cohen & Duruflé, "Higher-order finite elements for hybrid meshes using new nodal pyramidal elements" (2010), or Sherwin & Karniadakis.
| degree | Polynomial order of this nodal pyramid. |
| r | \( \xi_1 \)-coordinates of nodal points in the standard element. |
| s | \( \xi_2 \)-coordinates of nodal points in the standard element. |
| t | \( \xi_3 \)-coordinates of nodal points in the standard element. |
Definition at line 847 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 492 of file NodalUtil.h.
|
inlinestatic |
Set up mapping from point ordering (vert, edge, face, interior) to increasing point ordering in Cartesian type format.
This is the ordering constructed by NodalPyrEvenlySpaced::NodalPointReorder3d: 5 vertices, 8 edges (01, 12, 23, 30 around the base; 04, 14, 24, 34 to the apex), 5 faces (0123 the quadrilateral base; 014, 124, 234, 034 the triangular sides), then interior (volume) points. Unlike the tetrahedron and prism, none of the edge or face blocks need to be traversed in reverse here, since – by construction – both this routine and the nodal point generator walk the standard element in the same (z outer, y middle, x inner) raster order.
Definition at line 509 of file NodalUtil.h.
References ASSERTL1.
Referenced by Nektar::QuadEquiSpaced::BOOST_AUTO_TEST_CASE().
|
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 650 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 657 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 662 of file NodalUtil.h.
References Nektar::LibUtilities::NodalUtil::m_degree.
|
overrideprotectedvirtual |
Return the value of the modal functions for the pyramidic element at the nodal points m_xi for a given mode.
In a pyramid, we use the orthogonal basis
\[ \psi_{m(ijk)} = \sqrt{8} P^{(0,0)}_i(\eta_1) P_j^{(0,0)}(\eta_2) P_k^{(2m+2,0)}(\eta_3) (1-\eta_3)^{m}, \qquad m = \max(i,j) \]
where \( m(ijk) \) is the mapping defined in 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 907 of file NodalUtil.cpp.
References Polylib::jacobfd(), m_eta, Nektar::LibUtilities::NodalUtil::m_numPoints, m_ordering, and tinysimd::sqrt().
|
overrideprotectedvirtual |
Return the value of the derivative of the modal functions for the pyramidic 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, in a similar fashion to the tetrahedral and prismatic cases. However, since both \( \xi_1 \) and \( \xi_2 \) collapse independently through \( \xi_3 \) (rather than \( \xi_2 \) collapsing through \( \xi_3 \) alone, as in the tetrahedron), the derivative in the \( \xi_3 \) direction picks up chain-rule contributions from both the \( \eta_1 \) and \( \eta_2 \) directions.
| 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 952 of file NodalUtil.cpp.
References Polylib::jacobd(), Polylib::jacobfd(), m_eta, Nektar::LibUtilities::NodalUtil::m_numPoints, m_ordering, and tinysimd::sqrt().
Collapsed coordinates \( (\eta_1, \eta_2, \eta_3) \) of the nodal points.
Definition at line 644 of file NodalUtil.h.
Referenced by NodalUtilPyr(), v_OrthoBasis(), and v_OrthoBasisDeriv().
|
protected |
Mapping from the \( (i,j,k) \) indexing of the basis to a continuous ordering.
Definition at line 640 of file NodalUtil.h.
Referenced by NodalUtilPyr(), v_OrthoBasis(), and v_OrthoBasisDeriv().