62 #ifndef __INTREPID2_POLYLIB_HPP__
63 #define __INTREPID2_POLYLIB_HPP__
65 #include "Intrepid2_ConfigDefs.hpp"
70 #include "Kokkos_Core.hpp"
174 static constexpr ordinal_type MaxPolylibIteration = 50;
175 static constexpr ordinal_type MaxPolylibOrder =
204 template<EPolyType polyType>
206 template<
typename zViewType,
208 KOKKOS_INLINE_FUNCTION
210 getValues( zViewType z,
212 const ordinal_type np,
217 template<
typename zViewType,
219 KOKKOS_INLINE_FUNCTION
221 getCubature( zViewType z,
223 const ordinal_type np,
226 const EPolyType poly) {
233 INTREPID2_TEST_FOR_ABORT(
true,
234 ">>> ERROR (Polylib::Serial::getCubature): Not supported poly type.");
251 template<EPolyType polyType>
253 template<
typename DViewType,
255 KOKKOS_INLINE_FUNCTION
257 getValues( DViewType D,
259 const ordinal_type np,
264 template<
typename DViewType,
266 KOKKOS_INLINE_FUNCTION
268 getDerivative( DViewType D,
270 const ordinal_type np,
273 const EPolyType poly) {
280 INTREPID2_TEST_FOR_ABORT(
true,
281 ">>> ERROR (Polylib::Serial::getDerivative): Not supported poly type.");
349 template<EPolyType polyType>
351 template<
typename zViewType>
352 KOKKOS_INLINE_FUNCTION
353 static typename zViewType::value_type
354 getValue(
const ordinal_type i,
355 const typename zViewType::value_type z,
357 const ordinal_type np,
362 template<
typename zViewType>
363 KOKKOS_INLINE_FUNCTION
364 static typename zViewType::value_type
365 getLagrangianInterpolant(
const ordinal_type i,
366 const typename zViewType::value_type z,
368 const ordinal_type np,
371 const EPolyType poly) {
372 typename zViewType::value_type r_val = 0;
379 INTREPID2_TEST_FOR_ABORT(
true,
380 ">>> ERROR (Polylib::Serial::getLagrangianInterpolant): Not supported poly type.");
400 template<EPolyType polyType>
402 template<
typename imViewType,
403 typename zgrjViewType,
405 KOKKOS_INLINE_FUNCTION
407 getMatrix( imViewType im,
408 const zgrjViewType zgrj,
410 const ordinal_type nz,
411 const ordinal_type mz,
416 template<
typename imViewType,
417 typename zgrjViewType,
419 KOKKOS_INLINE_FUNCTION
421 getInterpolationOperator( imViewType im,
422 const zgrjViewType zgrj,
424 const ordinal_type nz,
425 const ordinal_type mz,
428 const EPolyType poly) {
435 INTREPID2_TEST_FOR_ABORT(
true,
436 ">>> ERROR (Polylib::Serial::getInterpolationOperator): Not supported poly type.");
485 template<
typename zViewType,
486 typename polyiViewType,
487 typename polydViewType>
488 KOKKOS_INLINE_FUNCTION
492 polyiViewType poly_in,
494 const ordinal_type n,
512 template<
typename zViewType,
513 typename polydViewType>
514 KOKKOS_INLINE_FUNCTION
519 const ordinal_type n,
533 template<
typename zViewType,
534 bool DeflationEnabled =
false>
535 KOKKOS_INLINE_FUNCTION
538 const ordinal_type n,
542 template<
typename zViewType>
543 KOKKOS_INLINE_FUNCTION
545 JacobiZerosPolyDeflation( zViewType z,
546 const ordinal_type n,
550 template<
typename aViewType>
551 KOKKOS_INLINE_FUNCTION
553 JacobiZerosTriDiagonal( aViewType a,
554 const ordinal_type n,
580 template<
typename aViewType,
582 KOKKOS_INLINE_FUNCTION
586 const ordinal_type n,
614 template<
typename dViewType,
616 KOKKOS_INLINE_FUNCTION
620 const ordinal_type n);
632 KOKKOS_INLINE_FUNCTION
Providing orthogonal polynomial calculus and interpolation, created by Spencer Sherwin, Aeronautics, Imperial College London, modified and redistributed by D. Ridzal.
Gauss-Jacobi/Gauss-Radau-Jacobi/Gauss-Lobatto zeros and weights.
Compute the value of the i th Lagrangian interpolant through the np Gauss-Jacobi/Gauss-Radau-Jacobi/G...
static KOKKOS_INLINE_FUNCTION void JacobiPolynomialDerivative(const ordinal_type np, const zViewType z, polydViewType polyd, const ordinal_type n, const double alpha, const double beta)
Calculate the derivative of Jacobi polynomials.
Header function for Intrepid2::Util class and other utility functions.
static KOKKOS_INLINE_FUNCTION void JacobiPolynomial(const ordinal_type np, const zViewType z, polyiViewType poly_in, polydViewType polyd, const ordinal_type n, const double alpha, const double beta)
Routine to calculate Jacobi polynomials, , and their first derivative, .
Definition file for a set of functions providing orthogonal polynomial calculus and interpolation...
Interpolation Operator from Gauss-Jacobi points to an arbitrary distribution at points zm...
Compute the Derivative Matrix and its transpose associated with the Gauss-Jacobi/Gauss-Radau-Jacobi/G...
Contains definitions of custom data types in Intrepid2.
static KOKKOS_INLINE_FUNCTION void JacobiZeros(zViewType z, const ordinal_type n, const double alpha, const double beta)
Calculate the n zeros, z, of the Jacobi polynomial, i.e. .
static KOKKOS_INLINE_FUNCTION double GammaFunction(const double x)
Calculate the Gamma function , , for integer values x and halves.
static constexpr ordinal_type MaxCubatureDegreeEdge
The maximum degree of the polynomial that can be integrated exactly by a direct edge rule...
static KOKKOS_INLINE_FUNCTION void TriQL(dViewType d, eViewType e, const ordinal_type n)
QL algorithm for symmetric tridiagonal matrix.
static constexpr ordinal_type MaxOrder
The maximum reconstruction order.