Tools. More...
Public Member Functions | |
subroutine | runend (iflag, message) |
Program end. More... | |
subroutine | interp1d (getfx, f, x) |
1D Interpolation More... | |
subroutine | dfdx (f, df, n) |
Function Derivative. More... | |
subroutine tools::dfdx | ( | real*8, dimension(2,n), intent(in) | f, |
real*8, dimension(2,n), intent(out) | df, | ||
integer, intent(in) | n | ||
) |
Function Derivative.
This routine computes the discrete derivarive of a function f(x) at the base points where. The function f(2,n) and its derivative df(2,n) are stored as:
Derivatives are calculated using a second order approximation
NOTE: Points do not need to be equally spaced, but they must be ordered on increasing values of x.
f | function (input) |
df | derivative (output) |
n | n. of points (input) |
subroutine tools::interp1d | ( | real*8, intent(out) | getfx, |
real*8, dimension(:,:), intent(in) | f, | ||
real*8, intent(in) | x | ||
) |
1D Interpolation
This function interpolates values from a discrete function y=f(x).
The function is stored at n discrete points in an array f(2,n), where:
It returns the value of f(x) at a point x (where f(1,1) < x < f(1,n) ).
NOTE: It is assumed that the points are already increasingly ordered in x
getfx | interpolated value (output) |
f | array (x,f(x)) (input) |
x | interp. point (input) |
subroutine tools::runend | ( | integer, intent(in) | iflag, |
character, dimension(*), intent(in) | message | ||
) |
Program end.
This routine ends the program according to the flag iflag:
iflag | termination flag (input) |
message | termination message (output) |
Definition at line 23 of file tools.f90.