Introduction
Introduction Statistics Contact Development Disclaimer Help
tadded script to continue simulations where they ended - sphere - GPU-based 3D …
git clone git://src.adamsgaard.dk/sphere
Log
Files
Refs
LICENSE
---
commit c72bb0d5a18abae1b8ca2983d757fa813cf625b6
parent 782ab30d3a9320b25581637664f1fdb0ca0d3844
Author: Anders Damsgaard <[email protected]>
Date: Thu, 4 Sep 2014 12:35:11 +0200
added script to continue simulations where they ended
Diffstat:
A python/continue_sim.py | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/python/continue_sim.py b/python/continue_sim.py
t@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+import sphere
+import sys
+
+def print_usage():
+ print('Usage: ' + sys.argv[0]
+ + ' <simulation id> <fluid> <device> [end_time]')
+ print('where "simulation id" is a string and "fluid" is either 0 or 1.')
+ print('"device" is the number of the GPU device.')
+ print('The total simulation can optionally be changed with the end_time '
+ 'parameter')
+
+if len(sys.argv) < 2:
+ print_usage()
+ sys.exit(1)
+
+else:
+ sim = sphere.sim(sys.argv[1], fluid = int(sys.argv[2]))
+ sim.readlast()
+ if len(sys.argv) == 5:
+ sim.time_total = float(sys.argv[4])
+ sim.run(device=sys.argv[3])
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.