postproc.py script

This is a script for quick Mayavi-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 postproc.py output-tests/test_navier_stokes.vtk $ python postproc.py output-tests/test_navier_stokes.vtk –3d

  • save a snapshot image and exit

    $ python postproc.py output-tests/test_poisson.vtk -o image.png -n

  • save a snapshot image without off-screen rendering and exit

    $ python postproc.py output-tests/test_poisson.vtk -o image.png -n –no-offscreen

  • create animation (forces offscreen rendering) from output-tests/test_time_poisson.*.vtk

    $ python postproc.py output-tests/test_time_poisson.*.vtk -a mov

  • create animation (forces offscreen rendering) from output-tests/test_hyperelastic.*.vtk

    The range specification for the displacements ‘u’ is required, as output-tests/test_hyperelastic.00.vtk contains only zero displacements which leads to invisible glyph size.

    $ python postproc.py output-tests/test_hyperelastic.*.vtk –ranges=u,0,0.02 -a mov

  • same as above, but slower frame rate

    $ python postproc.py output-tests/test_hyperelastic_TL.*.vtk –ranges=u,0,0.02 -a mov –ffmpeg-options=”-r 2 -sameq”

class postproc.ParseDomainSpecific(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]
class postproc.ParseGroupNames(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]
class postproc.ParseOpacity(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]
class postproc.ParseRanges(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]
class postproc.ParseResolution(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]
class postproc.ParseSubdomains(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]
class postproc.ParseView(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]
postproc.main()[source]
postproc.view_file(filename, filter_names, options, view=None)[source]