<div dir="ltr"><div>Hello Andy<br><br></div><div>The XDMF2 library has the ability to assign Attributes and Information data to Geometry objects. So you wouldn't be changing the node numbers, you'd just be adding a new Attribute that has different values at each node, and you'd need to display this new Attribute in Paraview instead of the node numbers. <br>
</div><div><br>Since you mentioned offsets for XDMF arrays: I've been working on an XDMF2 implementation for ADCIRC, a finite element coastal ocean model. Being a fortran code, ADCIRC uses 1-offset arrays, while the XDMF2 standard is 0-offset. <br>
<br>Its easy enough for us to subtract 1 from the node numbers in the element table when storing mesh data as XDMF2, reversing the operation upon read into ADCIRC or leaving them as-is for reading into Paraview. However, when looking at node and element number labels on ADCIRC data in Paraview, the analyst has to remember that all the displayed values are actually off by 1. <br>
<br></div><div>I emailed the XDMF mailing list and got a reply from the primary developers that they were previously unaware of the demand for 1-offset arrays, but they are now researching the possibility of adding this.<br>
<br></div><div>Your case is a little different, since it seems you are interested in arbitrary node numbering. But I thought I would mention the above background info for completeness. As I said, XDMF2 Attributes may be the solution for you. <br>
</div><div><br>Cheers<br>Jason<br><br></div><div><br></div><div><br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 25, 2013 at 10:41 AM, Andrew Parker <span dir="ltr"><<a href="mailto:andy.john.parker@googlemail.com" target="_blank">andy.john.parker@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">All,<div><br></div><div>I thought I'd forward this onto the paraview list in case somebody could think of a way to do this? Please see my email below which I originally sent to the vtk user list. Any help would be very much appreciated, including the fact that it just cannot be done. I would in particular welcome thoughts from those who have helped develop the xdmf2 lib within the paraview source.</div>
<div><div class="h5">
<div><br>Many thanks again,</div><div>Andy<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>Date: 23 November 2013 17:13<br>Subject: [vtkusers] Explicit numbering of nodes for Xdmf/h5<br>To: "<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>" <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br>
<br><br><div dir="ltr">All,<div><br></div><div>In an effort to spark some comments I thought I'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"><?xml version="1.0"?></div><div class="gmail_extra"><!DOCTYPE Xdmf SYSTEM "Xdmf.dtd"></div><div class="gmail_extra">
<Xdmf xmlns:xi="<a href="http://www.w3.org/2003/XInclude" target="_blank">http://www.w3.org/2003/XInclude</a>" Version="2.2"></div><div class="gmail_extra"> <Domain></div><div class="gmail_extra">
<Grid GridType="Uniform"></div>
<div class="gmail_extra"> <Topology TopologyType="Quadrilateral" Dimensions="1"></div><div class="gmail_extra"> <DataItem Dimensions="1 4" NumberType="Int" Precision="8" Format="XML"></div>
<div class="gmail_extra"> 0 1 3 2 </div><div class="gmail_extra"><span style="white-space:pre-wrap">        </span></DataItem></div><div class="gmail_extra"> </Topology></div><div class="gmail_extra">
<Geometry GeometryType="XYZ"></div><div class="gmail_extra"> <DataItem Dimensions="4 3" NumberType="Float" Precision="4" Format="XML"></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></DataItem></div><div class="gmail_extra"> </Geometry></div>
<div class="gmail_extra"> </Grid></div><div class="gmail_extra"> </Domain></div><div class="gmail_extra"></Xdmf></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->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'd like a section in the geom part of the xmf file to qualify this numbering. It doesn't bother me if they're subsequently renumbered inside paraview/vtk, only that I don'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><?xml version="1.0"?></div><div><!DOCTYPE Xdmf SYSTEM "Xdmf.dtd"></div><div><Xdmf xmlns:xi="<a href="http://www.w3.org/2003/XInclude" target="_blank">http://www.w3.org/2003/XInclude</a>" Version="2.2"></div>
<div> <Domain></div><div> <Grid GridType="Uniform"></div><div> <Topology TopologyType="Quadrilateral" Dimensions="1"></div><div> <DataItem Dimensions="1 4" NumberType="Int" Precision="8" Format="XML"></div>
<div> <b> 300 20 22 80 </b></div><div><span style="white-space:pre-wrap">        </span></DataItem></div><div> </Topology></div><div> <Geometry GeometryType="<b>XYZ_Explicit</b>"></div>
<div> <DataItem Dimensions="4 3" NumberType="Float" Precision="4" Format="XML"></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></DataItem></div><div> </Geometry></div><div> </Grid></div><div> </Domain></div><div></Xdmf></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><div class="gmail_extra"><br></div></div></div></div></div></div></div></div></div></div>
</div><br></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 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://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Dr. Jason G. Fleming<br>Chief Engineer, Seahorse Coastal Consulting<br>3103 Mandy Ln<br>Morehead City, NC 28557<br>Tel: (252) 726-6323<br>Mobile: (252) 269-0962<br>
Web: <a href="http://www.seahorsecoastal.com" target="_blank">http://www.seahorsecoastal.com</a><br></div>
</div>