Introduction
Introduction Statistics Contact Development Disclaimer Help
tparticle vtk files can be written without vtk module - sphere - GPU-based 3D d…
git clone git://src.adamsgaard.dk/sphere
Log
Files
Refs
LICENSE
---
commit 9625b73a6b76e9c4209e05ed4e13acd265290359
parent e2a12272ca527de82574fa07d2531cbf36c9c36d
Author: Anders Damsgaard <[email protected]>
Date: Mon, 30 Jun 2014 09:21:53 +0200
particle vtk files can be written without vtk module
Diffstat:
M python/sphere.py | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/python/sphere.py b/python/sphere.py
t@@ -9,7 +9,8 @@ import subprocess
try:
import vtk
except ImportError:
- print('Warning: Could not find "vtk" python module. VTK calls unavailable')
+ print('Warning: Could not find "vtk" python module. ' +
+ 'Fluid VTK calls will be unavailable')
py_vtk = False
else:
py_vtk = True
t@@ -1164,9 +1165,6 @@ class sim:
:param verbose: Show diagnostic information (default = True)
:type verbose: bool
'''
- if py_vtk == False:
- raise Exception('Error: vtk module not found.')
-
lastfile = status(self.sid)
sb = sim(fluid = self.fluid)
for i in range(lastfile+1):
t@@ -1226,8 +1224,6 @@ class sim:
:param verbose: Show diagnostic information (default = True)
:type verbose: bool
'''
- if py_vtk == False:
- raise Exception('Error: vtk module not found.')
fh = None
try :
t@@ -1469,7 +1465,8 @@ class sim:
:type verbose: bool
'''
if py_vtk == False:
- raise Exception('Error: vtk module not found.')
+ print('Error: vtk module not found, cannot writeFluidVTK.')
+ return
filename = folder + '/fluid-' + self.sid + '.vti' # image grid
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.