This file is indexed.

/usr/share/doc/libxdmf-dev/examples/Python/XdmfGridTest.py is in libxdmf-dev 3.0+git20160803-4.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
#!/bin/env python

from __future__ import print_function
from Xdmf import *

PointsTxt = """<?xml version="1.0" ?>
<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>


<Xdmf>
    <Domain>
        <Grid Name="TestGrid">
            <Topology Type="Quadrilateral" NumberOfElements="2" >
                <DataItem Format="XML" DataType="Float"
                    Dimensions="2 4">
                    0 1 6 5
                    16 17 22 21
                </DataItem>
            </Topology>
            <Geometry Type="XYZ">
                    <DataItem Format="XML" DataType="Float" Precision="8"
                            Dimensions="3 2 5 3">
                            10.0        0.0         0.0
                            10.0        1.0         0.0

                            10.0        2.0         0.0
                            10.0        3.0         0.0

                            10.0        4.0         0.0
                            10.0        0.0         1.0

                            10.0        1.0         1.0
                            10.0        2.0         1.0

                            10.0        3.0         1.0
                            10.0        4.0         1.0
                            10.0        0.0         0.0
                            10.0        1.0         0.0

                            10.0        2.0         0.0
                            10.0        3.0         0.0

                            10.0        4.0         0.0
                            10.0        0.0         1.0

                            10.0        1.0         1.0
                            10.0        2.0         1.0

                            10.0        3.0         1.0
                            10.0        4.0         1.0
                            10.0        0.0         0.0
                            10.0        1.0         0.0

                            10.0        2.0         0.0
                            10.0        3.0         0.0

                            10.0        4.0         0.0
                            10.0        0.0         1.0

                            10.0        1.0         1.0
                            10.0        2.0         1.0

                            10.0        3.0         1.0
                            10.0        4.0         1.0
                    </DataItem>
                    <DataItem Reference="/Xdmf/Domain/Grid[@Name='TestGrid']/Geometry/DataItem[1]"/>
                    <DataItem Reference="XML">
                        /Xdmf/Domain/Grid[@Name="TestGrid"]/Geometry/DataItem[2]
                    </DataItem>
                    <DataItem Reference="/Xdmf/Domain/Grid[@Name='TestGrid']/Geometry/DataItem[1]/../DataItem[2]"/>
            </Geometry>
        </Grid>
    </Domain>
</Xdmf>
"""

fd = open('Points.xmf', 'w')
fd.write(PointsTxt)
fd.close()
########
dom = XdmfDOM()
dom.Parse('Points.xmf')

te = dom.FindElementByPath('/Xdmf/Domain/Grid/Topology')
top = XdmfTopology()
top.DebugOn()
top.SetDOM(dom)
top.SetElement(te)
top.Update()
conn = top.GetConnectivity()
print ('Values = ', conn.GetValues())

ge = dom.FindElementByPath('/Xdmf/Domain/Grid/Geometry')
geo = XdmfGeometry()
geo.SetDOM(dom)
geo.SetElement(ge)
geo.Update()
points = geo.GetPoints()
print ('Geo Type = ', geo.GetGeometryTypeAsString(), ' # Points = ', geo.GetNumberOfPoints())
print ('Points = ', points.GetValues(0, 6))