File: XdmfDOMTest3.py

package info (click to toggle)
xdmf 3.0%2Bgit20160803-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 35,388 kB
  • ctags: 36,627
  • sloc: ansic: 265,382; cpp: 162,889; python: 10,976; f90: 1,378; yacc: 687; fortran: 464; xml: 200; java: 187; lex: 125; makefile: 82; sh: 28
file content (14 lines) | stat: -rwxr-xr-x 290 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/env python

from __future__ import print_function
from Xdmf import *

d = XdmfDOM()
root = d.Create()
dm = d.InsertNew(root, 'Domain')
g = d.InsertNew(dm, 'Grid')
geo = d.InsertNew(g, 'Geometry')
ds  = d.InsertNew(geo, 'DataStructure')
print (d.Serialize(root))

d.Write('junk.xmf')