tsmall fixes, findOverlaps works - sphere - GPU-based 3D discrete element metho… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 38c4e8e94d69431d60105de0ec5583cf5ede7acc | |
parent 4d7fc20cc3683d3021cc70b24449b4bb18c4fb31 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Tue, 30 Sep 2014 15:12:12 +0200 | |
small fixes, findOverlaps works | |
Diffstat: | |
M python/sphere.py | 2 +- | |
M src/main.cpp | 4 +++- | |
2 files changed, 4 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/python/sphere.py b/python/sphere.py | |
t@@ -3666,7 +3666,7 @@ class sim: | |
self.writebin(verbose=False) | |
subprocess.call('cd .. && ./sphere --contacts input/' + self.sid | |
+ '.bin > output/' + self.sid + '.contacts.txt', shell=True) | |
- contactdata = numpy.loadtxt('output/' + self.sid + '.contacts.txt') | |
+ contactdata = numpy.loadtxt('../output/' + self.sid + '.contacts.txt') | |
self.pairs = numpy.array((contactdata[:,0], contactdata[:,1]), | |
dtype=numpy.int32) | |
self.overlaps = numpy.array(contactdata[:,2]) | |
diff --git a/src/main.cpp b/src/main.cpp | |
t@@ -108,8 +108,10 @@ int main(const int argc, const char *argv[]) | |
else if (argvi == "-f" || argvi == "--fluid") | |
fluid = 1; | |
- else if (argvi == "-c" || argvi == "--contacts") | |
+ else if (argvi == "-c" || argvi == "--contacts") { | |
+ verbose = 0; | |
print_contacts = 1; | |
+ } | |
else if (argvi == "-d") { | |
device = atoi(argv[i+1]); |