105    integer, 
intent(in) :: n
 
  106    integer, 
intent(in) :: m
 
  107    real(kind=
rp), 
intent(in) :: x(0:n)
 
  108    real(kind=
rp), 
intent(out) :: c(0:n,0:m)
 
  109    real(kind=
rp), 
intent(in) :: xi
 
  110    real(kind=
xp) :: cx(0:n,0:m)
 
  111    real(kind=
xp) :: c1, c2, c3, c4, c5
 
  112    integer :: i, j, k, mn
 
  134             cx(i,k) = c1 * (k * cx(i-1,k-1) - c5 * cx(i-1,k)) / c2
 
  136          cx(i,0) = -c1 * c5 * cx(i-1,0) / c2
 
  138             cx(j,k) = (c4 * cx(j,k) - k * cx(j,k-1)) / c3
 
  140          cx(j,0) = c4 * cx(j,0) / c3
 
 
  168  subroutine semhat(a, b, c, d, z, dgll, jgll, bgl, zgl, dgl, jgl, n, w)
 
  169    integer, 
intent(in) :: n
 
  170    real(kind=
rp), 
intent(inout) :: a(0:n,0:n)
 
  171    real(kind=
rp), 
intent(inout) :: b(0:n)
 
  172    real(kind=
rp), 
intent(inout) :: c(0:n,0:n)
 
  173    real(kind=
rp), 
intent(inout) :: d(0:n,0:n)
 
  174    real(kind=
rp), 
intent(inout) :: z(0:n)
 
  175    real(kind=
rp), 
intent(inout) :: 
dgll(0:n,1:n-1),jgll(0:n,1:n-1)
 
  176    real(kind=
rp), 
intent(inout) :: bgl(1:n-1)
 
  177    real(kind=
rp), 
intent(inout) :: zgl(1:n-1)
 
  178    real(kind=
rp), 
intent(inout) :: dgl(1:n-1,0:n)
 
  179    real(kind=
rp), 
intent(inout) :: jgl(1:n-1,0:n)
 
  180    real(kind=
rp), 
intent(inout) :: w(0:2*n+1)
 
  181    integer :: np, nm, n2, i, j, k
 
  199          dgll(i,j) = w(j + nm) 
 
  206             a(i,j) = a(i,j) + d(k,i)*b(k)*d(k,j)
 
  211    call zwgl(zgl, bgl, nm)
 
 
  243  subroutine setup_intp(jh, jht, z_to, z_from, n_to, n_from, derivative)
 
  245    integer, 
intent(in) :: n_to, n_from, derivative
 
  246    real(kind=
rp), 
intent(inout) :: jh(n_to, n_from), jht(n_from, n_to)
 
  247    real(kind=
rp), 
intent(in) :: z_to(n_to), z_from(n_from)
 
  248    real(kind=
rp) :: w(n_from, 0:derivative)
 
  257          jh(i,j) = w(j, derivative)
 
  258          jht(j,i) = w(j, derivative)
 
 
Fast diagonalization methods from NEKTON.
 
subroutine, public semhat(a, b, c, d, z, dgll, jgll, bgl, zgl, dgl, jgl, n, w)
Generate matrices for single element, 1D operators: a = Laplacian b = diagonal mass matrix c = convec...
 
subroutine, public fd_weights_full(xi, x, n, m, c)
Compute finite-difference stencil weights for evaluating derivatives up to order  at a point.
 
subroutine, public setup_intp(jh, jht, z_to, z_from, n_to, n_from, derivative)
Compute interpolation weights for points z_to using values at points z_from.
 
subroutine, public rzero(a, n)
Zero a real vector.
 
integer, parameter, public xp
 
integer, parameter, public rp
Global precision used in computations.
 
LIBRARY ROUTINES FOR SPECTRAL METHODS.
 
subroutine dgll(d, dt, z, nz, nzd)
Compute the derivative matrix D and its transpose DT associated with the Nth order Lagrangian interpo...
 
subroutine zwgll(z, w, np)
Generate NP Gauss-Lobatto Legendre points (Z) and weights (W) associated with Jacobi polynomial P(N)(...
 
subroutine zwgl(z, w, np)
Generate NP Gauss Legendre points Z and weights W associated with Jacobi polynomial ....