<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">look at the "Dealing with composite
      Datasets" on :<br>
      <br>
      <a class="moz-txt-link-freetext" href="http://www.paraview.org/Wiki/Python_Programmable_Filter">http://www.paraview.org/Wiki/Python_Programmable_Filter</a><br>
      <br>
      <br>
      Felipe<br>
      <br>
      Le 04/04/2013 19:57, Nikolaos Beratlis a &eacute;crit&nbsp;:<br>
    </div>
    <blockquote
cite="mid:CALdMxnyQZ1pyW64rhSVicfppC3yCQw5qr+8Luv648wYa2dnUgA@mail.gmail.com"
      type="cite">
      <div dir="ltr">When I try to transform the "Collection" grid from
        cartesian coordinates to cylindrical coordinates using the
        following script:
        <div><br>
        </div>
        <div>
          <div class="im"
            style="font-family:arial,sans-serif;font-size:13px">
            <div style="margin:0px">pdi = self.GetInput()</div>
            <div style="margin:0px">pdo = self.GetOutput()</div>
            <div style="margin:0px">newPoints = vtk.vtkPoints()</div>
            <div style="margin:0px">numPoints = pdi.GetNumberOfPoints()</div>
            <div style="margin:0px">for i in range(0, numPoints):</div>
            <div style="margin:0px">&nbsp; coord = pdi.GetPoint(i)</div>
            <div style="margin:0px">&nbsp; x, y, z = coord[:3]</div>
            <div style="margin:0px">&nbsp; r = x * cos(y)</div>
            <div style="margin:0px">
              &nbsp; t = x * sin(y)</div>
            <div style="margin:0px">&nbsp; newPoints.InsertPoint(i, r, t, z)</div>
            <div style="margin:0px">pdo.SetPoints(newPoints)</div>
          </div>
          <div
            style="font-family:arial,sans-serif;font-size:13px;margin:0px">pdo.GetPointData().AddArray(pdi.GetPointData().GetArray(0))</div>
          <div
            style="font-family:arial,sans-serif;font-size:13px;margin:0px">pdo.GetPointData().AddArray(pdi.GetPointData().GetArray(1))</div>
          <div
            style="font-family:arial,sans-serif;font-size:13px;margin:0px">pdo.GetPointData().AddArray(pdi.GetPointData().GetArray(2))</div>
        </div>
        <div
          style="font-family:arial,sans-serif;font-size:13px;margin:0px"><br>
        </div>
        <div
          style="font-family:arial,sans-serif;font-size:13px;margin:0px">I
          get the following error:</div>
        <div
          style="font-family:arial,sans-serif;font-size:13px;margin:0px">
          <br>
        </div>
        Traceback (most recent call last):<br>
        File "&lt;string&gt;", line 26, in &lt;module&gt;<br>
        File "&lt;string&gt;", line 7, in RequestData<br>
        AttributeError: GetPoint
        <div><br>
        </div>
        <div style="">The script works well if the grid is not of
          GridType Collection.</div>
        <div style=""><br>
        </div>
        <div style="">Thank you,</div>
        <div style=""><br>
        </div>
        <div style="">Nikos</div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Thu, Apr 4, 2013 at 3:57 AM, Felipe
          Bordeu <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:felipe.bordeu@ec-nantes.fr" target="_blank">felipe.bordeu@ec-nantes.fr</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div>you must put the attributes inside each grid:<br>
                <br>
                Felipe
                <div class="im"><br>
                  <br>
                  &lt;?xml version="1.0" ?&gt;<br>
                  &lt;!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []&gt;<br>
                  &lt;Xdmf Version="2.2"&gt;<br>
                  &lt;Domain&gt;<br>
                  &nbsp;&nbsp;&nbsp; &lt;Grid GridType="Collection"&gt;<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;Grid GridType="Uniform"&gt;<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;Topology TopologyType="3DRectMesh"
                  Dimensions="&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp; 3"/&gt;<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;Geometry GeometryType="VXVYVZ"&gt;<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;DataItem Dimensions="&nbsp;&nbsp;&nbsp; 3"
                  NumberType="Float" Precision="4" Format="XML"&gt;<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 0.0000&nbsp;&nbsp; 1.0000&nbsp;&nbsp; 2.0000<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/DataItem&gt;<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;DataItem Dimensions="&nbsp;&nbsp;&nbsp; 4"
                  NumberType="Float" Precision="4" Format="XML"&gt;<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 0.0000&nbsp;&nbsp; 2.0944&nbsp;&nbsp; 4.1888&nbsp;&nbsp; 6.2832<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/DataItem&gt;<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;DataItem Dimensions="&nbsp;&nbsp;&nbsp; 2"
                  NumberType="Float" Precision="4" Format="XML"&gt;<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 1.0000&nbsp;&nbsp; 2.0000<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/DataItem&gt;<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/Geometry&gt;<br>
                </div>
                <div class="im"> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;Attribute Name="var"
                  AttributeType="Scalar" Center="Node"&gt;<br>
                </div>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DataItem Dimensions="24 1 1"
                NumberType="Float" Precision="4" Format="XML"&gt;
                <div class="im"><br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
                  19 20 21 22 23<br>
                </div>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/DataItem&gt;<br>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Attribute&gt;
                <div class="im"><br>
                  &nbsp;&nbsp;&nbsp; &lt;/Grid&gt;<br>
                  &lt;Grid GridType="Uniform"&gt;<br>
                  &lt;Topology TopologyType="3DRectMesh"
                  Dimensions="&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp; 3"/&gt;<br>
                  &lt;Geometry GeometryType="VXVYVZ"&gt;<br>
                  &lt;DataItem Dimensions="&nbsp;&nbsp;&nbsp; 3" NumberType="Float"
                  Precision="4" Format="XML"&gt;<br>
                  &nbsp;&nbsp; 1.0000&nbsp;&nbsp; 2.0000&nbsp;&nbsp; 3.0000<br>
                  &lt;/DataItem&gt;<br>
                  &lt;DataItem Dimensions="&nbsp;&nbsp;&nbsp; 4" NumberType="Float"
                  Precision="4" Format="XML"&gt;<br>
                  &nbsp;&nbsp; 0.0000&nbsp;&nbsp; 2.0944&nbsp;&nbsp; 4.1888&nbsp;&nbsp; 6.2832<br>
                  &lt;/DataItem&gt;<br>
                  &lt;DataItem Dimensions="&nbsp;&nbsp;&nbsp; 2" NumberType="Float"
                  Precision="4" Format="XML"&gt;<br>
                  &nbsp;&nbsp; 2.0000&nbsp;&nbsp; 3.0000<br>
                  &lt;/DataItem&gt;<br>
                  &lt;/Geometry&gt;<br>
                </div>
                <div class="im"> &lt;Attribute Name="var"
                  AttributeType="Scalar" Center="Node"&gt;<br>
                </div>
                &lt;DataItem Dimensions="24 1 1" NumberType="Float"
                Precision="4" Format="XML"&gt;
                <div class="im"><br>
                  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
                  21 22 23<br>
                </div>
                &lt;/DataItem&gt;<br>
                &lt;/Attribute&gt;<br>
                &lt;/Grid&gt;<br>
                &lt;/Grid&gt;<br>
                &lt;/Domain&gt;<br>
                &lt;/Xdmf&gt;<br>
                <br>
                <br>
                Le 04/04/2013 04:36, Nikolaos Beratlis a &eacute;crit&nbsp;:<br>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <div dir="ltr">I have a domain that consists of
                      patches of orthogonal cartesian grids in the
                      following XDMF file:
                      <div><br>
                      </div>
                      <div>
                        <div>&lt;?xml version="1.0" ?&gt;</div>
                        <div>&lt;!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []&gt;</div>
                        <div>&lt;Xdmf Version="2.2"&gt;</div>
                        <div>&lt;Domain&gt;</div>
                        <div>&lt;Grid GridType="Collection"&gt;</div>
                        <div>&lt;Grid GridType="Uniform"&gt;</div>
                        <div>&lt;Topology TopologyType="3DRectMesh"
                          Dimensions=" &nbsp; &nbsp; 2 &nbsp; &nbsp; 4 &nbsp; &nbsp; 3"/&gt;</div>
                        <div>&lt;Geometry GeometryType="VXVYVZ"&gt;</div>
                        <div>&lt;DataItem Dimensions=" &nbsp; &nbsp;3"
                          NumberType="Float" Precision="4"
                          Format="XML"&gt;</div>
                        <div>&nbsp; &nbsp;0.0000 &nbsp; 1.0000 &nbsp; 2.0000</div>
                        <div>&lt;/DataItem&gt;</div>
                        <div>&lt;DataItem Dimensions=" &nbsp; &nbsp;4"
                          NumberType="Float" Precision="4"
                          Format="XML"&gt;</div>
                        <div>&nbsp; &nbsp;0.0000 &nbsp; 2.0944 &nbsp; 4.1888 &nbsp; 6.2832</div>
                        <div>&lt;/DataItem&gt;</div>
                        <div>&lt;DataItem Dimensions=" &nbsp; &nbsp;2"
                          NumberType="Float" Precision="4"
                          Format="XML"&gt;</div>
                        <div>&nbsp; &nbsp;1.0000 &nbsp; 2.0000</div>
                        <div>&lt;/DataItem&gt;</div>
                        <div>&lt;/Geometry&gt;</div>
                        <div> &lt;/Grid&gt;</div>
                        <div>&lt;Grid GridType="Uniform"&gt;</div>
                        <div>&lt;Topology TopologyType="3DRectMesh"
                          Dimensions=" &nbsp; &nbsp; 2 &nbsp; &nbsp; 4 &nbsp; &nbsp; 3"/&gt;</div>
                        <div>&lt;Geometry GeometryType="VXVYVZ"&gt;</div>
                        <div>&lt;DataItem Dimensions=" &nbsp; &nbsp;3"
                          NumberType="Float" Precision="4"
                          Format="XML"&gt;</div>
                        <div>&nbsp; &nbsp;1.0000 &nbsp; 2.0000 &nbsp; 3.0000</div>
                        <div>&lt;/DataItem&gt;</div>
                        <div>&lt;DataItem Dimensions=" &nbsp; &nbsp;4"
                          NumberType="Float" Precision="4"
                          Format="XML"&gt;</div>
                        <div>&nbsp; &nbsp;0.0000 &nbsp; 2.0944 &nbsp; 4.1888 &nbsp; 6.2832</div>
                        <div>&lt;/DataItem&gt;</div>
                        <div>&lt;DataItem Dimensions=" &nbsp; &nbsp;2"
                          NumberType="Float" Precision="4"
                          Format="XML"&gt;</div>
                        <div>&nbsp; &nbsp;2.0000 &nbsp; 3.0000</div>
                        <div>&lt;/DataItem&gt;</div>
                        <div>&lt;/Geometry&gt;</div>
                        <div>&lt;/Grid&gt;</div>
                        <div>&lt;Attribute Name="var"
                          AttributeType="Scalar" Center="Node"&gt;</div>
                        <div>&lt;DataItem Dimensions="48"
                          NumberType="Float" Precision="4"
                          Format="XML"&gt;</div>
                        <div>0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
                          18 19 20 21 22 23</div>
                        <div>0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
                          18 19 20 21 22 23</div>
                        <div>&lt;/DataItem&gt;</div>
                        <div>&lt;/Attribute&gt;</div>
                        <div>&lt;/Grid&gt;</div>
                        <div>&lt;/Domain&gt;</div>
                        <div>&lt;/Xdmf&gt;</div>
                      </div>
                      <div><br>
                      </div>
                      <div>The grid is declared as GridType Collection.
                        When I read it in Paraview the grid is read
                        correctly as shown in the attached picture,
                        however I don't get the values for the
                        attribute. I think the attribute is not read at
                        all. Is there sth wrong with this file? How
                        should the attribute be specified for GridType
                        Collection?</div>
                      <div><br>
                      </div>
                      <div>Thank you,</div>
                      <div><br>
                      </div>
                      <div>Nikos</div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <pre>_______________________________________________
Powered by <a moz-do-not-send="true" href="http://www.kitware.com" target="_blank">www.kitware.com</a>

Visit other Kitware open-source projects at <a moz-do-not-send="true" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the ParaView Wiki at: <a moz-do-not-send="true" href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a>

Follow this link to subscribe/unsubscribe:
<a moz-do-not-send="true" href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><span class="HOEnZb"><font color="#888888">
</font></span></pre>
                <span class="HOEnZb"><font color="#888888"> </font></span></blockquote>
              <span class="HOEnZb"><font color="#888888"> <br>
                  <br>
                  <pre cols="72">-- 
Felipe Bordeu Weldt
Ing&eacute;nieur de Recherche
-------------------------------------
T&eacute;l. : <a moz-do-not-send="true" href="tel:33%20%280%292%2040%2037%2016" value="+13302403716" target="_blank">33 (0)2 40 37 16</a> 57
Fax. : <a moz-do-not-send="true" href="tel:33%20%280%292%2040%2074%2074" value="+13302407474" target="_blank">33 (0)2 40 74 74</a> 06
<a moz-do-not-send="true" href="mailto:Felipe.Bordeu@ec-nantes.fr" target="_blank">Felipe.Bordeu@ec-nantes.fr</a>
Institut GeM - UMR CNRS 6183
&Eacute;cole Centrale Nantes
1 Rue de La No&euml;, 44321 Nantes, FRANCE
-------------------------------------</pre>
                </font></span></div>
            <br>
            _______________________________________________<br>
            Powered by <a moz-do-not-send="true"
              href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
            <br>
            Visit other Kitware open-source projects at <a
              moz-do-not-send="true"
              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 moz-do-not-send="true"
              href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
            <br>
            Follow this link to subscribe/unsubscribe:<br>
            <a moz-do-not-send="true"
              href="http://www.paraview.org/mailman/listinfo/paraview"
              target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Felipe Bordeu Weldt
Ing&eacute;nieur de Recherche
-------------------------------------
T&eacute;l. : 33 (0)2 40 37 16 57
Fax. : 33 (0)2 40 74 74 06
<a class="moz-txt-link-abbreviated" href="mailto:Felipe.Bordeu@ec-nantes.fr">Felipe.Bordeu@ec-nantes.fr</a>
Institut GeM - UMR CNRS 6183
&Eacute;cole Centrale Nantes
1 Rue de La No&euml;, 44321 Nantes, FRANCE
-------------------------------------</pre>
  </body>
</html>