pf_mod_quadrature Module

Module to create quadrature matrices and accompanying routines


Uses

  • module~~pf_mod_quadrature~~UsesGraph module~pf_mod_quadrature pf_mod_quadrature module~pf_mod_dtype pf_mod_dtype module~pf_mod_quadrature->module~pf_mod_dtype iso_c_binding iso_c_binding module~pf_mod_quadrature->iso_c_binding module~pf_mod_dtype->iso_c_binding

Used by

  • module~~pf_mod_quadrature~~UsedByGraph module~pf_mod_quadrature pf_mod_quadrature proc~pf_level_setup pf_level_setup proc~pf_level_setup->module~pf_mod_quadrature proc~imexq_initialize imexQ_initialize proc~imexq_initialize->module~pf_mod_quadrature proc~pf_level_destroy pf_level_destroy proc~pf_level_destroy->module~pf_mod_quadrature

Contents


Variables

TypeVisibility AttributesNameInitial
integer, public, parameter:: qp =c_long_double
integer, public, parameter:: dp =c_double
real(kind=qp), public, parameter:: eps =1.0e-23_qp

Interfaces

public interface poly_eval

  • public interface poly_eval()

    Arguments

    None
  • public function poly_eval_complex(p, n, x) result(v)

    Function to evaluate complex polynomial

    Arguments

    Type IntentOptional AttributesName
    real(kind=pfqp), intent(in) :: p(0:n)
    integer, intent(in), value:: n
    complex(kind=pfqp), intent(in) :: x

    Return Value complex(kind=pfdp)


Functions

public function not_proper(flags, node)

Function to decide if the restriction of the nodes is pointwise, e.g. coarse nodes are every other fine node

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: flags(:)
integer, intent(in) :: node

Return Value logical

public function poly_eval(p, n, x) result(v)

Polynomial manipulation routines.

Read more…

Arguments

Type IntentOptional AttributesName
real(kind=pfqp), intent(in) :: p(0:n)
integer, intent(in), value:: n
real(kind=pfqp), intent(in) :: x

Return Value real(kind=pfqp)

public function poly_eval_complex(p, n, x) result(v)

Function to evaluate complex polynomial

Arguments

Type IntentOptional AttributesName
real(kind=pfqp), intent(in) :: p(0:n)
integer, intent(in), value:: n
complex(kind=pfqp), intent(in) :: x

Return Value complex(kind=pfdp)


Subroutines

public subroutine pf_init_sdcmats(SDCmats, qtype, nnodes, nnodes0, nflags)

Arguments

Type IntentOptional AttributesName
type(pf_sdcmats_t), intent(inout) :: SDCmats
integer, intent(in) :: qtype
integer, intent(in) :: nnodes
integer, intent(in) :: nnodes0
integer, intent(inout) :: nflags(nnodes)

public subroutine pf_destroy_sdcmats(SDCmats)

Arguments

Type IntentOptional AttributesName
type(pf_sdcmats_t), intent(inout) :: SDCmats

public subroutine myLUq(Q, QLU, Nnodes, fillq)

Routine to compute the LU decomposition of spectral integration matrix

Arguments

Type IntentOptional AttributesName
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

public subroutine pf_quadrature(qtype_in, nnodes, nnodes0, nodes, nflags, smat, qmat, qmatFE, qmatBE)

Subroutine to create quadrature matrices

Arguments

Type IntentOptional AttributesName
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)

public subroutine sdc_qnodes(qnodes, flags, qtype, nnodes)

Subroutine to compute high precision quadrature nodes.

Arguments

Type IntentOptional AttributesName
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

public subroutine sdc_qmats(qmat, smat, dst, src, flags, ndst, nsrc)

Subroutine to compute the quadrature matrices

Arguments

Type IntentOptional AttributesName
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

public subroutine poly_diff(p, n)

Subroutine to differentiate polynomial (in place)

Arguments

Type IntentOptional AttributesName
real(kind=pfqp), intent(inout) :: p(0:n)
integer, intent(in), value:: n

public subroutine poly_int(p, n)

Subroutine to integrate polynomial (in place)

Arguments

Type IntentOptional AttributesName
real(kind=pfqp), intent(inout) :: p(0:n)
integer, intent(in), value:: n

public subroutine poly_legendre(p, n)

Subroutine to compute Legendre polynomial coefficients using Bonnet's recursion formula.

Arguments

Type IntentOptional AttributesName
real(kind=pfqp), intent(out) :: p(0:n)
integer, intent(in), value:: n

public subroutine poly_roots(roots, p0, n)

Subroutine to compute polynomial roots using the Durand-Kerner algorithm. The roots are assumed to be real.

Arguments

Type IntentOptional AttributesName
real(kind=pfqp), intent(out) :: roots(n)
real(kind=pfqp), intent(in) :: p0(0:n)
integer, intent(in), value:: n

public recursive subroutine qsort(a)

Subroutine to sort (inplace) using the quick sort algorithm. Adapted from http://www.fortran.com/qsort_c.f95.

Arguments

Type IntentOptional AttributesName
real(kind=pfqp), intent(inout) :: a(:)