[Paraview] max_by_block

Scott, W Alan wascott at sandia.gov
Mon Jun 9 18:24:30 EDT 2014


Hi,
I am coloring blocks by the maximum value of a variable that occurs within that given block.  I am dealing with a large number of blocks, so I don't want to extract each block and color one by one.

I'm currently using the python calculator to do this, since the function "max()" returns block-by-block maximum (scalar), which is what I want.  The issue is that paraview doesn't return the returned value as an array, so using the maximum values per block directly in an expression doesn't work.  I'm using a pretty sad-looking syntax to get the job done.  My expression is something along the lines of:

Expression:   ((von_mises - von_mises)+1)*max(von_mises)

So, I'm creating an array of 1's for each cell and then scaling it by the maximum value in a given block.  There must be a better way of doing this, right?  Something like "max_by_block()" or "create_cell_array_ones()."  If not, perhaps that could become a feature request.

Thanks,
Alan





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20140609/99908186/attachment.html>


More information about the ParaView mailing list