C "top program" for rpress(main) C dynamic memory handling C Sven Ivansson 1991 PROGRAM main ! RPRESS IMPLICIT NONE INCLUDE 'INPARAM.INC' ! to set kfwtyp, kfwbess INCLUDE 'fw/FWPARAM.INC' ! to set iystab (for output only) INTEGER LX,LITOP,ICWORKDIM, N8BYTES, $ IVM_EX, IVM_PM0GOR, IVM_EPS0, IVM_CR9T1E, IVM_CPRESSW, $ IVM_CPLOK, IVM_CP, ISLASK C ------------------------------------------------------------- KFWTYP = 4 ! fourth component of the displacement-stress vector KFWBESS = 0 ! J0, H0(1) IYSTAB = 0 ! not relevant for the computations 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) ) 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