<div dir="ltr"><div>Hi Alan,</div><div><br></div>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.<div>

<br></div><div>-berk</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 20, 2014 at 7:30 PM, Scott, W Alan <span dir="ltr"><<a href="mailto:wascott@sandia.gov" target="_blank">wascott@sandia.gov</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">






<div>
<font face="Calibri"><span style="font-size:11pt">
<div>Berk,</div>
<div>After looking at this, yep – it’s a bug.  I wrote it up as bug number 14816, with a good example using can.exo.</div>
<div> </div>
<div>I like what you wrote below – max-per-block, or maxPerBlock?</div>
<div> </div>
<div>Alan</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div>From the ParaView e-mail list:</div>
<div> </div>
<div>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...</div>
<div> </div>
<div>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?</div>


<div> </div>
<div>-berk</div>
<div> </div>
<div>On Mon, Jun 9, 2014 at 6:24 PM, Scott, W Alan <<a href="mailto:wascott@sandia.gov" target="_blank"><font color="blue"><u>wascott@sandia.gov</u></font></a>> wrote:</div>
<div> </div>
<div>Hi,</div>
<div>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.</div>
<div> </div>
<div>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:</div>
<div> </div>
<div>Expression:   ((von_mises - von_mises)+1)*max(von_mises)</div>
<div> </div>
<div>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.</div>
<div> </div>
<div>Thanks,</div>
<div>Alan</div>
<div> </div>
<div> </div>
<div> </div>
</span></font>
</div>

<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>