<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri",sans-serif;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle23
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle24
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle25
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Thanks Ken – really good explanation. I have never understood global data, I think I do now.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Alan <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Moreland, Kenneth <br>
<b>Sent:</b> Friday, March 24, 2017 12:35 PM<br>
<b>To:</b> Scott, W Alan <wascott@sandia.gov>; paraview@paraview.org<br>
<b>Subject:</b> RE: [Paraview] How do you "see" FieldData<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">The Exodus II file format has the concept of “global data.” When this is read into ParaView/VTK, it gets placed into what vtkDataSet calls the “field data.” Because of this, I tend to use the two interchangeably
(and likewise so does the ParaView GUI). Personally, I prefer the term “global data” as it is more descriptive.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Arrays in global/field data can be whatever you want and whatever size you want. For example, someone might want to record the total volume of the data set. That could reasonably be stored in the global/field
data. Another example might be that someone wants to record the time at which a particular event occurs. This could be stored in the global/field data as an array of marked time indices. As you can see, global/field data can mean pretty much whatever you want
it to mean, so you can’t do much with it unless you understand the semantics. Consequently, global/field data is mostly ignored by ParaView.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">One thing that we have encountered with simulations at Sandia is that the simulation might track some global information, such as the mean of a field, and append that value to an array in the global data every
time a timestep is written out. Thus, you end up with a global/field data array of length equal to the number of timesteps. The Plot Global Data Over Time filter addresses this use case and only this use case.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">If you want to compute a value and then plot how that value changes over time, your best approach is to write that value out to a table and then use Plot Selection Over Time to plot the value.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-Ken<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Scott, W Alan <br>
<b>Sent:</b> Friday, March 24, 2017 12:17 PM<br>
<b>To:</b> Moreland, Kenneth <<a href="mailto:kmorel@sandia.gov">kmorel@sandia.gov</a>>;
<a href="mailto:paraview@paraview.org">paraview@paraview.org</a><br>
<b>Subject:</b> RE: [Paraview] How do you "see" FieldData<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">OK, looking at your reply, I think I have a fundamental misunderstanding, and have been mixing up terms. What is a “global data” and “field data”? What’s the difference?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I think you are saying that if we have 43 timesteps (can.exo), any global arrays will have 43 entries (such as time or atmospheric pressure). However, field data will have a single entry (such as Title)? Below, you are setting – and resetting
– the field data over and over again?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Alan<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Moreland, Kenneth <br>
<b>Sent:</b> Thursday, March 23, 2017 4:00 PM<br>
<b>To:</b> Scott, W Alan <<a href="mailto:wascott@sandia.gov">wascott@sandia.gov</a>>;
<a href="mailto:paraview@paraview.org">paraview@paraview.org</a><br>
<b>Subject:</b> RE: [Paraview] How do you "see" FieldData<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">I don’t think Plot Global Variables Over Time works the way you think it does. This filter assumes that the global arrays contain a static array the same size as the number of time steps and then plots that with
the time array on the x axis and the entries in this array in the y axis. If the size of the global variable does not equal the number of time steps, the view will show nothing.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I think you really want to use Plot Selection Over Time. That you can give a value and it will iterate the pipeline over time and compute the value for each time step. Unfortunately, it looks like the filter
is broken for selections on field data. It works, however, on table data, so you can write the result as that.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I got what I think you want using the can data set. Here are the steps I used:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">1. Load can.ex2. All variables. Apply.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2. Add the Programmable Filter. Set the output type to vtkTable (!) and use the following script:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New";color:#1F497D">disp_y = inputs[0].PointData["DISPL"][:,1]<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New";color:#1F497D">mean_disp = mean(disp_y)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New";color:#1F497D">output.RowData.append(mean_disp, "MEAN_DISP")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">3. Select the single row shown in the spreadsheet that pops up.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">4. Add Plot Selection Over Time filter. Apply.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-Ken<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> ParaView [<a href="mailto:paraview-bounces@paraview.org">mailto:paraview-bounces@paraview.org</a>]
<b>On Behalf Of </b>Scott, W Alan<br>
<b>Sent:</b> Thursday, March 23, 2017 3:06 PM<br>
<b>To:</b> <a href="mailto:paraview@paraview.org">paraview@paraview.org</a><br>
<b>Subject:</b> [EXTERNAL] [Paraview] How do you "see" FieldData<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">From a user:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">How do you "see" FieldData variables created in the ProgrammableFilter in the PlotGlobalVariablesOverTime filter? I'm creating a FieldData variable in the ProgrammableFilter. Now I'd like to plot it over time. It isn't available as
an option for me to plot, though. I see other global variables, just not this one.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">disp_y = inputs[0].PointData["displ_"][:,1]<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">mean_disp = mean(disp_y)<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">output.FieldData.append(mean_disp, "MEAN_DISP")<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Am I doing something wrong here?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Alan<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>