[Fortran] 纯文本查看 复制代码
Module param
Implicit None
Integer :: i, j, no1, np, kind_p2, lz, ncz, lx, ncx, lz2, nct, ii, jj, qq, no, g2, g3, g5, notemp, nptemp, r, nfile
Integer :: n21, n22, n51, n32, n41, n42, ni, k, b, icell, kcell, nn, nnx, nnz, nbfd, nnn, nbfu, jj_start, time1
Integer, Parameter :: npmax = 15000, kindp = 2, nct_max = 3000, nplink_max = 120, b1max = 100, b2max = 9940
Integer :: lv(b1max), lm(b2max), iflag(npmax), ibox(nct_max, 2, nplink_max), nc(nct_max, kindp)
Double Precision :: ax(npmax), az(npmax), ac(npmax), udot(npmax), wdot(npmax)
Double Precision :: cdot(npmax), xp(npmax), zp(npmax), up(npmax)
Double Precision :: wp(npmax), c(npmax), mass(npmax), xpp(b2max), zpp(b2max), upp(b2max), wpp(b2max)
Double Precision :: xptemp(npmax), zptemp(npmax), uptemp(npmax), wptemp(npmax), ctemp(npmax)
Double Precision :: cpp(b2max), xdot(npmax), zdot(npmax), xo(npmax), zo(npmax), uo(npmax), wo(npmax), co(npmax)
Double Precision :: etap, d, drx, drz, rr2, fourh2, dux, duz, dcij, rr, hsml, tdwdr, eta, rho, niminx, nimaxx, niminz, nimaxz, nominx
Double Precision :: nomaxx, nominz, nomaxz, npminx, npmaxx, npminz, npmaxz, n2minx, n2maxx, n3minx, n3maxx, n5minxx, n5maxx
Double Precision :: xmin_ini, zmin_ini, xmax_ini, zmax_ini, one_over_2h, one_over_h, tw, factor, pi, g, time, dt, dt2, tmax
Double Precision :: ncall11, ncall12, ncall13, h2
Integer :: j1, j2, kind_p1, ini_kind_p2, lx2, ni1, n_start, n_end, kind_p
Double Precision :: q
Double Precision :: llx, llz, dx, dz, lxx, lzz, ddx, ddz
End Module param
Program sph
Use param
Implicit None
ni = 4036
ni1 = 4037
llx = 2.5E-2
llz = 2.5E-4
lxx = 2.5E-2 + 4*2.5E-5
lzz = 2.5E-4 + 4*2.5E-5
dx = 2.5E-5
dz = 2.5E-5
no = 4056
np = 14056
r = 20
k = 0
Do i = 1, 14
Do j = 1, 1004
k = k + 1
xp(nn) = (j-1)*dx - 0.5*(lxx-llx)
zp(nn) = (i-1)*dz - 0.5*(lzz-llz)
up(nn) = 0.0
wp(nn) = 0.0
c(nn) = 0.0
End Do
End Do
Call checklimits
End Program sph