Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
program script
character fnme*256,c4*4,d4*4
print*,'Enter file name >'
read (*,'(a)') fnme
open (7,file=trim(fnme),status='old')
open (9,file='script.sh',status='unknown')
write (9,'(a)') '#!/bin/sh'
jstep=0
1 read (7,*,end=999) x1,y1,z1,phi1,theta1,dist1,istep1,nstep
if (jstep.eq.0) then
x0=x1
y0=y1
z0=z1
phi0=phi1
theta0=theta1
dist0=dist1
istep0=istep1
endif
do i=1,nstep
jstep=jstep+1
fact=float(i)/nstep
istep=int(float(istep0)+float(istep1-istep0)*fact)
x=x0+(x1-x0)*fact
y=y0+(y1-y0)*fact
z=z0+(z1-z0)*fact
phi=phi0+(phi1-phi0)*fact
theta=theta0+(theta1-theta0)*fact
dist=dist0+(dist1-dist0)*fact
write (c4,'(i4)') istep
if (istep.lt.10) c4(1:3)='000'
if (istep.lt.100) c4(1:2)='00'
if (istep.lt.1000) c4(1:1)='0'
write (d4,'(i4)') jstep
if (jstep.lt.10) d4(1:3)='000'
if (jstep.lt.100) d4(1:2)='00'
if (jstep.lt.1000) d4(1:1)='0'
open (8,file='SCE/scenario'//d4//'.in',status='unknown')
write (8,'(a)') 'OUT'
write (8,*) istep
write (8,'(a)') 'n'
close (8)
write (9,'(a)') './post < SCE/scenario'//d4//'.in'
write (9,'(a,6f10.2,a)') 'python Create_png.py StrainRateTopo.mv ',x,y,z,phi,theta,dist,' IMG/junk'//d4//'.png'
enddo
x0=x1
y0=y1
z0=z1
phi0=phi1
theta0=theta1
dist0=dist1
istep0=istep1
goto 1
999 continue
end