[Paraview] Force Programmable Filter to Run in Serial
Mike Tree
treem22 at gatech.edu
Wed Jul 5 09:57:00 EDT 2017
All,
I currently have a python script that uses a programmable filter to pull
values (scalars) from one block of a data set and add them to a different
block:
output = self.GetOutputDataObject(0)
output.DeepCopy(grids)
numofcells = grids.GetNumberOfCells()
Pinf = farfield.GetCellData().GetArray('Pinf').GetValue(0)
Minf = farfield.GetCellData().GetArray('Minf').GetValue(0)
Vinf = farfield.GetCellData().GetArray('Vinf').GetValue(0)
PinfArray = vtk.vtkDoubleArray()
PinfArray.SetName('Pinf')
MinfArray = vtk.vtkDoubleArray()
MinfArray.SetName('Minf')
VinfArray = vtk.vtkDoubleArray()
VinfArray.SetName('Vinf')\
for i in range(numofcells):
PinfArray.InsertNextValue(Pinf)
MinfArray.InsertNextValue(Minf)
VinfArray.InsertNextValue(Vinf)
output.GetCellData().AddArray(PinfArray)
output.GetCellData().AddArray(MinfArray)
output.GetCellData().AddArray(VinfArray)
I wrote the script using a small data set, employing only one processor.
With much larger data sets the other parts of the script benefit from
parallel execution, but my programmable filter is no longer working well.
The programmable script appears to execute on each processor, and each
processor is holding a portion of the data. The programmable filter output
shows partial Pinf, Minf, and Vinf arrays.
So, I have two options. I can either add the necessary commands to this
programmable filter script to allow it to correctly run across multiple
processors, or I can possibly force all the data back onto one processor
for this step, and run this programmable filter on only one node.
Which is easier, and how would I go about doing it?
Please note, both my Request Information and Request Update Extent scripts
are currently blank, and both input data types are unstructured grids.
Any help will be much appreciated!
Thanks,
Mike Tree
--
Mike Tree, PhD
Cardiovascular Fluid Mechanics Laboratory
Georgia Institute of Technology
Atlanta, GA
treem22 at gatech.edu
678-249-0922
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170705/2a8e3c8f/attachment.html>
More information about the ParaView
mailing list