95 #ifndef __INTREPID2_POLYLIB_HPP__
96 #define __INTREPID2_POLYLIB_HPP__
98 #include "Intrepid2_ConfigDefs.hpp"
103 #include "Kokkos_Core.hpp"
105 namespace Intrepid2 {
207 static constexpr ordinal_type MaxPolylibIteration = 50;
208 static constexpr ordinal_type MaxPolylibOrder =
211 static constexpr ordinal_type MaxPolylibPoint = MaxPolylibOrder/2+2;
236 template<EPolyType polyType>
238 template<
typename zViewType,
240 KOKKOS_INLINE_FUNCTION
242 getValues( zViewType z,
244 const ordinal_type np,
249 template<
typename zViewType,
251 KOKKOS_INLINE_FUNCTION
253 getCubature( zViewType z,
255 const ordinal_type np,
258 const EPolyType poly) {
265 INTREPID2_TEST_FOR_ABORT(
true,
266 ">>> ERROR (Polylib::Serial::getCubature): Not supported poly type.");
283 template<EPolyType polyType>
285 template<
typename DViewType,
287 KOKKOS_INLINE_FUNCTION
289 getValues( DViewType D,
291 const ordinal_type np,
296 template<
typename DViewType,
298 KOKKOS_INLINE_FUNCTION
300 getDerivative( DViewType D,
302 const ordinal_type np,
305 const EPolyType poly) {
312 INTREPID2_TEST_FOR_ABORT(
true,
313 ">>> ERROR (Polylib::Serial::getDerivative): Not supported poly type.");
381 template<EPolyType polyType>
383 template<
typename zViewType>
384 KOKKOS_INLINE_FUNCTION
385 static typename zViewType::value_type
386 getValue(
const ordinal_type i,
387 const typename zViewType::value_type z,
389 const ordinal_type np,
394 template<
typename zViewType>
395 KOKKOS_INLINE_FUNCTION
396 static typename zViewType::value_type
397 getLagrangianInterpolant(
const ordinal_type i,
398 const typename zViewType::value_type z,
400 const ordinal_type np,
403 const EPolyType poly) {
404 typename zViewType::value_type r_val = 0;
411 INTREPID2_TEST_FOR_ABORT(
true,
412 ">>> ERROR (Polylib::Serial::getLagrangianInterpolant): Not supported poly type.");
432 template<EPolyType polyType>
434 template<
typename imViewType,
435 typename zgrjViewType,
437 KOKKOS_INLINE_FUNCTION
439 getMatrix( imViewType im,
440 const zgrjViewType zgrj,
442 const ordinal_type nz,
443 const ordinal_type mz,
448 template<
typename imViewType,
449 typename zgrjViewType,
451 KOKKOS_INLINE_FUNCTION
453 getInterpolationOperator( imViewType im,
454 const zgrjViewType zgrj,
456 const ordinal_type nz,
457 const ordinal_type mz,
460 const EPolyType poly) {
467 INTREPID2_TEST_FOR_ABORT(
true,
468 ">>> ERROR (Polylib::Serial::getInterpolationOperator): Not supported poly type.");
517 template<
typename zViewType,
518 typename polyiViewType,
519 typename polydViewType>
520 KOKKOS_INLINE_FUNCTION
524 polyiViewType poly_in,
526 const ordinal_type n,
544 template<
typename zViewType,
545 typename polydViewType>
546 KOKKOS_INLINE_FUNCTION
551 const ordinal_type n,
565 template<
typename zViewType,
566 bool DeflationEnabled =
false>
567 KOKKOS_INLINE_FUNCTION
570 const ordinal_type n,
574 template<
typename zViewType>
575 KOKKOS_INLINE_FUNCTION
577 JacobiZerosPolyDeflation( zViewType z,
578 const ordinal_type n,
582 template<
typename aViewType>
583 KOKKOS_INLINE_FUNCTION
585 JacobiZerosTriDiagonal( aViewType a,
586 const ordinal_type n,
612 template<
typename aViewType,
614 KOKKOS_INLINE_FUNCTION
618 const ordinal_type n,
646 template<
typename dViewType,
648 KOKKOS_INLINE_FUNCTION
652 const ordinal_type n);
664 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.