AshFlow  0.1
ashflowmodel
 All Classes Files Functions Variables Pages
Public Member Functions | List of all members
tools Module Reference

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...
 

Detailed Description

Tools.

Definition at line 5 of file tools.f90.

Member Function/Subroutine Documentation

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:

  • f(1,i) x-coordinate of the the point i
  • f(2,i) f(x) at the point i
  • df(1,i) x-coordinate of the the point i
  • df(2,i) df(x)/dx at the point i

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.

Date
13/11/2008
Parameters
ffunction (input)
dfderivative (output)
nn. of points (input)

Definition at line 189 of file tools.f90.

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:

  • f(1,i) = x-coordinate of the point i (i= 1:n);
  • f(2,i) = f(x) of the point i (i= 1:n).

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

Date
13/11/2008
Parameters
getfxinterpolated value (output)
farray (x,f(x)) (input)
xinterp. point (input)

Definition at line 79 of file tools.f90.

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 = -1 => Abnormal termination
  • iflag = 1 => Correct termination
Date
23/11/2008
Parameters
iflagtermination flag (input)
messagetermination message (output)

Definition at line 23 of file tools.f90.

Here is the caller graph for this function:


The documentation for this module was generated from the following file: