(Hands-on)
/scratch/courses01/remote_vis/paraview/can.ex2
Client-Server mode
Client Render-Server Data-Server mode
1. ParaView Client Shell Interactive, scripts loading
2. pvpython Stand-alone mode
Interactive scripting
module load virtualgl paraview
vglrun pvpython
from paraview.simple import *
vglrun pvpython PYTHON_FILE.py
3. pvbatch Batch mode
MPI-enabled, headless, non-interactive
module load paraview
pvbatch PYTHON_FILE.py
To delete a variable: | del variable |
d: lowercase |
To delete an object from pipeline browser: | Delete(object) |
D: uppercalse |
To show an object: | Show() |
// If pipeline object and/or view are not specified, active objects are used. |
To refresh pipeline browser and reset the view: | Render() |
// Optional |
To switch off an object: | Hide() |
|
Help: | help (command) |
// help(Render) |
List all available classes of a sub-module | dir(submodule.class) |
//dir(servermanager.connect) |
(Hands-on)
/scratch/courses01/remote_vis/paraview/can.py
from paraview.simple import *
renderView1 = CreateView('RenderView')
SetActiveView(renderView1)
canex2 = ExodusIIReader(FileName=['/scratch/courses01/remote_vis/paraview/can.ex2'])
canex2.PointVariables = ['VEL']
canex2Display = Show(canex2, renderView1, 'UnstructuredGridRepresentation')
Render()
Use previous script with pvpython to generate interactive render window as below:
Hint:
To change the camera view angle, use following code:
renderView1.CameraPosition = [Xcoordinate, Ycoordinate, Zcoordinate]
To have interactive window, add following code to your script:
paraview.simple.Interact(view=None)
canex2 = ExodusIIReader(FileName=['/scratch/courses01/remote_vis/paraview/can.ex2'])
canex2.PointVariables = ['VEL']
Show(canex2)
renderView = GetActiveView()
renderView.CameraPosition = [-37.04449555112574, -31.731530832524076, -8.5636485799288]
Render()
Try to export screenshot as below image
Visualisation Documentation:
Contact:
visualisation@pawsey.org.au
Help:
help@pawsey.org.au