sphere

GPU-based 3D discrete element method algorithm with optional fluid coupling
git clone git://src.adamsgaard.dk/sphere
Log | Files | Refs | LICENSE

commit 34f01363db74cfd472ee09cdf7ab9bb257a8b85d
parent 10c5001d73fca1fa262b8ec5144bc5ecc3cbb62d
Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date:   Fri, 20 Feb 2015 11:47:59 +0100

optionally write contact force VTK files

Diffstat:
Mpython/sphere.py | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/python/sphere.py b/python/sphere.py @@ -1421,7 +1421,7 @@ class sim: if fh is not None: fh.close() - def writeVTKall(self, cell_centered = True, verbose = True): + def writeVTKall(self, cell_centered = True, verbose = True, forces = False): ''' Writes a VTK file for each simulation output file with particle information and the fluid grid to the ``../output/`` folder by default. @@ -1480,12 +1480,21 @@ class sim: if sb.np[0] > 0: if i == 0: sb.writeVTK(verbose=verbose) + if forces: + sb.findContactStresses() + sb.writeVTKforces(verbose=verbose) elif i == lastfile: if verbose: print("\tto") sb.writeVTK(verbose=verbose) + if forces: + sb.findContactStresses() + sb.writeVTKforces(verbose=verbose) else: sb.writeVTK(verbose=False) + if forces: + sb.findContactStresses() + sb.writeVTKforces(verbose=False) if self.fluid: if i == 0: sb.writeFluidVTK(verbose=verbose,