File: cube.fe

package info (click to toggle)
evolver 2.70+ds-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 17,148 kB
  • sloc: ansic: 127,395; makefile: 209; sh: 98
file content (55 lines) | stat: -rw-r--r-- 1,226 bytes parent folder | download | duplicates (7)
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
// cube.fe
// Evolver data for cube of prescribed volume.

vertices
1  0.0 0.0 0.0 
2  1.0 0.0 0.0
3  1.0 1.0 0.0
4  0.0 1.0 0.0
5  0.0 0.0 1.0
6  1.0 0.0 1.0
7  1.0 1.0 1.0
8  0.0 1.0 1.0

edges  /* given by endpoints and attribute */
1   1 2   
2   2 3   
3   3 4  
4   4 1 
5   5 6
6   6 7  
7   7 8 
8   8 5
9   1 5   
10  2 6  
11  3 7 
12  4 8

faces  /* given by oriented edge loop */
1   1 10 -5  -9
2   2 11 -6 -10
3   3 12 -7 -11
4   4  9 -8 -12
5   5  6  7   8
6  -4 -3 -2  -1

bodies  /* one body, defined by its oriented faces */
1   1 2 3 4 5 6  volume 1

read

// Typical evolution to sphere
gogo := { g 5; r; g 5; hessian; r; g 5; hessian; }

// Evolution to very high accuracy, using higher-order Lagrange elements.
// To be run on original datafile.
gogo2 := { g 5; r; g 5; hessian; r; g 5; hessian;
           lagrange 2; g 5; hessian; 
           lagrange 4; g 5; hessian; 
           lagrange 6; g 5; hessian; 
           ideal_rad := (3*body[1].volume/4/pi)^(1/3);
           printf "Area error: %g\n",total_area - 4*pi*ideal_rad^2;
           printf "Vertex radius spread: %g\n",
             max(vertex,sqrt((x-.5)^2+(y-.5)^2+(z-.5)^2))
               - min(vertex,sqrt((x-.5)^2+(y-.5)^2+(z-.5)^2));
}