Debian Codegraph @

docs/formats/opendx.rst

raw
1 .. _opendx:
2
3 OpenDX scalar data format
4 =========================
5
6 We output most discretized scalar data (e.g., potential, accessibility, etc.) from APBS in the data format used by the OpenDX software package.
7 The OpenDX data format is very flexible; the following sections describe the application of this format for APBS multigrid and finite element datasets.
8
9 The multigrid data format has the following form:
10
11 .. code-block:: bash
12
13 object 1 class gridpositions counts nx ny nz
14 origin xmin ymin zmin
15 delta hx 0.0 0.0
16 delta 0.0 hy 0.0
17 delta 0.0 0.0 hz
18 object 2 class gridconnections counts nx ny nz
19 object 3 class array type double rank 0 items n data follows
20 u(0,0,0) u(0,0,1) u(0,0,2)
21 ...
22 u(0,0,nz-3) u(0,0,nz-2) u(0,0,nz-1)
23 u(0,1,0) u(0,1,1) u(0,1,2)
24 ...
25 u(0,1,nz-3) u(0,1,nz-2) u(0,1,nz-1)
26 ...
27 u(0,ny-1,nz-3) u(0,ny-1,nz-2) u(0,ny-1,nz-1)
28 u(1,0,0) u(1,0,1) u(1,0,2)
29 ...
30 attribute "dep" string "positions"
31 object "regular positions regular connections" class field
32 component "positions" value 1
33 component "connections" value 2
34 component "data" value 3`
35
36 The variables in this format include:
37
38 ``nx ny nz``
39 The number of grid points in the x-, y-, and z-directions
40
41 ``xmin ymin zmin``
42 The coordinates of the grid lower corner
43
44 ``hx hy hz``
45 The grid spacings in the x-, y-, and z-directions.
46
47 ``n``
48 The total number of grid points; :math:`n = nx * ny * nz`
49
50 ``u(*,*,*)``
51 The data values, ordered with the z-index increasing most quickly, followed by the y-index, and then the x-index.
52
53 For finite element solutions, the OpenDX format takes the following form:
54
55 .. code-block:: bash
56
57 object 1 class array type float rank 1 shape 3 items N
58 v1x v1y v1z
59 v2x v2y v2z
60 ...
61 vNx vNy vNz
62 object 2 class array type int rank 1 shape 4 items M
63 s1a s1b s1c s1d
64 s2a s2b s2c s2d
65 ...
66 sMa sMb sMc sMd
67 attribute "element type" string "tetrahedra"
68 object 3 class array type float rank 0 items N
69 u1
70 u2
71 ...
72 uN
73 attribute "dep" string "positions"
74 object "irregular positions irregular connections" class field
75 component "positions" value 1
76 component "connections" value 2
77 component "data" value 3
78 end
79
80 where the variables in this format are:
81
82 ``N``
83 Number of vertices
84
85 ``vix viy viz``
86 Coordinates of vertex i
87
88 ``M``
89 Number of simplices
90
91 ``sia sib sic sid``
92 IDs of vertices in simplex i
93
94 ``ui``
95 Data value associated with vertex i