quad Function

public function quad(f, a, b, h_in, method) result(Int)

Approximates the integral: using some integration method on a linearly spaced set of points.

Arguments

Type IntentOptional Attributes Name
public function f(x) result(y)

Function to be integrated

Arguments
Type IntentOptional Attributes Name
real, intent(in) :: x

independent variable

Return Value real

dependent variable

real, intent(in) :: a

Lower limit of integration

real, intent(in) :: b

Upper limit of integration

real, intent(in) :: h_in

Approximated size of the intervals used by the trapezoidal rule.

character(len=*) :: method

Method of integration to be used, can be either "Trapezoidal" or "Simpson"

Return Value real

Numerical approximation to the integral


Calls

proc~~quad~~CallsGraph proc~quad quad proc~quad_simpson quad_simpson proc~quad->proc~quad_simpson proc~quad_trapz quad_trapz proc~quad->proc~quad_trapz

Called by

proc~~quad~~CalledByGraph proc~quad quad program~test_integrals test_integrals program~test_integrals->proc~quad