ADAS Subroutine r8form
FUNCTION R8FORM( MXNENG , MXNSHL , N , L , & IESEL , ITYPE , NENRGY , XLCUTA , & PL2A , PL3A & ) C C C----------------------------------------------------------------------- C C ******************* FORTRAN77 FUNCTION: R8FORM ********************** C C PURPOSE: CALCULATES CHARGE EXCHANGE L-RESOLVED CROSS-SECTION AS A C FRACTION OF THE CORRESPONDING N-RESOLVED CROSS-SECTION. C C CALLING PROGRAM: GENERAL USE. C C FUNC : (R*8) R8FORM = L-RESOLVED CROSS-SECTION AS FRACTION OF C N-REOSLVED CROSS-SECTION. C INPUT : (I*4) MXNENG = MAXIMUM NO. OF ENERGIES. C INPUT : (I*4) MXNSHL = MAXIMUM NO. OF N SHELLS. C INPUT : (I*4) N = PRINCIPAL QUANTUM NUMBER. C INPUT : (I*4) L = ORBITAL QUANTUM NUMBER. C INPUT : (I*4) IESEL = SELECTED ENERGY INDEX. C INPUT : (I*4) ITYPE = TYPE OF APPROXIMATION TO USE. C = 1 = 2L+1 INCREASE WITH L AND EXPONENTIAL C CUTOFF AS L/LCUT. C = 2 = 2L+1 INCREASE WITL L, SHARP CUTOFF AT C MIN(LCUT,N-1). C = 3 = (2L+1)**2 INCREASE WITH L, SHARP C CUTOFF AT MIN(LCUT,N-1). C = 4 = KRONECKER DELTA(L,MIN(LCUT,N-1)). C = 5 = 2L+1 INCREASE WITH L AND EXP. CUTOFF C AS MAX(0,L-LCUT)/2. C = 6 = 2L+1 INCREASE WITH L AND EXP. CUTOFF C AS 2*MAX(0,L-LCUT). C = 7 = NEW PRIMARY FORM BASED ON SPFMAN13 C FITTING PROCEDURE WITH SHARP SWITCHING C FUNCTIONS. C = 8 = NEW PRIMARY FORM BASED ON SPFMAN13 C FITTING PROCEDURE WITH SOFT SWITCHING C FUNCTIONS. C INPUT : (I*4) NENRGY = NUMBER OF ENERGIES IN DATASET. C INPUT : (R*8) XLCUTA() = PARAMETERS FOR CALCULATING L-RES X-SEC. C DIMENSION: ENERGY INDEX C INPUT : (R*8) PL2A() = PARAMETERS FOR CALCULATING L-RES X-SEC. C DIMENSION: ENERGY INDEX C INPUT : (R*8) PL3A() = PARAMETERS FOR CALCULATING L-RES X-SEC. C DIMENSION: ENERGY INDEX C C PARAM : (I*4) MXB = 'MXBEAM'. C PARAM : (I*4) MXN = 'MXNSHL'. C PARAM : (I*4) MXTYPE = NO. OF DIFFERENT APPROXIMATIONS. C PARAM : (R*8) C1 = C C (I*4) LCUT = CUT OFF VALUE FOR ORBITAL QUANTUM NUMBER. C (I*4) LC = CUT OFF VALUE FOR ORBITAL QUANTUM NUMBER. C (I*4) NN = PRINCIPAL QUANTUM NUMBER LOOP INDEX. C (I*4) LL = ORBITAL QUANTUM NUMBER LOOP INDEX. C (I*4) IE = ENERGY LOOP INDEX. C C (R*8) SUM = C (R*8) XLC = REAL VALUE = LC. C (R*8) XL = REAL VALUE = L. C (R*8) XLL = REAL VALUE = LL. C (R*8) EF = C (R*8) XLCRIT = C (R*8) T = C (R*8) S1 = C (R*8) S2 = C (R*8) T1 = C (R*8) T2 = C C (R*8) SUM1A() = TABLE OF SUMS FOR 1ST APPROXIMATION. C 1ST DIMENSION: L CUTOFF C 2ND DIMENSION: N-SHELL C (R*8) SUM5A() = TABLE OF SUMS FOR 5TH APPROXIMATION. C 1ST DIMENSION: L CUTOFF C 2ND DIMENSION: N-SHELL C (R*8) SUM6A() = TABLE OF SUMS FOR 6TH APPROXIMATION. C 1ST DIMENSION: L CUTOFF C 2ND DIMENSION: N-SHELL C (R*8) SUM7A() = TABLE OF SUMS FOR 7TH APPROXIMATION. C 1ST DIMENSION: ENERGY INDEX C 2ND DIMENSION: N-SHELL C (R*8) SUM8A() = TABLE OF SUMS FOR 8TH APPROXIMATION. C 1ST DIMENSION: ENERGY INDEX C 2ND DIMENSION: N-SHELL C C (L*4) LFIRST() = FLAGS IF FIRST CALL OF APPROXIMATION. ONLY C USED BY APPROX. WHICH REQUIRE AN INTIAL C SUM C = .TRUE. = FIRST CALL. C = .FALSE. = NOT FIRST CALL. C 1ST DIMENSION: APPROX. TYPE INDEX C C ROUTINES: C ROUTINE SOURCE BRIEF DESCRIPTION C ------------------------------------------------------------- C I4UNIT ADAS RETURN UNIT NO. FOR OUTPUT OF MESSAGES. C C AUTHOR: JONATHAN NASH (TESSELLA SUPPORT SERVICES PLC) C K1/0/81 C JET EXT. 5183 C C DATE: 19/10/93 C C UPDATES: C C VERSION: 1.2 DATE: 23-06-98 C MODIFIED: RICHARD MARTIN C - INCREASED MXE FORM 30 TO 40. C C----------------------------------------------------------------------- C C----------------------------------------------------------------------- INTEGER IESEL, ITYPE, L, MXNENG INTEGER MXNSHL, N, NENRGY REAL*8 PL2A(MXNENG), PL3A(MXNENG) REAL*8 XLCUTA(MXNENG)