Nektar++
|
The namespace associated with the the Polylib library (Polylib introduction) More...
Functions | |
static void | Jacobz (const int n, double *z, const double alpha, const double beta) |
Calculate the n zeros, z, of the Jacobi polynomial, i.e. | |
static void | TriQL (const int n, double *d, double *e, double **z) |
QL algorithm for symmetric tridiagonal matrix. | |
double | gammaF (const double x) |
Calculate the Gamma function , , for integer. | |
static void | RecCoeff (const int n, double *a, double *b, const double alpha, const double beta) |
The routine finds the recurrence coefficients a and. | |
void | JKMatrix (int n, double *a, double *b) |
Calcualtes the Jacobi-kronrod matrix by determining the. | |
void | chri1 (int n, double *a, double *b, double *a0, double *b0, double z) |
Given a weight function through the first n+1. | |
void | zwgj (double *z, double *w, const int np, const double alpha, const double beta) |
Gauss-Jacobi zeros and weights. | |
void | zwgrjm (double *z, double *w, const int np, const double alpha, const double beta) |
Gauss-Radau-Jacobi zeros and weights with end point at z=-1. | |
void | zwgrjp (double *z, double *w, const int np, const double alpha, const double beta) |
Gauss-Radau-Jacobi zeros and weights with end point at z=1. | |
void | zwglj (double *z, double *w, const int np, const double alpha, const double beta) |
Gauss-Lobatto-Jacobi zeros and weights with end point at z=-1,1. | |
void | zwgk (double *z, double *w, const int npt, const double alpha, const double beta) |
Gauss-Kronrod-Jacobi zeros and weights. | |
void | zwrk (double *z, double *w, const int npt, const double alpha, const double beta) |
Gauss-Radau-Kronrod-Jacobi zeros and weights. | |
void | zwlk (double *z, double *w, const int npt, const double alpha, const double beta) |
Gauss-Lobatto-Kronrod-Jacobi zeros and weights. | |
void | Dgj (double *D, const double *z, const int np, const double alpha, const double beta) |
Compute the Derivative Matrix and its transpose associated. | |
void | Dgrjm (double *D, const double *z, const int np, const double alpha, const double beta) |
Compute the Derivative Matrix and its transpose associated. | |
void | Dgrjp (double *D, const double *z, const int np, const double alpha, const double beta) |
Compute the Derivative Matrix associated with the. | |
void | Dglj (double *D, const double *z, const int np, const double alpha, const double beta) |
Compute the Derivative Matrix associated with the. | |
double | hgj (const int i, const double z, const double *zgj, const int np, const double alpha, const double beta) |
Compute the value of the i th Lagrangian interpolant through. | |
double | hgrjm (const int i, const double z, const double *zgrj, const int np, const double alpha, const double beta) |
Compute the value of the i th Lagrangian interpolant through the. | |
double | hgrjp (const int i, const double z, const double *zgrj, const int np, const double alpha, const double beta) |
Compute the value of the i th Lagrangian interpolant through the. | |
double | hglj (const int i, const double z, const double *zglj, const int np, const double alpha, const double beta) |
Compute the value of the i th Lagrangian interpolant through the. | |
void | Imgj (double *im, const double *zgj, const double *zm, const int nz, const int mz, const double alpha, const double beta) |
Interpolation Operator from Gauss-Jacobi points to an. | |
void | Imgrjm (double *im, const double *zgrj, const double *zm, const int nz, const int mz, const double alpha, const double beta) |
Interpolation Operator from Gauss-Radau-Jacobi points. | |
void | Imgrjp (double *im, const double *zgrj, const double *zm, const int nz, const int mz, const double alpha, const double beta) |
Interpolation Operator from Gauss-Radau-Jacobi points. | |
void | Imglj (double *im, const double *zglj, const double *zm, const int nz, const int mz, const double alpha, const double beta) |
Interpolation Operator from Gauss-Lobatto-Jacobi points. | |
void | jacobfd (const int np, const double *z, double *poly_in, double *polyd, const int n, const double alpha, const double beta) |
Routine to calculate Jacobi polynomials, , and their first derivative, . | |
void | jacobd (const int np, const double *z, double *polyd, const int n, const double alpha, const double beta) |
Calculate the derivative of Jacobi polynomials. | |
void | JacZeros (const int n, double *a, double *b, const double alpha, const double beta) |
Zero and Weight determination through the eigenvalues and eigenvectors of a tridiagonal. |
The namespace associated with the the Polylib library (Polylib introduction)
void Polylib::chri1 | ( | int | n, |
double * | a, | ||
double * | b, | ||
double * | a0, | ||
double * | b0, | ||
double | z | ||
) |
Given a weight function through the first n+1.
coefficients a and b of its orthogonal polynomials
this routine generates the first n recurrence coefficients for the orthogonal
polynomials relative to the modified weight function .
The result will be placed in the array a0 and b0.
Definition at line 2926 of file Polylib.cpp.
Referenced by zwlk(), and zwrk().
void Polylib::Dgj | ( | double * | D, |
const double * | z, | ||
const int | np, | ||
const double | alpha, | ||
const double | beta | ||
) |
Compute the Derivative Matrix and its transpose associated.
with the Gauss-Jacobi zeros.
associated with the n_th order Lagrangian interpolants through the
np Gauss-Jacobi points z such that
Definition at line 932 of file Polylib.cpp.
References jacobd().
Referenced by Nektar::LibUtilities::GaussPoints::CalculateDerivMatrix(), and main().
void Polylib::Dglj | ( | double * | D, |
const double * | z, | ||
const int | np, | ||
const double | alpha, | ||
const double | beta | ||
) |
Compute the Derivative Matrix associated with the.
Gauss-Lobatto-Jacobi zeros.
order Lagrange interpolants through the np
Gauss-Lobatto-Jacobi points z such that
Definition at line 1216 of file Polylib.cpp.
References gammaF(), and jacobd().
Referenced by Nektar::LibUtilities::GaussPoints::CalculateDerivMatrix(), and main().
void Polylib::Dgrjm | ( | double * | D, |
const double * | z, | ||
const int | np, | ||
const double | alpha, | ||
const double | beta | ||
) |
Compute the Derivative Matrix and its transpose associated.
with the Gauss-Radau-Jacobi zeros with a zero at z=-1.
order Lagrangian interpolants through the np Gauss-Radau-Jacobi
points z such that
Definition at line 1018 of file Polylib.cpp.
References gammaF(), and jacobd().
Referenced by Nektar::LibUtilities::GaussPoints::CalculateDerivMatrix(), and main().
void Polylib::Dgrjp | ( | double * | D, |
const double * | z, | ||
const int | np, | ||
const double | alpha, | ||
const double | beta | ||
) |
Compute the Derivative Matrix associated with the.
Gauss-Radau-Jacobi zeros with a zero at z=1.
order Lagrangian interpolants through the np Gauss-Radau-Jacobi
points z such that
Definition at line 1116 of file Polylib.cpp.
References gammaF(), and jacobd().
Referenced by Nektar::LibUtilities::GaussPoints::CalculateDerivMatrix(), and main().
double Polylib::gammaF | ( | const double | x | ) |
Calculate the Gamma function , , for integer.
values and halves.
Determine the value of using:
where
Definition at line 2200 of file Polylib.cpp.
Referenced by Dglj(), Dgrjm(), Dgrjp(), RecCoeff(), zwgj(), zwglj(), zwgrjm(), and zwgrjp().
double Polylib::hgj | ( | const int | i, |
const double | z, | ||
const double * | zgj, | ||
const int | np, | ||
const double | alpha, | ||
const double | beta | ||
) |
Compute the value of the i th Lagrangian interpolant through.
the np Gauss-Jacobi points zgj at the arbitrary location z.
%
Definition at line 1340 of file Polylib.cpp.
References EPS, jacobd(), and jacobfd().
Referenced by Nektar::LibUtilities::Basis::GenBasis(), and Imgj().
double Polylib::hglj | ( | const int | i, |
const double | z, | ||
const double * | zglj, | ||
const int | np, | ||
const double | alpha, | ||
const double | beta | ||
) |
Compute the value of the i th Lagrangian interpolant through the.
np Gauss-Lobatto-Jacobi points zgrj at the arbitrary location
z.
%
Definition at line 1584 of file Polylib.cpp.
References EPS, jacobd(), and jacobfd().
Referenced by Nektar::LibUtilities::Basis::GenBasis(), and Imglj().
double Polylib::hgrjm | ( | const int | i, |
const double | z, | ||
const double * | zgrj, | ||
const int | np, | ||
const double | alpha, | ||
const double | beta | ||
) |
Compute the value of the i th Lagrangian interpolant through the.
np Gauss-Radau-Jacobi points zgrj at the arbitrary location
z. This routine assumes zgrj includes the point -1.
%
Definition at line 1416 of file Polylib.cpp.
References EPS, jacobd(), and jacobfd().
Referenced by Imgrjm().
double Polylib::hgrjp | ( | const int | i, |
const double | z, | ||
const double * | zgrj, | ||
const int | np, | ||
const double | alpha, | ||
const double | beta | ||
) |
Compute the value of the i th Lagrangian interpolant through the.
np Gauss-Radau-Jacobi points zgrj at the arbitrary location
z. This routine assumes zgrj includes the point +1.
%
Definition at line 1500 of file Polylib.cpp.
References EPS, jacobd(), and jacobfd().
Referenced by Imgrjp().
void Polylib::Imgj | ( | double * | im, |
const double * | zgj, | ||
const double * | zm, | ||
const int | nz, | ||
const int | mz, | ||
const double | alpha, | ||
const double | beta | ||
) |
Interpolation Operator from Gauss-Jacobi points to an.
arbitrary distribution at points zm
interpolate a function from at Gauss-Jacobi distribution of nz
zeros zgrj to an arbitrary distribution of mz points zm, i.e.
Definition at line 1652 of file Polylib.cpp.
References hgj().
Referenced by Nektar::LibUtilities::GaussPoints::CalculateInterpMatrix(), and main().
void Polylib::Imglj | ( | double * | im, |
const double * | zglj, | ||
const double * | zm, | ||
const int | nz, | ||
const int | mz, | ||
const double | alpha, | ||
const double | beta | ||
) |
Interpolation Operator from Gauss-Lobatto-Jacobi points.
to an arbitrary distrubtion at points zm
interpolate a function from at Gauss-Lobatto-Jacobi distribution of
nz zeros zgrj (where zgrj[0]=-1) to an arbitrary
distribution of mz points zm, i.e.
Definition at line 1832 of file Polylib.cpp.
References hglj().
Referenced by Nektar::LibUtilities::GaussPoints::CalculateInterpMatrix(), and main().
void Polylib::Imgrjm | ( | double * | im, |
const double * | zgrj, | ||
const double * | zm, | ||
const int | nz, | ||
const int | mz, | ||
const double | alpha, | ||
const double | beta | ||
) |
Interpolation Operator from Gauss-Radau-Jacobi points.
(including z=-1) to an arbitrary distrubtion at points zm
interpolate a function from at Gauss-Radau-Jacobi distribution of
nz zeros zgrj (where zgrj[0]=-1) to an arbitrary
distribution of mz points zm, i.e.
Definition at line 1710 of file Polylib.cpp.
References hgrjm().
Referenced by Nektar::LibUtilities::GaussPoints::CalculateInterpMatrix(), and main().
void Polylib::Imgrjp | ( | double * | im, |
const double * | zgrj, | ||
const double * | zm, | ||
const int | nz, | ||
const int | mz, | ||
const double | alpha, | ||
const double | beta | ||
) |
Interpolation Operator from Gauss-Radau-Jacobi points.
(including z=1) to an arbitrary distrubtion at points zm
interpolate a function from at Gauss-Radau-Jacobi distribution of
nz zeros zgrj (where zgrj[nz-1]=1) to an arbitrary
distribution of mz points zm, i.e.
Definition at line 1770 of file Polylib.cpp.
References hgrjp().
Referenced by Nektar::LibUtilities::GaussPoints::CalculateInterpMatrix(), and main().
void Polylib::jacobd | ( | const int | np, |
const double * | z, | ||
double * | polyd, | ||
const int | n, | ||
const double | alpha, | ||
const double | beta | ||
) |
Calculate the derivative of Jacobi polynomials.
n th order Jacobi polynomial at the
np points z.
Definition at line 2146 of file Polylib.cpp.
References jacobfd().
Referenced by Dgj(), Dglj(), Dgrjm(), Dgrjp(), hgj(), hglj(), hgrjm(), hgrjp(), Nektar::SolverUtils::AdvectionFR::v_SetupCFunctions(), Nektar::SolverUtils::DiffusionLFR::v_SetupCFunctions(), Nektar::SolverUtils::DiffusionLFRNS::v_SetupCFunctions(), and zwgj().
void Polylib::jacobfd | ( | const int | np, |
const double * | z, | ||
double * | poly_in, | ||
double * | polyd, | ||
const int | n, | ||
const double | alpha, | ||
const double | beta | ||
) |
Routine to calculate Jacobi polynomials, , and their first derivative, .
containing the value of the order Jacobi polynomial
and its
derivative at the np points in z[i]
relationship (see appendix A ref [4]) :
the relationship (see appendix A ref [4]) :
Definition at line 1946 of file Polylib.cpp.
Referenced by Nektar::LibUtilities::Basis::GenBasis(), hgj(), hglj(), hgrjm(), hgrjp(), jacobd(), Jacobz(), main(), Nektar::MultiRegions::ExpList1D::PeriodicEval(), zwglj(), zwgrjm(), and zwgrjp().
|
static |
Calculate the n zeros, z, of the Jacobi polynomial, i.e.
This routine is only value for
and uses polynomial deflation in a Newton iteration
Definition at line 2274 of file Polylib.cpp.
References EPS, jacobfd(), and STOP.
void Polylib::JacZeros | ( | const int | n, |
double * | a, | ||
double * | b, | ||
const double | alpha, | ||
const double | beta | ||
) |
Zero and Weight determination through the eigenvalues and eigenvectors of a tridiagonal.
matrix from the three term recurrence relationship.
Set up a symmetric tridiagonal matrix
Where the coefficients a[n], b[n] come from the recurrence relation
where and are the Jacobi (normalized)
orthogonal polynomials ( integer values and
halves). Since the polynomials are orthonormalized, the tridiagonal
matrix is guaranteed to be symmetric. The eigenvalues of this
matrix are the zeros of the Jacobi polynomial.
Definition at line 2384 of file Polylib.cpp.
References RecCoeff(), and TriQL().
void Polylib::JKMatrix | ( | int | n, |
double * | a, | ||
double * | b | ||
) |
Calcualtes the Jacobi-kronrod matrix by determining the.
a and coefficients.
The first 3n+1 coefficients are already known
For more information refer to:
"Dirk P. Laurie, Calcualtion of Gauss-Kronrod quadrature rules"
Definition at line 2764 of file Polylib.cpp.
Referenced by zwgk(), zwlk(), and zwrk().
|
static |
The routine finds the recurrence coefficients a and.
b of the orthogonal polynomials
Definition at line 2444 of file Polylib.cpp.
References gammaF().
Referenced by JacZeros(), zwgk(), zwlk(), and zwrk().
|
static |
QL algorithm for symmetric tridiagonal matrix.
This subroutine is a translation of an algol procedure,
num. math. 12, 377-383(1968) by martin and wilkinson, as modified
in num. math. 15, 450(1970) by dubrulle. Handbook for
auto. comp., vol.ii-linear algebra, 241-248(1971). This is a
modified version from numerical recipes.
This subroutine finds the eigenvalues and first components of the
eigenvectors of a symmetric tridiagonal matrix by the implicit QL
method.
on input:
in its first n-2 positions.
on output:
e contains the weight values - modifications of the first component
of normalised eigenvectors
Definition at line 2560 of file Polylib.cpp.
Referenced by JacZeros(), zwgk(), zwlk(), and zwrk().
void Polylib::zwgj | ( | double * | z, |
double * | w, | ||
const int | np, | ||
const double | alpha, | ||
const double | beta | ||
) |
Gauss-Jacobi zeros and weights.
associated with the Jacobi polynomial ,
Definition at line 102 of file Polylib.cpp.
References gammaF(), jacobd(), and jacobz.
Referenced by Nektar::LibUtilities::GaussPoints::CalculatePoints(), and main().
void Polylib::zwgk | ( | double * | z, |
double * | w, | ||
const int | npt, | ||
const double | alpha, | ||
const double | beta | ||
) |
Gauss-Kronrod-Jacobi zeros and weights.
associated with the Jacobi polynomial ,
Definition at line 380 of file Polylib.cpp.
References JKMatrix(), RecCoeff(), and TriQL().
Referenced by Nektar::LibUtilities::GaussPoints::CalculatePoints().
void Polylib::zwglj | ( | double * | z, |
double * | w, | ||
const int | np, | ||
const double | alpha, | ||
const double | beta | ||
) |
Gauss-Lobatto-Jacobi zeros and weights with end point at z=-1,1.
associated with polynomial
Definition at line 306 of file Polylib.cpp.
References gammaF(), jacobfd(), and jacobz.
Referenced by Nektar::LibUtilities::GaussPoints::CalculatePoints(), and main().
void Polylib::zwgrjm | ( | double * | z, |
double * | w, | ||
const int | np, | ||
const double | alpha, | ||
const double | beta | ||
) |
Gauss-Radau-Jacobi zeros and weights with end point at z=-1.
associated with the polynomial .
Definition at line 158 of file Polylib.cpp.
References gammaF(), jacobfd(), and jacobz.
Referenced by Nektar::LibUtilities::GaussPoints::CalculatePoints(), and main().
void Polylib::zwgrjp | ( | double * | z, |
double * | w, | ||
const int | np, | ||
const double | alpha, | ||
const double | beta | ||
) |
Gauss-Radau-Jacobi zeros and weights with end point at z=1.
associated with the polynomial .
Definition at line 234 of file Polylib.cpp.
References gammaF(), jacobfd(), and jacobz.
Referenced by Nektar::LibUtilities::GaussPoints::CalculatePoints(), and main().
void Polylib::zwlk | ( | double * | z, |
double * | w, | ||
const int | npt, | ||
const double | alpha, | ||
const double | beta | ||
) |
Gauss-Lobatto-Kronrod-Jacobi zeros and weights.
associated with the Jacobi polynomial ,
Definition at line 706 of file Polylib.cpp.
References chri1(), JKMatrix(), RecCoeff(), and TriQL().
Referenced by Nektar::LibUtilities::GaussPoints::CalculatePoints().
void Polylib::zwrk | ( | double * | z, |
double * | w, | ||
const int | npt, | ||
const double | alpha, | ||
const double | beta | ||
) |
Gauss-Radau-Kronrod-Jacobi zeros and weights.
associated with the Jacobi polynomial ,
Definition at line 514 of file Polylib.cpp.
References chri1(), JKMatrix(), RecCoeff(), and TriQL().
Referenced by Nektar::LibUtilities::GaussPoints::CalculatePoints().