SF_INTEGRATE

Description

SciFortran module for function integration

Quick access

Routines:

get_quadrature_weights(), kronig(), quad(), simps(), simps2d(), trapz(), trapz2d()

Used modules

  • gauss_quadrature

Subroutines and functions

interface  sf_integrate/trapz(f, a, b, dh, x[, a, b, n])
Parameters:
  • f (various shapes) [real/complex]

  • a [real]

  • b [real]

  • dh [real]

  • x (various shapes) [real]

Result:
  • sum [real/complex]

  • int [real/complex]

Options:

n [integer]

interface  sf_integrate/trapz2d(func, xrange, yrange, nx, ny[, n0, iterative, threshold, dhx, dhy, xrange, yrange])
Parameters:
  • func (various shapes) [real/complex, external]

  • xrange (2) [real]

  • yrange (2) [real]

  • nx [integer]

  • ny [integer]

Result:

int [real/complex]

Options:
  • n0 [integer]

  • iterative [logical]

  • threshold [real]

  • dhx [real]

  • dhy [real]

interface  sf_integrate/simps(f, dh, a, b, x[, a, b, n])

SAMPLE:

Parameters:
  • f (various shapes) [real/complex]

  • dh [real]

  • a [real]

  • b [real]

  • x (various shapes) [real]

Result:
  • sum [real/complex]

  • int [real/complex]

Options:

n [integer]

interface  sf_integrate/simps2d(func, xrange, yrange, nx, ny[, n0, iterative, threshold, dhx, dhy, xrange, yrange])
Parameters:
  • func (various shapes) [real/complex, external]

  • xrange (2) [real]

  • yrange (2) [real]

  • nx [integer]

  • ny [integer]

Result:

int [real/complex]

Options:
  • n0 [integer]

  • iterative [logical]

  • threshold [real]

  • dhx [real]

  • dhy [real]

interface  sf_integrate/quad(func, a, result, fsample, b[, b, epsabs, epsrel, key, inf, singular_endpoint, singular_points, cpole, alfa, beta, omega, weight_func, verbose, strict, ninterp])
Parameters:
  • func [external]

  • a [real]

  • result [real]

  • fsample (•) [real]

Options:
  • b [real]

  • epsabs [real]

  • epsrel [real]

  • key [integer] – order of GK rule in QAG

  • inf [integer] – infinite integration limit in QAGI: ! -1(-inf:a);1(a:inf);2(-inf:inf)

  • singular_endpoint [logical] – T if singular_endpoint exists (QAGS)

  • singular_points (•) [real] – location of singular points in QAGP

  • cpole [real] – location of the pole in QAWC f(x)/x-cpole

  • alfa [real]

  • beta [real] – parameters for QAWS

  • omega [real] – frequency of the weight funcion in QAWF,QAWO

  • weight_func [integer] – if(QAWF,QAWO)then ! weight_func=1,2 -> cos(omega*x),sin(omega*x) !if(QAWS)then ! weight_func = 1 (x-a)**alfa*(b-x)**beta ! weight_func = 2 (x-a)**alfa*(b-x)**beta*log(x-a) ! weight_func = 3 (x-a)**alfa*(b-x)**beta*log(b-x) ! weight_func = 4 (x-a)**alfa*(b-x)**beta*log(x-a)*log(b-x)

  • verbose [logical]

  • strict [logical]

  • ninterp [integer]

function  sf_integrate/kronig(fi, wr, m)
Parameters:
  • fi (m) [real]

  • wr (m) [real]

Options:

m [integer]

Result:

fr (m) [real]

subroutine  sf_integrate/get_quadrature_weights(wt[, nrk])
Parameters:

wt (•) [real]

Options:

nrk [integer] – = 2,4”