<div dir="ltr"><div><div>Hi David,<br><br></div>Thanks for the response but I'm still a bit confused. I have an ExodusII file with 4 side sets (file attached) but when I do, in vtkpython, r.GetNumberOfObjects(r.SIDE_SET) I get 4 but when I do r.GetNumberOfObjects(r.SIDE_SET_CONN) I get 0. The Python code that I'm using where I'm trying to load the single element block and all of the side sets is:<br>
=============<br>from vtk import *<br><br>r = vtkExodusIIReader()<br>r.SetFileName("/home/acbauer/CODE/ALBANY/albany-git-script/albany-git/albany-src/Albany/examples/Necking3DSTKAdapt/smooth_tension_coarse_tet4.exo")<br>
r.GenerateGlobalNodeIdArrayOn()<br>r.GenerateGlobalElementIdArrayOn()<br>r.ExodusModelMetadataOn()<br><br>r.UpdateInformation()<br><br>nssa = r.GetNumberOfObjects(r.SIDE_SET)<br>for i in range(nssa):<br>  r.SetObjectStatus(r.SIDE_SET, i, 1)<br>
  print 'setting side set ', i<br><br>def printblocks(mb, spacing):<br>  for i in range(mb.GetNumberOfBlocks()):<br>    if mb.GetBlock(i):<br>      print spacing, mb.GetBlock(i).GetClassName()<br>      if mb.GetBlock(i).IsA("vtkMultiBlockDataSet") == 1:<br>
        printblocks(mb.GetBlock(i), spacing+"  ")<br>      if mb.GetBlock(i).IsA("vtkUnstructuredGrid") == 1:<br>        print 'ugrid has np ne ', mb.GetBlock(i).GetNumberOfPoints(), mb.GetBlock(i).GetNumberOfCells()<br>
<br>r.Update()<br>mb = r.GetOutput()<br>printblocks(mb, "")<br>============<br><br></div>Is that correct then to use r.SIDE_SET instead of r.SIDE_SET_CONN here with r.SetObjectStatus()?<br><div><br></div><div>Thanks,<br>
Andy<br></div><div><br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 7, 2013 at 2:31 PM, David Thompson <span dir="ltr"><<a href="mailto:david.thompson@kitware.com" target="_blank">david.thompson@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Andy,<br>
<div class="im"><br>
> I bet you already know this, but I believe that David Thompson is  the most knowledgeable person with regards to that reader.<br>
<br>
</div>Sorry, I am here... but slow.<br>
<div class="im"><br>
> I'm a bit confused with the ExodusII reader between the sets and the arrays of sets. I'm wondering if the following is a bug or a lack of my understanding. To set the SIDE_SET status it does the following in the header file using the SetObjectStatus() method:<br>

><br>
>   void SetSideSetArrayStatus(const char* name, int flag)<br>
>     { this->SetObjectStatus(SIDE_SET, name, flag); }<br>
><br>
> For the SetAllArrayStatus() method, if I call that with otyp = SIDE_SET it looks like it wants to use the SetObjectArrayStatusMethod() through the following:<br>
><br>
> void vtkExodusIIReader::SetAllArrayStatus( int otyp, int status )<br>
</div>> { ...<br>
<div class="im">><br>
> In my testing using Python, the r.SetAllArrayStatus(r.SIDE_SET, 1) call doesn't load any side sets even though I was expecting it to.<br>
<br>
</div>There are two types of status variables: connectivity status and array status. Connectivity status is used to select whether VTK cells will be created for the corresponding block or set. Array status is used to select which point-data or cell-data arrays in the Exodus file should be loaded and stored on the cells. Thus if you have a boundary condition variable named "A" defined on side set 100, you must set the connectivity status for side set 100 to true *and* the variable status for "A" to true in order to visualize the boundary condition.<br>

<br>
By default, element blocks have their connectivity status set to true and all others are false. You should use SIDE_SET_CONN to indicate that you want the side set loaded and SIDE_SET when indicating which scalars you want loaded onto the connectivity.<br>

<br>
In ParaView, note that side sets are considered "Advanced" functionality, so you must click on the gear icon in order to select side sets to load.<br>
<span class="HOEnZb"><font color="#888888"><br>
        David</font></span></blockquote></div><br></div>