Module to create quadrature matrices and accompanying routines
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | parameter | :: | qp | = | c_long_double | |
integer, | public, | parameter | :: | dp | = | c_double | |
real(kind=qp), | public, | parameter | :: | eps | = | 1.0e-23_qp |
Function to evaluate complex polynomial
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=pfqp), | intent(in) | :: | p(0:n) | |||
integer, | intent(in), | value | :: | n | ||
complex(kind=pfqp), | intent(in) | :: | x |
Function to decide if the restriction of the nodes is pointwise, e.g. coarse nodes are every other fine node
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flags(:) | |||
integer, | intent(in) | :: | node |
Polynomial manipulation routines.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=pfqp), | intent(in) | :: | p(0:n) | |||
integer, | intent(in), | value | :: | n | ||
real(kind=pfqp), | intent(in) | :: | x |
Function to evaluate complex polynomial
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=pfqp), | intent(in) | :: | p(0:n) | |||
integer, | intent(in), | value | :: | n | ||
complex(kind=pfqp), | intent(in) | :: | x |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_sdcmats_t), | intent(inout) | :: | SDCmats | |||
integer, | intent(in) | :: | qtype | |||
integer, | intent(in) | :: | nnodes | |||
integer, | intent(in) | :: | nnodes0 | |||
integer, | intent(inout) | :: | nflags(nnodes) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_sdcmats_t), | intent(inout) | :: | SDCmats |
Routine to compute the LU decomposition of spectral integration matrix
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=pfdp), | intent(in) | :: | Q(Nnodes-1,Nnodes) | |||
real(kind=pfdp), | intent(inout) | :: | QLU(Nnodes-1,Nnodes) | |||
integer, | intent(in) | :: | Nnodes | |||
integer, | intent(in) | :: | fillq |
Subroutine to create quadrature matrices
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | qtype_in | |||
integer, | intent(in) | :: | nnodes | |||
integer, | intent(in) | :: | nnodes0 | |||
real(kind=pfdp), | intent(out) | :: | nodes(nnodes) | |||
integer, | intent(out) | :: | nflags(nnodes) | |||
real(kind=pfdp), | intent(out) | :: | smat(nnodes-1,nnodes) | |||
real(kind=pfdp), | intent(out) | :: | qmat(nnodes-1,nnodes) | |||
real(kind=pfdp), | intent(out) | :: | qmatFE(nnodes-1,nnodes) | |||
real(kind=pfdp), | intent(out) | :: | qmatBE(nnodes-1,nnodes) |
Subroutine to compute high precision quadrature nodes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=pfqp), | intent(out) | :: | qnodes(nnodes) | The computed quadrature nodes |
||
integer, | intent(out) | :: | flags(nnodes) | |||
integer, | intent(in), | value | :: | qtype | Type of nodes (see pf_dtype) |
|
integer, | intent(in), | value | :: | nnodes | Number of nodes |
Subroutine to compute the quadrature matrices
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=pfdp), | intent(out) | :: | qmat(ndst-1,nsrc) | O to dst quadrature weights |
||
real(kind=pfdp), | intent(out) | :: | smat(ndst-1,nsrc) | dst(m) to dst(m+1) quadrature weights |
||
real(kind=pfqp), | intent(in) | :: | dst(ndst) | Destination points |
||
real(kind=pfqp), | intent(in) | :: | src(nsrc) | Source points |
||
integer, | intent(in) | :: | flags(nsrc) | |||
integer, | intent(in), | value | :: | ndst | Number of destination points |
|
integer, | intent(in), | value | :: | nsrc | Number of source points |
Subroutine to differentiate polynomial (in place)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=pfqp), | intent(inout) | :: | p(0:n) | |||
integer, | intent(in), | value | :: | n |
Subroutine to integrate polynomial (in place)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=pfqp), | intent(inout) | :: | p(0:n) | |||
integer, | intent(in), | value | :: | n |
Subroutine to compute Legendre polynomial coefficients using Bonnet's recursion formula.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=pfqp), | intent(out) | :: | p(0:n) | |||
integer, | intent(in), | value | :: | n |
Subroutine to compute polynomial roots using the Durand-Kerner algorithm. The roots are assumed to be real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=pfqp), | intent(out) | :: | roots(n) | |||
real(kind=pfqp), | intent(in) | :: | p0(0:n) | |||
integer, | intent(in), | value | :: | n |
Subroutine to sort (inplace) using the quick sort algorithm. Adapted from http://www.fortran.com/qsort_c.f95.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=pfqp), | intent(inout) | :: | a(:) |