<div dir="ltr"><div>So you understand what I'm doing, below is the full script. I added those lines and now its giving one above the number of points. I have 800 points but it pints out 801</div><div><br></div><div><br></div><div>import numpy as np</div><div>import pylab as pl</div><div>try: paraview.simple</div><div>except: from paraview.simple import *</div><div>paraview.simple._DisableFirstRenderCameraReset()</div><div>num_plots = 10</div><div>time = ['00010','00050','00090','00130','00184','00250','00300','00350','00400','00500']</div><div>lims = np.zeros(num_plots)</div><div>pl.gca().set_color_cycle(['black', 'green', 'blue', 'yellow','purple','chocolate','gray','brown','cyan','gold'])</div><div>nameoffile = 'TEST_nodal'</div><div>for i in range(0,num_plots):</div><div>  pfile = time[i]</div><div>  nameof_file = nameoffile+'.'+pfile+'.vts'</div><div>  print nameof_file</div><div>  paraview.simple._DisableFirstRenderCameraReset()</div><div>  TEST_nodal_00001_vts = XMLStructuredGridReader(FileName=nameof_file )</div><div>  TEST_nodal_00001_vts.UpdatePipeline()</div><div>  TEST_nodal_00001_vts.PointArrayStatus = ['Pressure']</div><div>  ExtractSubset0 = ExtractSubset(guiName="ExtractSubset0",IncludeBoundary=0,VOI=[399, 399, 0, 0, 0, 799], SampleRateK=1, SampleRateJ=1, SampleRateI=1)</div><div>  ExtractSubset0.UpdatePipeline()</div><div>  data = servermanager.Fetch(ExtractSubset0)</div><div>  print ExtractSubset0.GetDataInformation().GetNumberOfPoints()</div><div>  numPoints=data.GetNumberOfPoints()</div><div>  print numPoints</div><div>  p = np.zeros(numPoints)</div><div>  coord = np.zeros((numPoints,3))</div><div>  for j in range(0,numPoints):</div><div>    coord[j,:] = np.array(data.GetPoint(j))</div><div>    p[j]=data.GetPointData().GetArray("Pressure").GetValue(j)</div><div>  pl.plot(coord[:,2], p,linewidth=2.0)</div><div>pl.xlabel('Position Along Length (m)',size = 20)</div><div>pl.ylabel('Pore pressure (MPa)', size = 20)</div><div>pl.ticklabel_format(axis='y', style='sci', scilimits=(-2,2))</div><div>pl.legend(['t = 10 s','t = 50 s','t = 90 s', 't = 130 s', 't = 184 s', 't = 250 s', 't = 300 s', 't = 350', 't = 400 s', 't = 500 s'],'best',loc='upper left', numpoints=1, prop={'size':16})</div><div>pl.savefig('pressures.pdf')</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 3, 2014 at 9:00 AM, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@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,<br>
<br>
I wonder if the problem is with Fetch(). What does the following yeild?<br>
<br>
ExtractSubset0.UpdatePipeline()<br>
print ExtractSubset0.GetDataInformation().GetNumberOfPoints()<br>
<br>
Utkarsh<br>
<div><div class="h5"><br>
On Thu, Oct 30, 2014 at 5:29 PM, Chukwudi Chukwudozie<br>
<<a href="mailto:cchukw1@tigers.lsu.edu">cchukw1@tigers.lsu.edu</a>> wrote:<br>
> Hi,<br>
><br>
> I have a structured grid computational domain of size 800,2,800. I want to<br>
> extract the information along a line and so I do the following in my python<br>
> script.<br>
><br>
> ExtractSubset0 =<br>
> ExtractSubset(guiName="ExtractSubset0",IncludeBoundary=0,VOI=[399, 399, 0,<br>
> 0, 0, 799], SampleRateK=1, SampleRateJ=1, SampleRateI=1)<br>
> data = servermanager.Fetch(ExtractSubset0)<br>
> numPoints=data.GetNumberOfPoints()<br>
><br>
> However, when I plot the information on that line, I see it has only<br>
> extracted information between 0-399 in the z-coordinate direction. I even<br>
> printed numPoints to confirm how much information is extracted and I get<br>
> "numPoints=400". I am using PV 3.98.0.<br>
><br>
> Any help on this will be appreciated.<br>
><br>
><br>
><br>
><br>
> --<br>
> Chukwudi Chukwudozie<br>
> <a href="mailto:cchukw1@tigers.lsu.edu">cchukw1@tigers.lsu.edu</a><br>
> Craft and Hawkins Department of Petroleum Engineering<br>
> Louisiana State University<br>
> Patrick F. Taylor Hall (CEBA)<br>
> Room 3429<br>
> Baton Rouge LA, 70803<br>
> Cell:<a href="tel:3373546822" value="+13373546822">3373546822</a><br>
> Office: <a href="tel:2255786064" value="+12255786064">2255786064</a><br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <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:<br>
> <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><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Chukwudi Chukwudozie <br><a href="mailto:cchukw1@tigers.lsu.edu">cchukw1@tigers.lsu.edu</a><br>Craft and Hawkins Department of Petroleum Engineering<br>Louisiana State University<br>Patrick F. Taylor Hall (CEBA)<br>Room 3429<br>Baton Rouge LA, 70803<br>Cell:3373546822<br>Office: 2255786064</div>
</div>