resview.py script¶
This is a script for quick VTK-based visualizations of finite element computations results.
Examples¶
The examples assume that run_tests.py has been run successfully and the resulting data files are present.
view data in output-tests/test_navier_stokes.vtk
$ python resview.py output-tests/test_navier_stokes.vtk
customize the above output, plot0: field “p”, switch on edges plot1: field “u”, surface with opacity 0.4, glyphs scaled by factor 2e-2
$ python resview.py output-tests/test_navier_stokes.vtk -f p:e:p0 u:o.4:p1 u:g:f2e-2:p1
view data and take a screenshot
$ python resview.py output-tests/test_poisson.vtk -o image.png
take a screenshot without a window popping up
$ python resview.py output-tests/test_poisson.vtk -o image.png –off-screen
create animation from output-tests/test_time_poisson.*.vtk
$ python resview.py output-tests/test_time_poisson.*.vtk -a mov.mp4
create animation from output-tests/test_hyperelastic.*.vtk, set frame rate to 3, plot displacements and mooney_rivlin_stress
$ python resview.py output-tests/test_hyperelastic_TL.*.vtk -f u:wu:e:p0 mooney_rivlin_stress:p1 -a mov.mp4 -r 3
-
class
resview.
FieldOptsToListAction
(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]¶ -
separator
= ':'¶
-
-
class
resview.
OptsToListAction
(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]¶ -
separator
= '='¶
-
-
class
resview.
StoreNumberAction
(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]¶