10 #include "sll_working_precision.h"
20 #ifndef DOXYGEN_SHOULD_SKIP_THIS
23 function function_1d(x)
27 sll_real64 :: function_1d
28 sll_real64,
intent(in) :: x
29 end function function_1d
53 procedure(function_1d) :: f
54 sll_int32,
intent(in) :: n
55 sll_real64,
dimension(n) :: x
61 ans = ans + f(x(k))*(x(k + 1) - x(k))
73 sll_int32,
intent(in) :: n
74 sll_real64,
dimension(n) :: x
75 sll_real64,
dimension(n) :: w
79 w(k) = x(k + 1) - x(k)
Integrate numerically with Gauss-Lobatto formula.
real(kind=f64) function, dimension(n) rectangle_weights(n, x)
Returns a 1d array of size (n) containing rectangle integration weights in the interval [x(1),...
real(kind=f64) function rectangle_integral_1d(f, x, n)
Integrate with rectangle formula.
Module to select the kind parameter.