<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><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"><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>
</body>
</html>