22 |
# A Laplacian on a spiky geometry. |
# A Laplacian on a spiky geometry. |
23 |
|
|
24 |
require 'check.ph'; |
require 'check.ph'; |
25 |
|
CleanUp('laplacian-spike.bb'); |
26 |
|
|
27 |
# The Povray scene |
# The Povray scene |
28 |
WriteFile('test.pov',<< 'EOF'); |
WriteFile("laplacian-spike.pov",<< 'EOF'); |
29 |
/* The sphere surrounds the box in such a way that only one corner |
/* The sphere surrounds the box in such a way that only one corner |
30 |
still appears */ |
still appears */ |
31 |
|
|
48 |
vector a = (-4,-4,-4); |
vector a = (-4,-4,-4); |
49 |
vector b = (2,2,2); |
vector b = (2,2,2); |
50 |
|
|
51 |
scene S = pov("test.pov"); |
scene S = pov("laplacian-spike.pov"); |
52 |
mesh M = structured(n,a,b); |
mesh M = structured(n,a,b); |
53 |
domain O = domain(S,outside(<1,0,0>)); |
domain O = domain(S,outside(<1,0,0>)); |
54 |
|
|
60 |
u = 0 on M; |
u = 0 on M; |
61 |
}; |
}; |
62 |
|
|
63 |
save(medit,"test",M); |
save(medit,"laplacian-spike",M); |
64 |
save(medit,"test",u,M); |
save(medit,"laplacian-spike",u,M); |
65 |
EOF |
EOF |
66 |
|
|
67 |
# Compares the resulting output with a reference |
# Compares the resulting output with a reference |
68 |
VectorCheck('test.bb','laplacian-spike-ref.bb',1e-6); |
VectorCheck('laplacian-spike.bb','laplacian-spike-ref.bb',1e-6); |
69 |
|
|
70 |
Report(); |
Report(); |