Search Site | Contact Details | FAQ

ADAS Subroutine c2spln

C
      SUBROUTINE C2SPLN( NEDIM  ,
     &                   IEA    , IEVAL   ,
     &                   TEEA   , EEVA    ,
     &                   SCX    , SCXA    ,
     &                   LERNG
     &                 )
C-----------------------------------------------------------------------
C
C  ****************** FORTRAN77 SUBROUTINE: C2SPLN *********************
C
C  PURPOSE:
C          PERFORMS CUBIC SPLINE ON LOG(ENERGY <EV/AMU> ) VERSUS
C          LOG(CX CROSS-SECTION <CM2>).
C          INPUT DATA FOR A GIVEN DONOR/RECEIVER COMBINATION DATA-BLOCK.
C
C          USING  ONE-WAY SPLINES  IT  CALCULATES  THE  CROSS-SECTIONS
C          FOR  'IEVAL'  COLLISION ENERGIES VALUES  FROM
C          THE LIST OF COLLISION ENERGIES READ IN FROM THE INPUT FILE
C
C          IF A  VALUE  CANNOT  BE  INTERPOLATED  USING  SPLINES  IT  IS
C          EXTRAPOLATED VIA 'XXSPLE'. (SEE NOTES BELOW).
C
C  CALLING PROGRAM: ADAS302/SSIA
C
C
C  SUBROUTINE:
C
C  INPUT : (I*4)  IEA     = INPUT DATA FILE: NUMBER OF COLLISION ENER-
C                           GIES READ FOR THE DATA-BLOCK BEING ASSESSED
C  INPUT : (I*4)  IEVAL   = NUMBER OF ISPF ENTERED COLLISION ENERGIES
C                           VALUES FOR  WHICH  CX CROSS-SECTIONS
C                           ARE REQUIRED FOR TABULAR/GRAPHICAL OUTPUT.
C
C  INPUT : (R*8)  TEEA()  = INPUT DATA FILE: COLLISION ENERGIES (EV/AMU)
C                           FOR THE DATA-BLOCK BEING ASSESSED.
C                           DIMENSION: COLLISION ENERGY INDEX
C  INPUT : (R*8)  EEVA()  = USER ENTERED: COLLISION ENERGIES (EV/AMU)
C                           DIMENSION: COLLISION ENERGY INDEX
C
C  INPUT : (R*8)  SCX()    =INPUT DATA FILE: FULL SET OF CX CROSS-
C                           SECTIONS FOR THE DATA-BLOCK BEING ANALYSED
C                           1ST DIMENSION: COLLISION ENERGY INDEX
C  OUTPUT: (R*8)  SCXA()  = SPLINE INTERPOLATED OR  EXTRAPOLATED
C                           CX CROSS-SECTIONS FOR
C                           THE USER ENTERED COLLISION ENERGIES.
C                           DIMENSION: COLLISION ENERGIES INDEX
C
C  OUTPUT: (L*4)  LERNG()=  .TRUE.  => OUTPUT 'SCXA()' VALUE WAS INTER-
C                                      POLATED  FOR  THE  USER  ENTERED
C                                      COLLISION ENERGY 'EEVA()'.
C                           .FALSE. => OUTPUT 'SCXA()' VALUE WAS EXTRA-
C                                      POLATED  FOR  THE  USER  ENTERED
C                                      COLLISION ENERGY 'EEVA()'.
C                           DIMENSION: COLLISION ENERGY INDEX
C
C          (I*4)  NIN     = PARAMETER = MAX. NO. OF INPUT  ENERGY
C                                       VALUES. MUST BE >= 'IEA'
C          (I*4)  NOUT    = PARAMETER = MAX. NO. OF OUTPUT ENERGY
C                                       VALUES.  MUST BE >= 'IEVAL'
C          (I*4)  L1      = PARAMETER = 1
C
C
C          (I*4)  IET     = ARRAY SUBSCRIPT USED INPUT  FILE  COLLISION
C                           ENERGIES.
C          (I*4)  IT      = ARRAY  SUBSCRIPT  USED  FOR  USER  ENTERED
C                           COLLISION ENERGIES.
C          (I*4)  IOPT    = DEFINES THE BOUNDARY DERIVATIVES FOR THE
C                           SPLINE ROUTINE 'XXSPLE', SEE 'XXSPLE'.
C                           (VALID VALUES = <0, 0, 1, 2, 3, 4)
C
C          (L*4)  LSETX   = .TRUE.  => SET UP SPLINE PARAMETERS RELATING
C                                      TO 'XIN' AXIS.
C                           .FALSE. => DO NOT SET UP SPLINE PARAMETERS
C                                      RELATING TO 'XIN' AXIS.
C                                      (I.E. THEY WERE SET IN A PREVIOUS
C                                            CALL )
C                           (VALUE SET TO .FALSE. BY 'XXSPLE')
C
C          (R*8)  R8FUN1  = FUNCTION - (SEE ROUTINES SECTION BELOW)
C
C          (R*8)  XIN()   = LOG( DATA FILE COLLISION ENERGIES )
C          (R*8)  YIN()   = LOG( DATA FILE CX CROSS-SECTIONS)
C          (R*8)  XOUT()  = LOG( USER ENTERED COLLISION ENERGIES.)
C          (R*8)  YOUT()  = LOG( OUTPUT GENERATED CX CROSS-SECTIONS)
C          (R*8)  DF()    = SPLINE INTERPOLATED DERIVATIVES
C
C
C NOTE:
C
C          ONE-DIMENSIONAL SPLINE CARRIED OUT BY THIS SUBROUTINE:
C
C           LOG( SCX )  vs. LOG( E )
C
C           E      = COLLISION ENERGY (units: eV/AMU)
C           SCX    = CX CROSS-SECTION (units: cm**2)
C
C           Extrapolation criteria:
C
C           Low  E: zero gradient  extrapolation (i.e. DY(1)  = 0.0)
C           High E: zero curvature extrapolation (i.e. DDY(N) = 0.0)
C
C           (These criteria are met by calling XXSPLE with IOPT=4)
C
C
C ROUTINES:
C          ROUTINE    SOURCE    BRIEF DESCRIPTION
C          ------------------------------------------------------------
C          XXSPLE     ADAS      SPLINE SUBROUTINE (EXTENDED DIAGNOSTICS)
C          R8FUN1     ADAS      REAL*8 FUNCTION: ( X -> X )
C
C AUTHOR:  H. P. SUMMERS, UNIVERSITY OF STRATHCLYDE
C          JA8.08
C          TEL. 0141-553-4196
C
C DATE:    16/11/95
C
C UNIX-IDL PORT: H.P.SUMMERS
C
C VERSION: 1.1				DATE: 19-11-96
C MODIFIED: WILLIAM OSBORN (TESSELLA SUPPORT SERVICES PLC)
C	    - PUT UNDER S.C.C.S. CONTROL
C
C VERSION: 1.2				DATE: 27-10-2004
C MODIFIED: Martin O'Mullane
C	    - Error message reported E9SPLN and not C2SPLN.
C
C-----------------------------------------------------------------------
C
C-----------------------------------------------------------------------
      INTEGER             IEA,         IEVAL,       NEDIM
      LOGICAL             LERNG(IEVAL)
      REAL*8              EEVA(IEVAL), SCX(NEDIM),  SCXA(IEVAL)
      REAL*8              TEEA(NEDIM)
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk