File: product1.dx

package info (click to toggle)
dxsamples 4.4.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 26,340 kB
  • sloc: ansic: 10,079; sh: 8,445; java: 1,772; makefile: 1,102
file content (39 lines) | stat: -rw-r--r-- 1,183 bytes parent folder | download | duplicates (5)
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
# This example defines a grid where the positions are described by a 
# product array. In the first two dimensions, the positions are irregular, 
# while in the third dimension, they are regular 
#
#
# define a set of irregular points in the xy plane
object 1 class array type float rank 1 shape 3 items 8 data follows
       0.0 0.0 0.0 
       0.0 1.1 0.0
       1.0 0.2 0.0
       1.1 1.3 0.0
       2.2 0.2 0.0
       2.5 1.1 0.0
       3.5 0.1 0.0
       3.4 1.0 0.0
#
# define a set of regular points in the z direction
object 2 class regulararray count 3
origin 0.0 0.0 0.0
delta  0.0 0.0 1.0
#
# create a product array of the irregular points in the xy plane and
# the regular points in the z direction
object 3 class productarray
   term 1
   term 2
#
# create regular cube connections
object 4 class gridconnections counts 4 2 3 
#
# the data component
object 5 class array type float rank 0 items 24 data follows
   1.0   2.1   2.0   1.0   4.5   6.7   8.1   2.0    
  -0.9  -0.8   1.0   1.2   1.3   0.1   0.3   3.0   
   1.2   3.2   4.1   0.9   2.0   1.0  -0.9   2.0
object "field" class field
   component "positions" 3
   component "connections" 4
   component "data" 5