forked from davecats/activeBarriers
-
Notifications
You must be signed in to change notification settings - Fork 2
/
barrierField.cpl
51 lines (48 loc) · 2.25 KB
/
barrierField.cpl
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
WRITE "!====================================!"
WRITE "! !"
WRITE "! active barrier Field !"
WRITE "! !"
WRITE "!====================================!"
WRITE "! "
WRITE "! This program computes the active "
WRITE "! barrier vector field "
WRITE "! "
WRITE "! to cite this software: "
WRITE "! "
WRITE "! G. Haller, S. Katsanoulis, M. Holzner, "
WRITE "! B. Frohnapfel and D. Gatti, Objective "
WRITE "! material barriers to the transport of "
WRITE "! momentum and vorticity. submitted (2020)"
WRITE "! "
USE ftledata
!
INTEGER iF = nfmin
!
LOOP WHILE {[IF dir>0 THEN nfmax ELSE iF]-[IF dir>0 THEN iF ELSE nfmax]}>0
IF iF=nfmin THEN
fieldname = WRITE(path"Field"iF".fld")
readVelocityField(fieldname, velocity(*,*,*,imod(iF)), active(*,*,*,imod(iF)))
END IF
STRING fieldname = WRITE(path"Field"iF+dir".fld")
readVelocityField(fieldname, velocity(*,*,*,imod(iF+dir)), active(*,*,*,imod(iF+dir)))
REAL chron=wallclock(); IF has_terminal THEN WRITE "Advances trajectories..."
LOOP FOR it=1 TO ODE(*,1).LENGTH
REAL chroni=wallclock(); IF has_terminal THEN WRITE " ", "ODE step ",it
set_ODE_step(INTEGER it)
linearInterpolator(velocity(*,*,*,imod(iF),*), velocity(*,*,*,imod(iF+dir),*), velocity(*,*,*,2,*))
IF has_terminal THEN WRITE " "," ", "velocity interpolation took "wallclock()-chroni" seconds"; END IF; REAL chroni=wallclock()
advance_trajectories(velocity(*,*,*,2))
IF has_terminal THEN WRITE " "," ", "advection took "wallclock()-chroni" seconds"; END IF; REAL chroni=wallclock()
linearInterpolator(active(*,*,*,imod(iF),*), active(*,*,*,imod(iF+dir),*), active(*,*,*,2,*))
IF has_terminal THEN WRITE " "," ", "active field interpolation took "wallclock()-chroni" seconds"; REAL chroni=wallclock()
advance_trajectories(velocity(*,*,*,2), active(*,*,*,2))
IF has_terminal THEN WRITE " "," ", "advection took "wallclock()-chroni" seconds"
compute_barrier_field()
REPEAT
IF has_terminal THEN WRITE " ","took "wallclock()-chron" seconds"
iF=~+dir
IF (iF-nfmin) MOD dn_save=0 AND (iF-nfmin)#0 THEN
save_flowmap(iF-nfmin)
save_barrierField(iF-nfmin)
END IF
REPEAT