林聰悟
記得第一次見到葉老師是他剛從新加坡任教回系不久而我從MIT遊學回來的時候,後來他給我一篇MIT有關快速富利葉轉換的文章,然後發現有關非2基底的程式都超過400行,完全無法與僅20幾行的2基底程式相比。受到葉老師的啟發,覺得這麼有趣的數學方法,應該可以有更好的方式,後來就完成40行(不計說明行)的程式如下並以之紀念葉老師。
*************************************************************************
SUBROUTINE FFTA(F,A,N,INV)
C ===================================================================== *
IMPLICIT REAL*8 (A-H,O-Z)
COMPLEX*16 F(0:N-1),A(0:N-1)
C ===================================================================== *
C F(N) = Input (FI) and Output (FO) data array of arbitrary N *
C A(N) = Working array (F1,F2,F3,…) reqd for N .NE. 2**Integer only *
C ——————————————————————— *
C FO(K5,K4,K3,K2,K1)=FI(L1,L2,L3,L4,L5)W^(L1,L2,L3,L4,L5)(K5,K4,K3,K2,K1)
C where W = EXP(i*(-2*PI*INV/N)) *
C ===================================================================== *
C For NOW = 2 (N5=N4=N3=2) : by DO 290 *
C ——————————————————————— *
C F1(L1,L2,L3,L4,J5)=FI(L1,L2,L3,L4,I5)W^( 0, 0, 0, 0,I5)(J5, 0, 0, 0, 0)
C F2(L1,L2,L3,J4,K5)=F1(L1,L2,L3,I4,K5)W^( 0, 0, 0,I4, 0)(K5,J4, 0, 0, 0)
C F3(L1,L2,J3,K4,K5)=F2(L1,L2,I3,K4,K5)W^( 0, 0,I3, 0, 0)(K5,K4,J3, 0, 0)
C ——————————————————————— *
C Bit-reversal FR(L1,L2,K5,K4,K3)=F3(L1,L2,K3,K4,K5) : by DO 590 *
C ——————————————————————— *
C For NOW > 2 (N2>2, N1>2) : by DO 90 *
C ——————————————————————— *
C F4(L1,K5,K4,K3,J2)=FR(L1,I2,K5,K4,K3)W^( 0,I2, 0, 0, 0)(K5,K4,K3,J2, 0)
C FO(K5,K4,K3,K2,J1)=F4(I1,K5,K4,K3,K2)W^(I1, 0, 0, 0, 0)(K5,K4,K3,K2,J1)
C ===================================================================== *
C W^(0,0,I3,0,0)(K5,K4,J3,0,0) = W^(0,0,1,0,0)(K5,K4,J3,0,0)I3 = AR1^I3 *
C OMG = W^(0,0,1,0,0) = EXP(i*(-2*PI*INV/N)*NBF) *
C AR1 = W^(0,0,1,0,0)(K5,K4,J3,0,0) = 1*OMG*OMG*OMG*… *
C ——————————————————————— *
C NBFore = N1*N2*N3*N4 N1*N2*N3 N1*N2 N1 1 *
C NOW = N5 N4 N3 N2 N1 *
C NAFter = 1 N5 N5*N4 N5*N4*N3 N5*N4*N3*N2 *
C ——————————————————————— *
C IB = (L1,L2,L3,L4) (L1,L2,L3) (L1,L2) (L1) 0 *
C IN = (I5) (I4) (I3) (I2) (I1) *
C IA = 0 (K5) (K5,K4) (K5,K4,K3) (K5,K4,K3,K2) *
C IR = 0 (K5) (K4,K5) (K3,K4,K5) (K2,K3,K4,K5) *
C IM = (J5) (J4) (J3) (J2) (J1) *
C < for NOW=N2=5 > : ————————————————– *
C / FO(IB,IA,0) \ / W00 W01 W02 W03 W04 \ / FI(IB,0,IA) \ *
C | FO(IB,IA,1) | | W10 W11 W12 W13 W14 | | FI(IB,1,IA) | *
C | FO(IB,IA,2) | = | W20 W21 W22 W23 W24 | | FI(IB,2,IA) | *
C | FO(IB,IA,3) | | W30 W31 W32 W33 W34 | | FI(IB,3,IA) | *
C \ FO(IB,IA,4) / \ W40 W41 W42 W43 W44 / \ FI(IB,4,IA) / *
C ——————————————————————— *
C where : Wij = W^ij, W1j = W^j, W1j = AR1 = OMG^(IA,j) *
C ——————————————————————— *
C FO($#j)=FI($0#)+(FI($1#)+(FI($2#)+(FI($3#)+FI($4#)*W1j)*W1j)*W1j)*W1j *
C ===================================================================== *
IF(N.LE.1) RETURN
IFA=1
NBF=N
NAF=1
C** +———————————————————-+ **
C** | NOW = 2,..,3,..,5,..,7,..,11,..,13,..,17,.. | **
C** +———————————————————-+ **
NOW=2
20 IF((NBF/NOW)*NOW.NE.NBF) THEN
NOW=NOW+1
GO TO 20
ENDIF
NBF=NBF/NOW
IF(IFA.GT.0) CALL FFTBNA(F,A,NBF,NOW,NAF,INV)
IF(IFA.LT.0) CALL FFTBNA(A,F,NBF,NOW,NAF,INV)
IF(NOW.NE.2) IFA=-IFA
NAF=NAF*NOW
IF(NBF.GT.1) GOTO 20
C** +———————————————————-+ **
C** | Return transformed values in F(0:N-1) | **
C** +———————————————————-+ **
IF(IFA.GT.0) RETURN
DO 50 I=0,N-1
50 F(I)=A(I)
END
************************************************************************
SUBROUTINE FFTBNA(FI,FO,NBF,NOW,NAF,INV)
C** ============================================================ **
IMPLICIT REAL*8 (A-H,O-Z)
COMPLEX*16 FI(0:NBF-1,0:NOW-1,0:NAF-1),FO(0:NBF-1,0:NAF-1,0:NOW-1)
COMPLEX*16 OMG,AR1,FF
C** ============================================================ **
ANG=-6.2831853071795864D0/ISIGN(NOW*NAF,INV)
OMG=CMPLX(COS(ANG),SIN(ANG))
C** ———————————————————— **
AR1=(1.D0,0.D0)
DO 90 IM=0,NOW-1
DO 80 IA=0,NAF-1
DO 70 IB=0,NBF-1
FF=FI(IB,NOW-1,IA)
DO 60 IN=NOW-2,0,-1
60 FF=FF*AR1+FI(IB,IN,IA)
70 FO(IB,IA,IM)=FF
80 AR1=AR1*OMG
90 CONTINUE
RETURN
END
************************************************************************
我從MIT回來一年後土木系開始成立博士班,非常感謝葉老師的抬愛收我為徒,因此從葉老師學到的不只學理還有許多為人處世的道理。我的博士論文有部份內容參加 International conference on recent advance geotechnical earthquake engineering soil dynamics研討會。該文後來被當時分組主持教授Bielak引用並大量用於該教授主持的美國NSF區域大型研究計畫中。
我退休後有關以太的研究共有6篇,其中第一篇是葉老師主編祝福虞老師九十大壽之專刊邀文,後來繼續受到虞老師與葉老師的支持與鼓勵,並提供許多寶貴見解,才有後面的5篇文章。由於葉老師喜歡吟詩作詞,所以就將有關之以太力學論寫成下列不成體統的詩,本來想向葉老師報告與請益,無奈葉老師早走一步,只好借此專輯,遙寄老師以表敬意。
以太力學論
光電磁波萬有力,粒子速度等積律。
分明有趣力學題,遍尋無著此論據。
虛空隔空隨他戲,一世三紀已逝去。
實彈碰彈還我力,千頭萬緒始得續。
參考文獻:
- S. Yeh and T. W. Lin, “Dynamic Response of an Embedded Structure Generated by a SH-Wave,” Proc. int. conf. recent adv. geotech. earthquake eng. soil dyn., St. Louis, Missouri, 2, pp.809-814 (1981).
- Bielak and P. Christiano, “On the Effective Seismic Input for Non-linear Soil-Structure Interaction Systems,” Earthquake Engineering and Structural Dynamics, 12, pp.107-119 (1984).
- Christiano and J. Bielak, “Implementation of Effective Seismic Input for Soil-Structure Interaction Systems,” Earthquake Engineering and Structural Dynamics, 18, pp.615-625 (1988).
T.W. Lin, “The Mechanism Connecting Magnetic and Electric Forces,” The Chinese Journal of Mechanics, 12, 1, pp.109-115 (1996).
- W. Lin and H. Lin, “Newton’s Laws of Motion Based Substantial Aether Theory of the Universal Gravity Force,” Journal of Mechanics, 30, 3, pp.315-325 (2014).
- W. Lin and H. Lin, “Newton’s Laws of Motion Based Substantial Aether Theory for Electro-Magnetic Wave,” Journal of Mechanics, 30, 4, pp.435-442 (2014).
- W. Lin and H. Lin, “Mechanical Proof of the Maxwell Speed Distribution,” International Journal of Statistics and Probability, 8, 2, pp.90-98 (2019).
- Lin and T. W. Lin, “Mechanical Proof of the Maxwell-Boltzmann Speed Distribution With Analytical Integration,” International Journal of Statistics and Probability, 10, 3, pp.135-153 (2021).
- Lin and T. W. Lin, “Mechanical Proof of the Maxwell-Boltzmann Speed Distribution With Numerical Iterations,” International Journal of Statistics and Probability, 10, 4, pp.21-32 (2021).