Documentation for module negf_integr_utils

Helper functions for integration routines.

source: negf_integr_utils.F
Loading...

Generic procedures:

equidistant_nodes_a_b

public Subroutines/Functions:

FUNCTION
REAL(dp) PURE
get_arc_radius (a, b)
Compute arc radius.
FUNCTION
REAL(dp) PURE
get_arc_smallest_angle (a, b)
Compute the angle phi.
Rescale nodes [pi, phi] -> arc[a, b] .
Rescale nodes tnodes(i) = cos(pi/2 * (1-tnodes(i))); tnodes \in [-1 .. 1] .
Rescale nodes [-1, 1] -> [a, b] .
Rescale nodes [-1, 1] -> [pi, phi] .
...

Parameters:

INTEGER
:: contour_shape_arc = 1
INTEGER
:: contour_shape_linear = 0

Generic procedure equidistant_nodes_a_b

Compute equidistant nodes on an interval [a, b], where a and b are complex numbers.

REAL(dp),
INTENT(in)
:: a ×
COMPLEX(dp),
INTENT(in)
:: a ×
REAL(dp),
INTENT(in)
:: b ×
COMPLEX(dp),
INTENT(in)
:: b ×
INTEGER,
INTENT(in)
:: nnodes × ×
REAL(dp),
INTENT(out)
:: xnodes(nnodes) ×
COMPLEX(dp),
INTENT(out)
:: xnodes(nnodes) ×

PURE FUNCTIONget_arc_radius(a, b)

Compute arc radius.

Return Value ::
REAL(dp)
Arguments:
COMPLEX(dp),
INTENT(in)
:: a lower bound
COMPLEX(dp),
INTENT(in)
:: b upper bound

PURE FUNCTIONget_arc_smallest_angle(a, b)

Compute the angle phi.

Return Value ::
REAL(dp)
angle
Arguments:
COMPLEX(dp),
INTENT(in)
:: a lower bound
COMPLEX(dp),
INTENT(in)
:: b upper bound

SUBROUTINErescale_nodes_arc(nnodes, tnodes_angle, a, b, xnodes)

Rescale nodes [pi, phi] -> arc[a, b] .

Arguments:
INTEGER,
INTENT(in)
:: nnodes number of nodes
REAL(dp),
INTENT(in)
:: tnodes_angle(:) parametrically-defined nodes to rescale
COMPLEX(dp),
INTENT(in)
:: a lower bound
COMPLEX(dp),
INTENT(in)
:: b upper bound
COMPLEX(dp),
INTENT(out)
:: xnodes(:) rescaled nodes (initialised on exit)

SUBROUTINErescale_nodes_cos(nnodes, tnodes)

Rescale nodes tnodes(i) = cos(pi/2 * (1-tnodes(i))); tnodes \in [-1 .. 1] .

Arguments:
INTEGER,
INTENT(in)
:: nnodes ...
REAL(dp),
INTENT(inout)
:: tnodes(nnodes) parametrically-defined nodes to rescale / rescaled nodes (modified on exit)

SUBROUTINErescale_nodes_linear(nnodes, tnodes, a, b, xnodes)

Rescale nodes [-1, 1] -> [a, b] .

Arguments:
INTEGER,
INTENT(in)
:: nnodes number of nodes
REAL(dp),
INTENT(in)
:: tnodes(nnodes) parametrically-defined nodes to rescale
COMPLEX(dp),
INTENT(in)
:: a lower bound
COMPLEX(dp),
INTENT(in)
:: b upper bound
COMPLEX(dp),
INTENT(out)
:: xnodes(nnodes) rescaled nodes (initialised on exit)

SUBROUTINErescale_nodes_pi_phi(a, b, nnodes, tnodes)

Rescale nodes [-1, 1] -> [pi, phi] .

Arguments:
COMPLEX(dp),
INTENT(in)
:: a lower bound
COMPLEX(dp),
INTENT(in)
:: b upper bound
INTEGER,
INTENT(in)
:: nnodes number of nodes
REAL(dp),
INTENT(inout)
:: tnodes(nnodes) parametrically-defined nodes to rescale / rescaled nodes (modified on exit)

SUBROUTINErescale_normalised_nodes(nnodes, tnodes, a, b, shape_id, xnodes, weights)

...

Arguments:
INTEGER,
INTENT(in)
:: nnodes ...
REAL(dp),
INTENT(in)
:: tnodes(nnodes) ...
COMPLEX(dp),
INTENT(in)
:: a ...
COMPLEX(dp),
INTENT(in)
:: b ...
INTEGER,
INTENT(in)
:: shape_id ...
COMPLEX(dp),
INTENT(out),
OPTIONAL
:: xnodes(nnodes) ...
COMPLEX(dp),
INTENT(out),
OPTIONAL
:: weights(nnodes) ...

SUBROUTINEequidistant_dnodes_a_b(a, b, nnodes, xnodes)

Compute equidistant nodes on an interval [a, b], where a and b are complex numbers.

Arguments:
REAL(dp),
INTENT(in)
:: a lower bound
REAL(dp),
INTENT(in)
:: b upper bound
INTEGER,
INTENT(in)
:: nnodes number of nodes
REAL(dp),
INTENT(out)
:: xnodes(nnodes) array to store the nodes

SUBROUTINEequidistant_znodes_a_b(a, b, nnodes, xnodes)

Compute equidistant nodes on an interval [a, b], where a and b are complex numbers.

Arguments:
COMPLEX(dp),
INTENT(in)
:: a lower bound
COMPLEX(dp),
INTENT(in)
:: b upper bound
INTEGER,
INTENT(in)
:: nnodes number of nodes
COMPLEX(dp),
INTENT(out)
:: xnodes(nnodes) array to store the nodes