commit | author | age
|
38cb4a
|
1 |
#!/usr/bin/python3 |
9f5ff5
|
2 |
from trisurf import tsmgr |
SP |
3 |
from trisurf import trisurf |
|
4 |
|
3d0247
|
5 |
|
a3f6b7
|
6 |
|
SP |
7 |
print("Running trisurf version "+ tsmgr.getTrisurfVersion()) |
|
8 |
|
3d0247
|
9 |
#Simple example how to start simulation from a previos snapshot |
9f5ff5
|
10 |
run1=trisurf.Runner(snapshot='snapshot.vtu') |
SP |
11 |
run1.setMaindir(("N","k","V","Np","Nm"),("nshell","xk0","constvolswitch","npoly","nmono")) |
|
12 |
run1.setSubdir("run0") |
|
13 |
|
3d0247
|
14 |
#Example how to start simulation from tape. Extra argument in runArgs will be passed to trisurf executable (meaning that simulation will always start from the beginning (bipyramid) ignoring the fact that some states may have been calculated already) |
9f5ff5
|
15 |
run2=trisurf.Runner(tape='tape', runArgs=['--force-from-tape']) |
SP |
16 |
run2.setMaindir(("N","k","V","Np","Nm"),("nshell","xk0","constvolswitch","npoly","nmono")) |
|
17 |
run2.setSubdir("run1") |
|
18 |
|
3d0247
|
19 |
#Example of programatical setup of 4 runs |
SP |
20 |
pRun=[] |
|
21 |
for i in range(0,4): #0,1,2,3 |
|
22 |
tpRun=trisurf.Runner(tape='tape') |
|
23 |
tpRun.setMaindir(("N","k","V","Np","Nm"),("nshell","xk0","constvolswitch","npoly","nmono")) |
|
24 |
tpRun.setSubdir("programatical_"+str(i)) |
|
25 |
pRun.append(tpRun) |
9f5ff5
|
26 |
|
SP |
27 |
|
3d0247
|
28 |
#obligatory final configuration step: combine all runs |
SP |
29 |
Runs=[run1,run2]+pRun |
|
30 |
#start manager with configured runs |
9f5ff5
|
31 |
tsmgr.start(Runs) |
SP |
32 |
|