Search Site | Contact Details | FAQ

ADAS Subroutine cxpmat

	SUBROUTINE  CXPMAT(PRMAT,NRES,MAXTE,MAXNE,MAXEB,EBRAY,TERAY,
     &			   NERAY,NB,RCMAT,TEREF, NEREF,EBREF,ITREF,
     &			   INREF,IEREF,IUNIT,INFILE,INA,ITA,IEA,
     &			   NBENG,NTEMP,NDENS,NLEV)
C----------------------------------------------------------------------
C
C	********** FORTRAN 77 ROUTINE : CXPMAT.FOR **********
C
C   PURPOSE : TO INTERROGATE AND EXTRACT THE  PROJECTION MATRICES
C	      WHICH ARE GENERATED USING ADAS311
C
C   INPUT   : 
C
C
C	    (I*4)       INUNIT		: STREAM NUMBER FOR ACCESSING
C					  INPUT FILE.
C	    (I*4)	NBENG		: MAXIMUM NUMBER OF ENERGIES.
C	    (I*4)	NDENS		: MAXIMUM NUMBER OF DENSITIES.
C	    (I*4)	NTEMP		: MAXIMUM NUMBER OF TEMPS.
C	    (I*4)	NLEV		: MAXIMUM NUMBER OF LEVELS
C					  CONTAINED IN THE PROJECTION
C					  AND RECOMBINATION MATRICES.
C	    (CHR)	INFILE		: INPUT FILENAME TO BE 
C					  INTERROGATED.
C
C   OUTPUT  :  
C
C	    (R*8)	PRMAT()		: PROJECTION MATRIX.
C					  1ST DIM.: LEVEL INDEX.
C					  2ND DIM.: LEVEL INDEX.
C					  3RD DIM.: ENERGY INDEX.
C					  4TH DIM.: DENSITY INDEX.
C					  5TH DIM.: TEMPERATURE INDEX.
C	    (R*8)	RCMAT()		: COLLISIONAL-RADIATIVE
C					  RECOMBINATION COEFFICIENTS.
C					  1ST DIM.: LEVEL INDEX.
C					  2ND DIM.: ENERGY INDEX.
C					  3RD DIM.: DENSITY INDEX.
C					  4TH DIM.: TEMPERATURE INDEX.
C	    (R*8)	EBRAY()		: ARRAY CONTAINING THE NEUTRAL
C				          BEAM ENERGY (eV/amu).
C					  1ST DIM.: ENERGY INDEX.
C	    (R*8)	TERAY()		: ARRAY CONTAINING THE
C					  TEMPERATURE (eV).
C					  1ST DIM.: TEMPERATURE INDEX.
C	    (R*8)	NERAY()		: ARRAY CONTAINING THE ELECTRON
C					  DENSITY.
C					  1ST DIM.: DENSITY INDEX.
C	    (R*8)	TEREF		: REFERENCE TEMPERATURE (eV).
C	    (R*8)	NEREF		: REFERENCE ELECTRON DENSITY (cm-3).
C	    (R*8)	EBREF		: REFERENCE BEAM ENERGY (eV amu-1).
C	    (R*8)	NB		: NEUTRAL BEAM DENSITY (cm-3)
C
C	    (I*4)	NRES		: NUMBER OF RESOLVED LEVELS
C					  CONTAINED IN THE COLLISIONAL
C					  RADIATIVE MATRIX.
C	    (I*4)	MAXTE		: NUMBER OF TEMPERATURES CONTAINED
C					  IN THE INPUT FILE.
C	    (I*4)	MAXNE		: NUMBER OF DENSITIES CONTAINED 
C					  IN THE INPUT FILE.
C	    (I*4)	MAXEB		: NUMBER OF BEAM ENERGIES CONTAINED
C					  IN THE INPUT FILE.
C	    (I*4)	ITREF		: INDEX FOR REFERENCE TEMPERATURE.
C					  TO BE USED INCONJUCTION WITH THE
C					  ARRAY ITA().
C	    (I*4)	INREF		: INDEX FOR REFERENCE DENSITY.
C					  TO BE USED INCONJUCTION WITH THE
C					  ARRAY INA().
C	    (I*4)	IEREF		: INDEX FOR REFERENCE BEAM ENERGY.
C					  TO BE USED INCONJUCTION WITH THE
C					  ARRAY IEA().
C	    (I*4)	INA()		: ARRAY CONTAINING THE DENSITY
C					  INDEX.
C	    (I*4)	IEA()		: ARRAY CONTAINING THE ENERGY
C					  INDEX.
C	    (I*4)	ITA()		: ARRAY CONTAINING THE 
C					  TEMPERATURE INDEX.
C
C  GENERAL  :
C
C	    (R*8)	EB		: NEUTRAL BEAM ENERGY (eV/AMU).
C	    (R*8)	TE		: ELECTRON TEMPERATURE (eV).
C	    (R*8)	TP		: ION TEMPERATURE (K).
C	    (R*8)	NE		: ELECTRON DENSITY (cm-3).
C	    (R*8)	NP		: ION DENSITY (cm-3).
C
C	    (I*4)	NTOTAL		: COUNTER USED TO DETERMINE HOW
C					  MANY TABULATED TABLES TO BE
C					  READ FROM INPUT FILE.
C	    (I*4) 	I		: GENERAL COUNTER.
C	    (I*4)       J		: GENERAL COUNTER.
C	    (I*4)	K		: GENERAL COUNTER.
C	    (I*4)	IN		: GENERAL INDEX.
C	    (I*4)	IT		: GENERAL INDEX.
C	    (I*4)	IE		: GENERAL INDEX.
C	    (I*4)	ITCOUNT		: NUMBER OF TEMPERATURES.
C	    (I*4)	INCOUNT		: NUMBER OF DENSITIES.
C	    (I*4)	IECOUNT	        : NUMBER OF BEAM ENERGIES.
C	    (I*4)	ICOUNT		: GENERAL COUNTER.
C	    (CHR)	LINE		: GENERAL VARIABLE.
C	
C
C
C
C   ROUTINES:
C          ROUTINE    SOURCE    BRIEF DESCRIPTION
C          ------------------------------------------------------------
C          CCFIND     ADAS    IDENTIFIED REPEATED VALUES IN ARRAY.
C	   CCSORT     ADAS    SORTS ARRAY VALUES INTO INCREASING ORDER.   
C	   CCFILL     ADAS    FILLS ARRAY WITH CORRESPONDING INDEX.
C 
C
C
C   AUTHOR  : HARVEY ANDERSON
C	      UNIVERSITY OF STRATHCLYDE
C	      ANDERSON@PHYS.STRATH.AC.UK
C
C   DATE    : 30/8/99
C
C  VERSION  : 1.2                          
C  DATE     : 23-01-2001
C
C  MODIFIED : Martin O'Mullane  
C             Declaration of variables is not standard. NTEMP is 
C             defined after it is first used to dimension a 
C             variable length input array. Reconfigure variable 
C             definitions to follow ADAS conventions.
C
C----------------------------------------------------------------------
      CHARACTER*80        INFILE
      INTEGER             IEA(NBENG),  IEREF,       INA(NDENS),  INREF
      INTEGER             ITA(NTEMP),  ITREF,       IUNIT,       MAXEB
      INTEGER             MAXNE,       MAXTE,       NBENG,       NDENS
      INTEGER             NLEV,        NRES,        NTEMP
      REAL*8              EBRAY(NBENG),             EBREF,       NB
      REAL*8              NERAY(NDENS),             NEREF
      REAL*8              PRMAT(NLEV,NLEV,NBENG,NDENS,NTEMP)
      REAL*8              RCMAT(NLEV,NBENG,NDENS,NTEMP)
      REAL*8              TERAY(NTEMP),             TEREF
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk