<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Hi Berk, <br><br>Thanks for the response. I see I'm at the fount. So, I'm using paraview 4.1.0, and loading everything in from vtu files. The basic python filter I'm trying to get running in parallel is this below, for a basic integration along a dimension in two of the loaded fields (one a scalar alpha_0, the other a two dimensional vector <span style="color:rgb(0,0,255)"><font color="#000000">sigma_0_0__sigma_0_1</font></span>).<br><br><span style="color:rgb(0,0,255)"><font color="#000000">----------------<br>import numpy<br><br>alpha0 = inputs[0].PointData['alpha_0']<br>alpha1 = inputs[0].PointData['alpha_0']<br>sigma0 = inputs[0].PointData['sigma_0_0__sigma_0_1']<br><br>pdi = self.GetInputDataObject(0,0)<br>bg_field = 1<br>pdi = self.GetInputDataObject(0,0)<br>pdo = self.GetOutputDataObject(0)<br>numPoints = pdi.GetNumberOfPoints()<br>import time<br><br>ind=self.GetInput()<br>iin=ind.GetInformation()<br>timestep = time.clock()<br><br>dx = 100.0<br>dy = 100.0<br><br>for (j,alpha) in enumerate(alpha0):<br> x1,y1,z1 = pdi.GetPoint(j)[:3]<br> x2,y2,z2 = pdi.GetPoint(j+1)[:3]<br> if abs(x2-x1) <= dx and abs(x2-x1)>0:<br> dx = x2 - x1<br> if abs(y2-y1) <= dy and abs(y2-y1)>1e-6:<br> dy = y2 - y1<br><br>counter = 0<br>last_step = -1.0<br>prev_x = 0.0<br>efold = numpy.zeros(numPoints)<br>y_first = -1.0<br><br>for (j,alpha) in enumerate(alpha0):<br> x,y,z = pdi.GetPoint(j)<br> if x<380.0 and x>70.0 and y==0.0:<br> y_first = []<br> for (i,alpha_1) in enumerate(alpha1): <br> x1,y1,z1 = pdi.GetPoint(i)<br> if x1 == x and y1 == y:<br> for (k,sigmax) in enumerate(sigma0): <br> x2,y2,z2 = pdi.GetPoint(i)<br> if x2 == x1: #and y2 == y1:<br> if y2 not in y_first:<br> efold[k] += ( 1.0/exp(2.0*alpha_1) ) * sigmax[0] * dy #exp(alpha_1)*sigmax[0]*dy<br> y_first.append(y2)<br><br> if x!=last_step:<br> counter = counter + 1<br> print "y_integrated_chi_at1(",floor(timestep),",", counter,") = ", efold[k]/377.0, ";" <br> print "x(",counter,") = ", x, ";"<br> last_step = x</font></span><br><span style="color:rgb(0,0,255)"><font color="#000000">----------------<br><br></font></span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><span style="color:rgb(0,0,255)"><font color="#000000">Craig<br></font></span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><span style="color:rgb(0,0,255)"><font color="#000000"><br></font></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 15, 2014 at 5:38 PM, Berk Geveci <span dir="ltr"><<a href="mailto:berk.geveci@kitware.com" target="_blank">berk.geveci@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Craig,<div><br></div><div>Which version of ParaView are you using?</div><div><br></div><div>What file format are you loading?</div><div><br></div><div>Best,</div><div>-berk</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Wed, Oct 15, 2014 at 4:52 PM, Craig Michoski <span dir="ltr"><<a href="mailto:michoski@gmail.com" target="_blank">michoski@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>Ah, okay, I figured out part of my problem. I had to connect to the<br>
server and display the output on the server side, not just the client<br>
side, which I guess is where the print commands redirects. Now I have<br>
several other problems. First:<br>
<br>
1) the print command outputs n_processor number of outputs. Can I<br>
make this just one value? For example, if I am summing a value over a<br>
mesh, I just want to total value output once over the entire mesh? Is<br>
this possible?<br>
<br>
2) I am getting an error when trying to simply get my loaded inputs.<br>
When I do:<br>
<br>
print "Gets here!"<br>
<br>
alpha0 = inputs[0].PointData['alpha_0']<br>
<br>
Traceback (most recent call last):<br>
File "<string>", line 22, in <module><br>
File "<string>", line 8, in RequestData<br>
TypeError: 'NoneType' object has no attribute '__getitem__'<br>
<br>
I don't understand what is hppening here, can anyone help please?<br>
</div></div><div><div><br>
Craig<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>
</div></div></blockquote></div><br></div>
</blockquote></div><br></div></div>