gibuu is hosted by Hepforge, IPPP Durham
GiBUU

TABLE OF CONTENTS


/cl_splines [ Modules ]

[ Top ] [ Modules ]

NAME

module cl_splines

PURPOSE

This module implements cubic splines according to cernlib (E211). See also Documentation for the routine "E211" in cernlib documentation.


cl_splines/tspline [ Types ]

[ Top ] [ cl_splines ] [ Types ]

PURPOSE

Type which contains all information of the splines.

SOURCE

  type tspline 
     real, dimension(:)  , Allocatable :: X
     real, dimension(:,:), Allocatable :: Y
     real, dimension(:,:), Allocatable :: A,B,C,D
     integer :: splineMode=1
     logical :: isInitialized=.false.
  end type tspline

cl_splines/cl_initSpline [ Functions ]

[ Top ] [ cl_splines ] [ Functions ]

NAME

function cl_initSpline(x,y,splineMode) result(s)

PURPOSE

Initializes a spline.

INPUTS

  • real, dimension(:),intent(in) :: x,y -- x and y values of the data points. X and y must have same size!
  • integer,intent(in), optional :: splineMode -- 1=second derivative of spline vanishes at end-points, 2=second derivative is constant in between first (last) and second (last but one) point

OUTPUT


cl_splines/cl_cleanupSpline [ Functions ]

[ Top ] [ cl_splines ] [ Functions ]

NAME

subroutine cl_cleanupSpline(s)

PURPOSE

Deallocates all the memory that the spline occupied.

INPUTS


cl_splines/cl_spline [ Functions ]

[ Top ] [ cl_splines ] [ Functions ]

NAME

real function cl_spline(s,x,successFlag,errorCode)

PURPOSE

Evaluates the function value of a spline "s" at position "x" .

INPUTS

OUTPUT

  • real :: value of the spline at x

* logical, intent(out) :: successFlag !.true. if spline was evaluated within bounds

* integer, intent(out) :: errorCode

NOTES

  • errorCode= 0 -> no error
  • errorCode=-1 -> x is lower than any data point used for the spline
  • errorCode= 1 -> x is greater than any data point used for the spline


cl_splines/cl_error [ Subroutines ]

[ Top ] [ cl_splines ] [ Subroutines ]

NAME

subroutine cl_error(error,name,x)

PURPOSE

Implements output of error messages

INPUTS

  • integer , intent(in) :: error -- type of error
  • character(*), intent(in) :: name -- identifier (Where did the error happen)
  • real , intent(in) :: x -- value where spline should be evaluated

NOTES

  • errorCode= 0 -> no error
  • errorCode=-1 -> x is lower than any data point used for the spline
  • errorCode= 1 -> x is greater than any data point used for the spline