[Paraview] non-interactive viz on cluster
Kharche, Sanjay
S.R.Kharche at exeter.ac.uk
Tue Aug 4 15:44:24 EDT 2015
Hi David, All
Can you point out what are the paraview objects in the script pasted below?
My approach for the next step of improving its efficiency is by deleting
all the objects that I create at each iteration.
Whereas this may be suboptimal, I will get it working before I go to
the next step.
cheers
Sanjay
try: paraview.simple
except: from paraview.simple import *
for i in range(0,4999,1):
paraview.simple._DisableFirstRenderCameraReset()
RenderView1 = GetRenderView()
my_2d0_vts = XMLStructuredGridReader( FileName=['my_2d%i.vts' % (i)] )
RenderView1.CenterAxesVisibility = 0
RenderView1.OrientationAxesVisibility = 0
my_2d0_vts.PointArrayStatus = ['Unnamed0']
DataRepresentation1 = Show()
DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5000076295109483]
RenderView1.CenterOfRotation = [78.0, 58.5, 0.0]
Transform1 = Transform( Transform="Transform" )
a1_Unnamed0_PVLookupTable = GetLookupTableForArray( "Unnamed0", 1, NanColor=[0.25, 0.0, 0.0], RGBPoints=[0.0, 0.23, 0.299, 0.754, 1.0, 0.7059953924945706, 0.01625293517428646, 0.1500022472819457], VectorMode='Magnitude', ColorSpace='Diverging', LockScalarRange=1 )
a1_Unnamed0_PiecewiseFunction = CreatePiecewiseFunction( Points=[-0.1, 0.0, 1.0, 1.0] )
ScalarBarWidgetRepresentation1 = CreateScalarBar( Title='Unnamed0', LabelFontSize=12, Enabled=1, LookupTable=a1_Unnamed0_PVLookupTable, TitleFontSize=12 )
GetRenderView().Representations.append(ScalarBarWidgetRepresentation1)
RenderView1.CameraPosition = [78.0, 58.5, 376.71107225273664]
RenderView1.CameraFocalPoint = [78.0, 58.5, 0.0]
RenderView1.CameraClippingRange = [372.94396153020926, 382.3617383365277]
RenderView1.CameraParallelScale = 97.5
DataRepresentation1.ColorArrayName = 'Unnamed0'
DataRepresentation1.LookupTable = a1_Unnamed0_PVLookupTable
Transform1.Transform = "Transform"
DataRepresentation2 = Show()
DataRepresentation2.ColorArrayName = 'Unnamed0'
DataRepresentation2.LookupTable = a1_Unnamed0_PVLookupTable
DataRepresentation2.EdgeColor = [0.0, 0.0, 0.5000076295109483]
DataRepresentation1.Visibility = 0
Transform1.Transform.Scale = [1.0, -1.0, 0.0]
Text1 = Text()
RenderView1.CameraViewUp = [0.0, 1.0, 0.0]
RenderView1.CameraPosition = [78.0, -58.5, 376.71107225273664]
RenderView1.CameraFocalPoint = [78.0, -58.5, 0.0]
RenderView1.CenterOfRotation = [78.0, -58.5, 0.0]
RenderView1.CameraClippingRange = [372.94396153020926, 382.3617383365277]
Text1.Text = '2D macro re-entry'
DataRepresentation3 = Show()
DataRepresentation3.Color = [0.3333333333333333, 0.0, 0.4980392156862745]
WriteImage('reentry2d%06i.png' % (i))
Render()
Delete(my_2d0_vts)
Delete(RenderView1)
Delete(Text1)
# Delete(DataRepresentation1) # pvbatch didnt like this
Delete(DataRepresentation2)
# Delete(DataRepresentation3) # pbatch didnt like this, not defined for Delete
# Delte(LookupTable) # not defined for Delete
Delete(a1_Unnamed0_PVLookupTable)
Delete(a1_Unnamed0_PiecewiseFunction)
Delete(ScalarBarWidgetRepresentation1)
# Delete(RGBPoints) # not defined for Delete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150804/db781a81/attachment.html>
More information about the ParaView
mailing list