[Paraview] Pipeline update with Catalyst
Gallagher, Timothy P
tim.gallagher at gatech.edu
Tue Feb 7 07:14:36 EST 2017
Hello again,
I am working on a pipeline using Catalyst that writes data only when features are detected. The idea is to have a 3D contour generated in the pipeline, and when it is big enough, start recording data. There is a long lead-up to when the features appear, and then they disappear rapidly, so I would like to only collect data when the features are present.
To that end, my DoCoProcessing() function has something that checks the 'Area' value in the CellData of an IntegrateVariables filter. The full function is below. However, this doesn't ever write any images or data. It also doesn't throw any errors, so I have a feeling the pipeline isn't actually evaluated/updated after the call to UpdateProducers.
So, my question -- at what point in the DoCoProcessing function is the pipeline actually evaluated? Do all the filters execute when the UpdatedProducers function is called? Or do they only update when the outputs to which they are connected are called, ie. WriteData and WriteImages?
Thanks,
Tim
def DoCoProcessing(datadescription):
"Callback to do co-processing for current timestep"
global coprocessor
global lastTime
global deltaT
# Update the coprocessor by providing it the newly generated simulation data.
# If the pipeline hasn't been setup yet, this will setup the pipeline.
coprocessor.UpdateProducers(datadescription)
curTime = datadescription.GetTime()
if curTime >= lastTime + deltaT:
lastTime = curTime
if coprocessor.Pipeline.flameArea.CellData['Area'] > 1e-9:
# Write output data, if appropriate.
coprocessor.WriteData(datadescription);
# Write image capture (Last arg: rescale lookup table), if appropriate.
coprocessor.WriteImages(datadescription, rescale_lookuptable=False)
# Live Visualization, if enabled.
coprocessor.DoLiveVisualization(datadescription, "localhost", 22222)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170207/c132ad2d/attachment.html>
More information about the ParaView
mailing list