PROGRAM sphere_HS
IMPLICIT NONE
INTEGER NZ,I,K,Dim,NN,J,n,II,JJ,KK,IMAX,lm,T1,T2
PARAMETER (NZ=2000,Dim=62,NN=61,T1=15,T2=30)
real(kind=8) DZ,PI,F,ETA,Y,SADD,SUMP,Rc0,RC,S,z,sum,Fai
real(kind=8) AMU(Dim),FF(Dim,NZ)
real(kind=8) RHO(Dim,2*NZ),RO(Dim,2*NZ)
real(kind=8) RHO1(Dim,2*NZ),RH(Dim,2*NZ)
real(kind=8) SIGMA(DIM),TEMP,RCI,RHOBC,TEN,RD(Dim,2*NZ)
PARAMETER (PI=3.141592654)
real(kind=8) RHOB(Dim),TF,DEFF(Dim),H,Z0,ZH,TEMP0(30000)
real(kind=8) ZZ1,rmax,rr,dr,PHI(DIM,2*NZ)
real(kind=8) ANX1,ANX2,PPP,R,DDE1,DDE2,PT1(NZ),PT2(NZ),PF(NZ)
real(kind=8) AMU1,AMU2,MIUT1,MIUT2,WR,mDirCorFun(dim,dim,2048)
real(kind=8) FDirCorFun(dim,dim,2048),SDirCorFun(dim,dim,2048)
real(kind=8) DirCorFun(dim,dim,2048),cDirCorFun(DIM,DIM,2*NZ)
real(kind=8) Epsi_Thigma(Dim),sigma1(Dim,Dim),rs(Dim,Dim)
real(kind=8) Epsi_Thigma1(Dim,Dim),z1,Uatt(DIm,Dim,2*NZ)
91 FORMAT(1X,2000g15.6)
do i=1,NN
SIGMA(i)=1.0
enddo
sigma(dim)=4.0
F=0.005D0
DZ=0.02D0*SIGMA(1)
ETA=0.35
Fai=0.1
DO I=1,T2
RHOB(I)=0.0001
ENDDO
DO I=T2+1,NN
RHOB(I)=ETA*(1-Fai)*6./PI/sigma(I)**3/DFLOAT(NN-T2)
ENDDO
RHOB(Dim)=ETA*Fai*6./PI/sigma(dim)**3
write(*,*) RHOB
CALL CPS(Dim,SIGMA,RHOB,AMU)
write(*,*) AMU
SUBROUTINE CPS(M,R,ROU,AMU)
INTEGER M
real(kind=8) R(M),ROU(M),AMU(M),amu1(M)
real(kind=8) ATT(2),PI,PIA,A1,A2,A3,A4
real(kind=8) AKX0,AKX1,AKX2,AKX3,F2,DF3,PHS
real(kind=8) AKX31,AKX31S,AKX31C
PARAMETER (PI=3.141592654)
AKX0=0.0
AKX1=0.0
AKX2=0.0
AKX3=0.0
PIA=PI/6.
DO 10 I=1,M
AKX0=AKX0+ROU(I)
AKX1=AKX1+ROU(I)*R(I)/2 ! R is diameter
AKX2=AKX2+ROU(I)*R(I)*R(I)*PI
AKX3=AKX3+ROU(I)*R(I)**3*PIA
10 CONTINUE
AKX31=1.0-AKX3
AKX31S=AKX31*AKX31
AKX31C=AKX31S*AKX31
PHS=AKX0/AKX31+AKX1*AKX2/AKX31S+(3.-AKX3)*AKX2**3/AKX31C/36./PI
F2=DLOG(AKX31)+AKX3/AKX31-0.5*(AKX3/AKX31)**2
F3=2.*DLOG(AKX31)+AKX3*(1.+AKX31)/AKX31
DO 20 I=1,M
A1=-DLOG(AKX31) + AKX2/AKX31*R(I)/2.
A2=AKX1/AKX31*PI*R(I)**2
& +3*AKX2**2*(DLOG(AKX31)*AKX31S+AKX3)/36./PI/AKX3**2/AKX31S
& *PI*R(I)**2
A3=(AKX0/AKX31+AKX1*AKX2/AKX31S)*R(I)**3*PIA
A4=(-AKX2**3/36./PI/AKX3**2/AKX31
& -2.*AKX2**3/36./PI/AKX3**3*DLOG(AKX31)
& -AKX2**3*(1.-3.*AKX3)/36./PI/AKX31**3/AKX3**2)*R(I)**3*PIA
AMU(I)=A1+A2+A3+A4
20 CONTINUE
RETURN
END
fcode 发表于 2015-10-29 11:59
parameter 常数默认是在调试器里看不到的。
IVF编译器可以增加开关: /debug-parameters:all 来实现调试时 ...
undefined2.JPG (128.08 KB, 下载次数: 452)
fcode 发表于 2015-10-29 16:25
你必须在变量的有效作用域里面断点,才能看到他。
从你的截图里,我看不到断点在哪儿。 ...
fcode 发表于 2015-10-29 18:25
比如说,子程序的局部变量,作用域就在本子程序内部。出了这个子程序,它就作用不到了。这就是作用域。
不 ...
fcode 发表于 2015-10-29 18:52
重新截个图吧。
注意:
1. 让我看到断点,并且在子程序的中间(而不是在结束的位置)
1.JPG (203.86 KB, 下载次数: 480)
fcode 发表于 2015-10-29 21:45
OK。win7下请不要用CVF,会有很多莫名其妙的问题。
详见:http://cvfwin7.w.fcode.cn ...
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |