<div dir="ltr">I could see doing it by writing out an indirection array:<div>-1 ... -1 0 -1 1 -1 ... -1 2 -1 ... -1 4</div><div style>where the 0 is in the 20&#39;th place, 1 the 22&#39;nd, 2 the 88&#39;th and 4 the 300&#39;th,</div>

<div style>and using an arcane function syntax that goes something like JOIN($0[20];$0[22];$0[88];$0[300]).</div><div style><br></div><div style>I wouldn&#39;t recommend it because:</div><div style>1) it would make the output bigger</div>

<div style>2) the indirection step is likely to make the reader really slow</div><div style>3) function support is notoriously iffy in the history of xdmf and vtkXdmfReader</div><div style>4) in order to make the indirection array your exporter would have to gather just as much information as it would need to reorder the data upfront.</div>

<div style><br></div><div style>Instead I recommend renumbering the indices in the exporter and then use the GlobalIds attribute type in xdmf to keep a record around of what the original indices for each VTK array were.</div>

<div style><br></div><div style>Yes I see your point that it would be useful to add a new indirection function type to xdmf. Unfortunately, I think that is very low on the list of priorities for the nebulous xdmf developer community.</div>

<div style><br></div><div style> </div><div style><br></div><div style><br></div><div style><br></div></div><div class="gmail_extra"><br clear="all"><div>David E DeMarle<br>Kitware, Inc.<br>R&amp;D Engineer<br>21 Corporate Drive<br>

Clifton Park, NY 12065-8662<br>Phone: 518-881-4909</div>
<br><br><div class="gmail_quote">On Mon, Nov 25, 2013 at 2:41 AM, Andrew Parker <span dir="ltr">&lt;<a href="mailto:andy.john.parker@googlemail.com" target="_blank">andy.john.parker@googlemail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hey George,<div><br></div><div>In this instance I&#39;m going the other way.  My application knows the NodeLabels, but it&#39;s paraview that I need to get to understand that they are not-contiguously implicitly numbered.  Paraview is assuming an implicit zero-based ordering when it reads the node positions in, and I want a way to tell it that actually these nodes have an explicit label/number, and not to go for zero-based, but instead to use this number when relating to the topology information.  I need to be able to write out as per my demo file so that paraview can read it in.  I&#39;m trying to do this in a way that means my code does not have to renumber the nodes - this would be a problem for me and I&#39;d really like to avoid that.  Do you know if it would be possible doing it the way I suggested in my previous post?  Do any of the xdmf2 developers have some thoughts/comments on this?</div>



<div><br></div><div>Cheers,</div><div>Andy</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On 24 November 2013 21:24, George Zagaris <span dir="ltr">&lt;<a href="mailto:george.zagaris@kitware.com" target="_blank">george.zagaris@kitware.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am not very familiar with xdmf/h5, so I could be way off, but couldn&#39;t you add a node-attribute array to your mesh (just like you add the velocities), which would store the &quot;NodeLabels&quot;? That way, the geometry would still be read in using the local, contiguous numbering, 0-N, but your application can infer the &quot;NodeLabels&quot;, explicitly by accessing the node-attribute array. Does this help?<div>





<br></div><div>Best,</div><div>George </div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Sat, Nov 23, 2013 at 12:13 PM, Andrew Parker <span dir="ltr">&lt;<a href="mailto:andy.john.parker@googlemail.com" target="_blank">andy.john.parker@googlemail.com</a>&gt;</span> wrote:<br>





</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">All,<div><br></div><div>In an effort to spark some comments I thought I&#39;d try to provide a small example for what I want to do in case my previous post (below) was unclear.  Below is a valid xdmf file that paraview understands for a plane.<br>







<div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">&lt;?xml version=&quot;1.0&quot;?&gt;</div><div class="gmail_extra">&lt;!DOCTYPE Xdmf SYSTEM &quot;Xdmf.dtd&quot;&gt;</div><div class="gmail_extra">







&lt;Xdmf xmlns:xi=&quot;<a href="http://www.w3.org/2003/XInclude" target="_blank">http://www.w3.org/2003/XInclude</a>&quot; Version=&quot;2.2&quot;&gt;</div><div class="gmail_extra">  &lt;Domain&gt;</div><div class="gmail_extra">





    &lt;Grid GridType=&quot;Uniform&quot;&gt;</div>

<div class="gmail_extra">      &lt;Topology TopologyType=&quot;Quadrilateral&quot; Dimensions=&quot;1&quot;&gt;</div><div class="gmail_extra">        &lt;DataItem Dimensions=&quot;1 4&quot; NumberType=&quot;Int&quot; Precision=&quot;8&quot; Format=&quot;XML&quot;&gt;</div>







<div class="gmail_extra">           0 1 3 2 </div><div class="gmail_extra"><span style="white-space:pre-wrap">        </span>&lt;/DataItem&gt;</div><div class="gmail_extra">      &lt;/Topology&gt;</div><div class="gmail_extra">







      &lt;Geometry GeometryType=&quot;XYZ&quot;&gt;</div><div class="gmail_extra">        &lt;DataItem Dimensions=&quot;4 3&quot; NumberType=&quot;Float&quot; Precision=&quot;4&quot; Format=&quot;XML&quot;&gt;</div><div class="gmail_extra">







<span style="white-space:pre-wrap">        </span>  -0.5 -0.5 0 </div><div class="gmail_extra"><span style="white-space:pre-wrap">        </span>  0.5 -0.5 0 </div><div class="gmail_extra"><span style="white-space:pre-wrap">        </span>  -0.5 0.5 0 </div>







<div class="gmail_extra"><span style="white-space:pre-wrap">        </span>  0.5 0.5 0 </div><div class="gmail_extra"><span style="white-space:pre-wrap">        </span>&lt;/DataItem&gt;</div><div class="gmail_extra">      &lt;/Geometry&gt;</div>







<div class="gmail_extra">    &lt;/Grid&gt;</div><div class="gmail_extra">  &lt;/Domain&gt;</div><div class="gmail_extra">&lt;/Xdmf&gt;</div><div><br></div><div>---  Now, what I want to do is to allow for the fact that the nodes defining this plane, may happen to be labelled 300, 20, 22, 80 instead of 0-&gt;3.  The key point being that there is still only 4 nodes, not 300 in the file for which I only need 4 to define the geom, but need to write out 300 to all for the 0-based implicit ordering.  Therefore, I&#39;d like a section in the geom part of the xmf file to qualify this numbering.  It doesn&#39;t bother me if they&#39;re subsequently renumbered inside paraview/vtk, only that I don&#39;t have to, as this is a simplistic version of something more complicated.  So to be verbose, it should now look like:</div>







<div><br></div><div><div>&lt;?xml version=&quot;1.0&quot;?&gt;</div><div>&lt;!DOCTYPE Xdmf SYSTEM &quot;Xdmf.dtd&quot;&gt;</div><div>&lt;Xdmf xmlns:xi=&quot;<a href="http://www.w3.org/2003/XInclude" target="_blank">http://www.w3.org/2003/XInclude</a>&quot; Version=&quot;2.2&quot;&gt;</div>







<div>  &lt;Domain&gt;</div><div>    &lt;Grid GridType=&quot;Uniform&quot;&gt;</div><div>      &lt;Topology TopologyType=&quot;Quadrilateral&quot; Dimensions=&quot;1&quot;&gt;</div><div>        &lt;DataItem Dimensions=&quot;1 4&quot; NumberType=&quot;Int&quot; Precision=&quot;8&quot; Format=&quot;XML&quot;&gt;</div>







<div>          <b> 300 20 22 80 </b></div><div><span style="white-space:pre-wrap">        </span>&lt;/DataItem&gt;</div><div>      &lt;/Topology&gt;</div><div>      &lt;Geometry GeometryType=&quot;<b>XYZ_Explicit</b>&quot;&gt;</div>







<div>        &lt;DataItem Dimensions=&quot;4 3&quot; NumberType=&quot;Float&quot; Precision=&quot;4&quot; Format=&quot;XML&quot;&gt;</div><div><b><span style="white-space:pre-wrap">        </span>  20 -0.5 -0.5 0 </b></div>
<div>
<b><span style="white-space:pre-wrap">        </span>  22 0.5 -0.5 0 </b></div><div><b><span style="white-space:pre-wrap">        </span>  80 -0.5 0.5 0 </b></div><div><b><span style="white-space:pre-wrap">        </span>  300 0.5 0.5 0 </b></div>







<div><span style="white-space:pre-wrap">        </span>&lt;/DataItem&gt;</div><div>      &lt;/Geometry&gt;</div><div>    &lt;/Grid&gt;</div><div>  &lt;/Domain&gt;</div><div>&lt;/Xdmf&gt;</div></div><div><br></div><div>Can this be done, or could this be done in the future?  Am I being daft and there is an easy way to do this?</div>







<div><br>Cheers again,</div><div>Andy</div><div class="gmail_extra"><br></div><br><div class="gmail_quote">On 22 November 2013 17:19, Andrew Parker <span dir="ltr">&lt;<a href="mailto:andy.john.parker@googlemail.com" target="_blank">andy.john.parker@googlemail.com</a>&gt;</span> wrote:<br>







<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">All,<div><br></div><div>Hopefully this is a simple question.  I&#39;m using xdmf with h5 files to store my mesh and view via paraview.  However, due to a recent change in my code, I now want to be able to specify &quot;NodeNumber XPosition YPosition ZPosition&quot; as a tuple for each node/point position in the mesh (it&#39;s unstructured) so that I can explicitly number the nodes.  Currently I do something like:</div>









<div><br></div><div><div>&lt;Geometry Type= &quot;X_Y_Z&quot;&gt;</div><div>&lt;DataItem Name=&quot;VX&quot; NumberType=&quot;Float&quot; Dimensions=&quot;1660&quot; Precision=&quot;8&quot; Format=&quot;HDF&quot;&gt;</div>









<div>points.h5:/Mesh/Xposition/</div><div>&lt;/DataItem&gt;</div><div>&lt;DataItem Name=&quot;VY&quot; NumberType=&quot;Float&quot; Dimensions=&quot;1660&quot; Precision=&quot;8&quot; Format=&quot;HDF&quot;&gt;</div><div>









points.h5:/Mesh/Yposition/</div><div>&lt;/DataItem&gt;</div><div>&lt;DataItem Name=&quot;VZ&quot; NumberType=&quot;Float&quot; Dimensions=&quot;1660&quot; Precision=&quot;8&quot; Format=&quot;HDF&quot;&gt;</div><div>points.h5:/Mesh/Zposition/</div>









<div>&lt;/DataItem&gt;</div><div>&lt;/Geometry&gt;</div></div><div><br></div><div>But this assume that the first x, y, and z in the file are meant to be for node 0, and node 0 is referenced in the topology section.  Now what I want to do is to be able to define for each x, y, z tuple the specific node number that those positions refer to. So explicit numbering rather than implicit numbering.  Can this be done with xdmf, I assume it can?  If not a massive amount of renumbering is needed.....</div>









<div><br></div><div>Any help really appreciated.</div><div><br></div><div>Cheers,</div><div>Andy</div></div>
</blockquote></div><br></div></div></div>
<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 <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 VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div><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 VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>