C "top program" for rpressfw(main); full-wawe ("fw") option C dynamic memory handling C Sven Ivansson 1992 PROGRAM main ! RPRESSFW IMPLICIT NONE INCLUDE 'RPPARAMETER.INC' C nol <= noldim INCLUDE 'INPARAM.INC' ! to set kfwtyp, kfwbess INCLUDE 'fw/FWPARAM.INC' ! to set iystab INTEGER LX,LITOP,ICWORKDIM, N8BYTES, $ IVM_EX, IVM_PM0GOR, IVM_EPS0, IVM_CR9T1E, IVM_CPRESSW, $ IVM_CPLOK, IVM_CP, ISLASK C ------------------------------------------------------------- WRITE(*,*) WRITE(*,*) 'Give KFWTYP (for ys comp; 1,2,3,4) :' READ(*,*) KFWTYP IF ( KFWTYP.EQ.2 .OR. KFWTYP.EQ.4 ) THEN KFWBESS = 0 ! J0, H0(1) ELSE IF ( KFWTYP.EQ.1 .OR. KFWTYP.EQ.3 ) THEN KFWBESS = 1 ! J1, H1(1) ELSE STOP 12345 END IF WRITE(*,*) 'Give IYSTAB (for ys stabilization; -1="ordinary", ', $ '1="x") :' READ(*,*) IYSTAB WRITE(*,*) WRITE(*,*) 'Give LX, LI(top), ICWORKDIM :' WRITE(*,*) '( continuous wave: lx <= 1 )' WRITE(*,*) '( transient: lx "positive-integer power of 2" )' READ(*,*) LX, LITOP, ICWORKDIM IF (LX.EQ.0) LX = 1 C allocate space for real*8 ex(1:lx) N8BYTES = LX CALL DAREALLOS (N8BYTES,ISLASK,IVM_EX) C allocate space for real*8 pm0gor(1:litop) N8BYTES = LITOP CALL DAREALLOS (N8BYTES,ISLASK,IVM_PM0GOR) C allocate space for real*8 eps0(1:litop) N8BYTES = LITOP CALL DAREALLOS (N8BYTES,ISLASK,IVM_EPS0) C allocate space for complex*16 cr9t1e(1:litop) N8BYTES = 2*LITOP CALL DAREALLOS (N8BYTES,ISLASK,IVM_CR9T1E) C allocate space for complex*16 cpressw(1:icworkdim) N8BYTES = 2*ICWORKDIM CALL DAREALLOS (N8BYTES,ISLASK,IVM_CPRESSW) C allocate space for complex*8 cplok(1:lx) N8BYTES = LX CALL DAREALLOS (N8BYTES,ISLASK,IVM_CPLOK) C allocate space for complex*8 cp(1:lx,1:litop) N8BYTES = (LX*LITOP) CALL DAREALLOS (N8BYTES,ISLASK,IVM_CP) C ------------------------------------------------------------- CALL RPRESSMAIN ( 5,6, -20, LX,LITOP,ICWORKDIM, %VAL(IVM_EX), $ %VAL(IVM_PM0GOR), %VAL(IVM_EPS0), %VAL(IVM_CR9T1E), $ %VAL(IVM_CPRESSW), %VAL(IVM_CPLOK), %VAL(IVM_CP) ) !!! "-" flag C ------------------------------------------------------------- C the "de-allocation" below is actually done automatically upon exit C de-allocate the space for real*8 ex(1:lx) N8BYTES = LX CALL DAREDEALS (ISLASK,IVM_EX) C de-allocate the space for real*8 pm0gor(1:litop) N8BYTES = LITOP CALL DAREDEALS (ISLASK,IVM_PM0GOR) C de-allocate the space for real*8 eps0(1:litop) N8BYTES = LITOP CALL DAREDEALS (ISLASK,IVM_EPS0) C de-allocate the space for complex*16 cr9t1e(1:litop) N8BYTES = 2*LITOP CALL DAREDEALS (ISLASK,IVM_CR9T1E) C de-allocate the space for complex*16 cpressw(1:icworkdim) N8BYTES = 2*ICWORKDIM CALL DAREDEALS (ISLASK,IVM_CPRESSW) C de-allocate the space for complex*8 cplok(1:lx) N8BYTES = LX CALL DAREDEALS (ISLASK,IVM_CPLOK) C de-allocate the space for complex*8 cp(1:lx,1:litop) N8BYTES = (LX*LITOP) CALL DAREDEALS (ISLASK,IVM_CP) STOP C ------------------------------------------------------------- END