Documentation for module negf_integr_simpson

Adaptive Simpson's rule algorithm to integrate a complex-valued function in a complex plane

source: negf_integr_simpson.F
Loading...

public Types:

simpsonrule_type
A structure to store data needed for adaptive Simpson's rule algorithm.

public Subroutines/Functions:

Get the next set of nodes where to compute integrand.
Initialise a Simpson's rule environment variable.
Compute integral using the simpson's rules.
Release a Simpson's rule environment variable.

Parameters:

INTEGER
:: sr_shape_arc = contour_shape_arc
INTEGER
:: sr_shape_linear = contour_shape_linear

public Types:

TYPE :: simpsonrule_type

A structure to store data needed for adaptive Simpson's rule algorithm.


COMPLEX(dp)
:: a ...
COMPLEX(dp)
:: b ...
INTEGER
:: shape_id ...
REAL(dp)
:: conv ...
REAL(dp)
:: error ...
REAL(dp)
:: error_conv ...
POINTER :: integral ...
POINTER :: integral_conv ...
POINTER :: integral_abc ...
POINTER :: integral_cde ...
POINTER :: integral_ace ...
TYPE(cp_fm_type),
POINTER :: error_fm ...
TYPE(cp_fm_type),
POINTER :: weights ...
ALLOCATABLE, DIMENSION(:) :: subintervals ...
REAL(dp),
ALLOCATABLE, DIMENSION(:) :: tnodes ...

SUBROUTINEsimpsonrule_get_next_nodes(sr_env, xnodes_next, nnodes)

Get the next set of nodes where to compute integrand.

Arguments:
INTENT(inout)
:: sr_env Simpson's rule environment (modified on exit)
COMPLEX(dp),
INTENT(out)
:: xnodes_next(nnodes) list of additional points (initialised on exit)
INTEGER,
INTENT(inout)
:: nnodes actual number of points to compute (modified on exit)

SUBROUTINEsimpsonrule_init(sr_env, xnodes, nnodes, a, b, shape_id, conv, weights, tnodes_restart)

Initialise a Simpson's rule environment variable.

Arguments:
INTENT(out)
:: sr_env Simpson's rule environment (initialised on exit)
COMPLEX(dp),
INTENT(out)
:: xnodes(nnodes) points at which an integrand needs to be computed (initialised on exit)
INTEGER,
INTENT(inout)
:: nnodes initial number of points to compute (initialised on exit)
COMPLEX(dp),
INTENT(in)
:: a integral lower boundary
COMPLEX(dp),
INTENT(in)
:: b integral upper boundary
INTEGER,
INTENT(in)
:: shape_id shape of a curve along which the integral will be evaluated
REAL(dp),
INTENT(in)
:: conv convergence threshold
TYPE(cp_fm_type),
POINTER
:: weights weights associated with matrix elements; used to compute cumulative error
REAL(dp),
INTENT(in),
OPTIONAL
:: tnodes_restart(nnodes) list of nodes over the interval [-1 .. 1] from a previous integral evaluation. If present, the same set of 'xnodes' will be used to compute this integral.

SUBROUTINEsimpsonrule_refine_integral(sr_env, zdata_next)

Compute integral using the simpson's rules.

Arguments:
INTENT(inout)
:: sr_env Simpson's rule environment
INTENT(inout)
:: zdata_next(:) precomputed integrand values at points xnodes_next (nullified on exit)

SUBROUTINEsimpsonrule_release(sr_env)

Release a Simpson's rule environment variable.

Arguments:
INTENT(inout)
:: sr_env Simpson's rule environment (modified on exit)

private Parameters/Types:

private Types:

TYPE :: simpsonrule_subinterval_type

A structure to store data for non-converged sub-interval.


REAL(dp)
:: lb ...
REAL(dp)
:: ub ...
REAL(dp)
:: conv ...
REAL(dp)
:: error ...
POINTER :: fa ...
POINTER :: fb ...
POINTER :: fc ...
POINTER :: fd ...
POINTER :: fe ...