[Paraview] Python calculator and max bug

Berk Geveci berk.geveci at kitware.com
Fri Jun 20 20:11:00 EDT 2014


Hi Alan,

I am almost done completely rewriting the Python code under this filter.
We'll make sure that this bug is addressed as part of the rewrite. I have
global min/max/std deviation etc. working very nicely. I'll add support for
min/max per block. I'll call them min_per_block(), max_per_block() etc.

-berk


On Fri, Jun 20, 2014 at 7:30 PM, Scott, W Alan <wascott at sandia.gov> wrote:

>  Berk,
> After looking at this, yep – it’s a bug.  I wrote it up as bug number
> 14816, with a good example using can.exo.
>
> I like what you wrote below – max-per-block, or maxPerBlock?
>
> Alan
>
>
>
>
> From the ParaView e-mail list:
>
> Simply max(von_mises) doesn't do it? The calculator is supposed to convert
> scalars to arrays automatically but maybe there is an issue there...
>
> PS: This is somewhat ironic. I am working on changes to support things
> like min/max over all blocks. Those changes would make min/max over block
> impossible :-) So I guess we want both. What would a good function name for
> XXX per block be?
>
> -berk
>
> On Mon, Jun 9, 2014 at 6:24 PM, Scott, W Alan <*wascott at sandia.gov*
> <wascott at sandia.gov>> wrote:
>
> 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
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20140620/de8dd8d4/attachment.html>


More information about the ParaView mailing list