<div dir="ltr"><div><div>I think I have it working. It turns out that I only needed to add :<br><br>Delete(GetRenderView())<br><br></div>after generating the screenshots. <br><br></div>But now, I have another question: is it possible to generate the screenshots on the remote server instead of the client? It would be nice if the screenshots didn't pop up on my local machine whenever the python script (run on my local machine) needs to take s screenshot.<br><br>Thanks,<br>John<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 18, 2015 at 6:56 PM, John Moore <span dir="ltr"><<a href="mailto:johnpmooreiv@gmail.com" target="_blank">johnpmooreiv@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sorry about the pre-mature end to the last message. Apparently in gmail Tab takes you directly to the send button. Here's the pseudo-code:<br><br><div><span class=""><br>    import paraview.simple;<br>    pv = paraview.simple;<br>    pv.Connect('Server');<br><br></span>    for timestep in range(timestep_start,timestep_end):<br><br></div><div>      % Do the refinement on the server<br></div><div>      % Copy the parallel mesh file "dgsolution.pvtu" to "temp.pvtu", the same name what was read in by the GUI and then saved in the .pvsm file.<br><br></div><div><div>       pv.servermanager.LoadState('dgsolution.pvsm');<br></div><div>       pv.SetActiveView(pv.GetRenderedView());<br></div><div>       pv.Render();<br></div><div>       pv.SaveScreenshot('screenshot_timestep%06d' % timestep);<br><br></div><div>    pv.Disconnect();<br><br></div><div>    When I run the script, I get the solution at the first time step written out for each time step. So it seems that LoadState() is not re-loading the state, even though it's remote source files have changed. Another idea is that perhaps there is new view created for each time step, and I am only saving the first.<br><br><br></div><div>    I'm confident I'm doing something fundamentally wrong here, I just don't know what. Also, I want to be sure that the old data is deleted at each time step, otherwise the memory requirement would be huge.<br><br></div><div>Any suggestions would be greatly appreciated.<br><br>Thank you for your time!<span class="HOEnZb"><font color="#888888"><br><br>John<br></font></span></div><div><br><br></div><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 18, 2015 at 6:41 PM, John Moore <span dir="ltr"><<a href="mailto:johnpmooreiv@gmail.com" target="_blank">johnpmooreiv@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>So, this is what I would like to do, but am new to ParaView and can't figure out how to proceed. Any pointers would be greatly appreciated.<br><br></div>I have unsteady data that that represents high-order finite elements. In order to visualize the high order elements, I subdivide them Nref times, and write the data in .pvtu format. In order to save disk space, I only write the high order data at each time step. For Nref refinements, if the elements are tets, this equates to a savings of 8^Nref in disk space.<br><br></div>In order to visualize the data, I would first like to load a  representative timestep (after re-naming the file to temp.pvtu), do all the manipulation in the GUI, and then save the state in a .pvsm file once satisfied.<br><br></div>I would then like to loop over all the time steps, first creating the refined mesh and then post-processing said file for each timestep, and finally deleting the refined mesh files. The post processing at each timestep should use the same state as saved with the gui.<br><br></div>I would like to script this all in python, and do the mesh refinement and post-processing on a remote server.<br><br></div>I've managed to implement most of this, but the view does not seem to update after every call to pv.servermanager.LoadState().<br><br></div>Below is a pseudo-code:<br><br>    import paraview.simple;<br>    pv = paraview.simple;<br><div><div><div>    pv.Connect('Server');<br><br>    for timestep in range(timestep_start,timestep_end+1):<br>pv.servermanager.LoadState('dgsolution.pvsm');<br><br><br></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>