(git:6a2e663)
negf_integr_simpson Module Reference

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

Functions/Subroutines

subroutine, public simpsonrule_init (sr_env, xnodes, nnodes, a, b, shape_id, conv, weights, tnodes_restart)
 Initialise a Simpson's rule environment variable. More...
 
subroutine, public simpsonrule_release (sr_env)
 Release a Simpson's rule environment variable. More...
 
subroutine, public simpsonrule_get_next_nodes (sr_env, xnodes_next, nnodes)
 Get the next set of nodes where to compute integrand. More...
 
subroutine, public simpsonrule_refine_integral (sr_env, zdata_next)
 Compute integral using the simpson's rules. More...
 

Variables

integer, parameter, public sr_shape_linear = contour_shape_linear
 
integer, parameter, public sr_shape_arc = contour_shape_arc
 

Detailed Description

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

Function/Subroutine Documentation

◆ simpsonrule_init()

subroutine, public negf_integr_simpson::simpsonrule_init ( type(simpsonrule_type), intent(out)  sr_env,
complex(kind=dp), dimension(nnodes), intent(out)  xnodes,
integer, intent(inout)  nnodes,
complex(kind=dp), intent(in)  a,
complex(kind=dp), intent(in)  b,
integer, intent(in)  shape_id,
real(kind=dp), intent(in)  conv,
type(cp_fm_type), intent(in)  weights,
real(kind=dp), dimension(nnodes), intent(in), optional  tnodes_restart 
)

Initialise a Simpson's rule environment variable.

Parameters
sr_envSimpson's rule environment (initialised on exit)
xnodespoints at which an integrand needs to be computed (initialised on exit)
nnodesinitial number of points to compute (initialised on exit)
aintegral lower boundary
bintegral upper boundary
shape_idshape of a curve along which the integral will be evaluated
convconvergence threshold
weightsweights associated with matrix elements; used to compute cumulative error
tnodes_restartlist 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.
History
  • 05.2017 created [Sergey Chulkov]
Note
When we integrate the retarded Green's function times the Fermi function over the energy domain and pass the overlap matrix (S) as the 'weights' matrix, the convergence threshold ('conv') becomes the maximum error in the total number of electrons multiplied by pi.

Definition at line 120 of file negf_integr_simpson.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ simpsonrule_release()

subroutine, public negf_integr_simpson::simpsonrule_release ( type(simpsonrule_type), intent(inout)  sr_env)

Release a Simpson's rule environment variable.

Parameters
sr_envSimpson's rule environment (modified on exit)
History
  • 05.2017 created [Sergey Chulkov]

Definition at line 187 of file negf_integr_simpson.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ simpsonrule_get_next_nodes()

subroutine, public negf_integr_simpson::simpsonrule_get_next_nodes ( type(simpsonrule_type), intent(inout)  sr_env,
complex(kind=dp), dimension(nnodes), intent(out)  xnodes_next,
integer, intent(inout)  nnodes 
)

Get the next set of nodes where to compute integrand.

Parameters
sr_envSimpson's rule environment (modified on exit)
xnodes_nextlist of additional points (initialised on exit)
nnodesactual number of points to compute (modified on exit)
History
  • 05.2017 created [Sergey Chulkov]
Note
The number of nodes returned is limited by the initial value of the nnodes variable; un exit nnodes == 0 means that the target accuracy has been achieved.

Definition at line 258 of file negf_integr_simpson.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ simpsonrule_refine_integral()

subroutine, public negf_integr_simpson::simpsonrule_refine_integral ( type(simpsonrule_type), intent(inout)  sr_env,
type(cp_cfm_type), dimension(:), intent(inout)  zdata_next 
)

Compute integral using the simpson's rules.

Parameters
sr_envSimpson's rule environment
zdata_nextprecomputed integrand values at points xnodes_next (nullified on exit)
History
  • 05.2017 created [Sergey Chulkov]

Definition at line 339 of file negf_integr_simpson.F.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ sr_shape_linear

integer, parameter, public negf_integr_simpson::sr_shape_linear = contour_shape_linear

Definition at line 46 of file negf_integr_simpson.F.

◆ sr_shape_arc

integer, parameter, public negf_integr_simpson::sr_shape_arc = contour_shape_arc

Definition at line 46 of file negf_integr_simpson.F.