 |
The first thing that had to be done after we finished piecing together our programs,
was testing. Keep in mind, the equation we are working with is:
-L(u) + q*u = f
What you see below is a table of the different errors we found, with q =
constant (1,1,1) function. The constants were found by finding the slopes of the errors by comparing
different levels of Vm, and then dividing by the constant log10(1/5).
Basically, what this constant represents is the exponential constant of the error
E = c(1/5)^k, where c is also some constant. For more details on the different types of errors,
click here.
So the numbers you see are actually the differences from the
approximations on each level ( | Um - Um+1 | ). For harmonic
splines we went from V2 to V5 and for bi-harmonic we went from V2-V4. Once we were in the level of V5
and above, we had problems with solving the matrices which were 729 by 729 and larger.
The functions we used to test are tri and quad-harmonic because in order to
know the result was right we had to work backwards, and in order to do so we needed
to take the laplacian of our theoretical u. So, we started with a functionu (tri or quad-harm), and subtracted L(u)
and then we had our f. Now plotting our solution after plugging in f, we had theoretical u and Pu (Pu is approximation)
converging. Here are the results of testing:
Exponential Constants of Various Functions (TEST)
|
Notation |
TRI 1 |
Tri-Harmonic Harmonic Func.
w/ values (0,0,-100,0,0,40,0,0,-130) |
TRI 2 |
Tri-Harmonic Harmonic Func. w/
values (0,0,200,0,0,-100,0,0,130) |
TRI 3 |
Tri-Harmonic Harmonic Func. w/ values (0,0,206,0,0,-423,0,0,117) |
QUAD 1 |
Quad-Harmonic Func. w/ values (0,0,0,-100,0,0,0,40,0,0,0,-130)
|
|
Harmonic Splines |
Bi-Harmonic Splines |
Func. |
Max Error |
Avg. Error |
Energy Error |
Max Error |
Avg. Error |
Energy Error |
A Post. Error |
TRI 1 |
0.9947 |
0.9996 |
0.5047 |
1.9721 |
1.9838 |
1.4928 |
0.9997 |
TRI 2 |
0.9938 |
0.9996 |
0.4990 |
1.9651 |
1.9832 |
1.4924 |
0.9997 |
TRI 3 |
0.9882 |
0.9994 |
0.4988 |
1.9550 |
1.9678 |
1.4825 |
1.0010 |
QUAD 1 |
0.9937 |
0.9996 |
0.4990 |
1.9755 |
1.9844 |
1.4932 |
0.9996 |
By viewing the table, we now know what the constants are supposed to be.
So, now we can test new functions for which we do not know what the solution
is supposed to be. In the following table, we have various f's and q's and
you can see which functions behave nicely:
Exponential Constants of Various Functions
|
Notation |
c1 |
Constant fn. (1,1,1) |
h5 |
Harmonic fn. (5,0,0) |
h5s |
(Harmonic (5,0,0))^2 |
x |
X-coordinate |
|
Harmonic Splines |
Bi-Harmonic Splines |
f |
q |
Max Error |
Avg. Error |
Energy Error |
Max Error |
Avg. Error |
Energy Error |
A Post. Error |
h5 |
c1 |
0.9392 |
0.9987 |
0.4984 |
1.8671 |
1.9561 |
1.4708 |
0.8901 |
x |
h5 |
0.9381 |
0.9913 |
0.4917 |
1.4253 |
1.4270 |
0.9325 |
0.4147 |
h5s |
h5 |
0.8790 |
0.9930 |
0.4930 |
1.6443 |
1.8751 |
1.3969 |
0.9208 |
h5 |
h5 |
0.9266 |
0.9992 |
0.4983 |
1.6470 |
1.8630 |
1.3963 |
0.9383 |
x |
h5s |
0.9383 |
0.9917 |
0.4918 |
1.4190 |
1.4230 |
0.9292 |
0.4133 |
h5s |
h5s |
0.8488 |
0.9912 |
0.4913 |
1.5608 |
1.8088 |
1.3361 |
0.8887 |
h5 |
h5s |
0.8870 |
0.9991 |
0.4978 |
1.5318 |
1.7726 |
1.3074 |
0.8748 |
x |
x |
0.9420 |
0.9908 |
0.4917 |
1.4324 |
1.4288 |
0.9339 |
0.4149 |
h5s |
x |
0.8932 |
0.9936 |
0.4939 |
1.6425 |
1.8760 |
1.3943 |
0.9008 |
h5 |
x |
0.9457 |
0.9984 |
0.4984 |
1.4242 |
1.4752 |
0.9771 |
0.4356 |
The following table has links to the
graph comparison between the harmonic and
bi-harmonic approximate solutions. Randomly, we ran the graphs in either
V2 or V3, by this you can see the approximations from the harmonic and bi-harmonic
converge as you go deeper in Vm. From theory, the bi-harmonic always gives
a better approximation basically for all functions f and q. But, the deeper you go in Vm,
the better the harmonic solution will get, and so they do eventually converge. We did not
show a plot of V4 because the two graphs are basically on top of each other from the normal view,
and you wouldn't see a difference between the two.
(Note: the red graph is harmonic and the blue is bi-harmonic)
1 |
f = harm (5,0,0)
and q = (1,1,1)
|
2 |
f = x and q =
harm (5,0,0)
|
3 |
f = (harm
(5,0,0))^2 and q = harm (5,0,0)
|
4 |
f = harm (5,0,0)
and q = harm (5,0,0)
|
5 |
f = x and q = (harm (5,0,0))^2
|
6 |
f = (harm (5,0,0))^2 and q = (harm (5,0,0))^2
|
7 |
f = harm (5,0,0)
and q = (harm (5,0,0))^2
|
8 |
f = x
and q = x
|
9 |
f = (harm
(5,0,0))^2 and q =x
|
10 |
f = harm (5,0,0)
and q =x
|
After looking at the graphs and looking at the
values from the last table, we see there are "bad" functions. The function (harm
(5,0,0))^2 is bad and this can be considered true because there is no laplacian defined for it.
Now the function x is an even "badder" function, and this can be backed up by the fact
that it has no laplacian and also has no energy defined. After looking at the graphs, where f
varies over a certain q, you can see that the solution depends much more on f. By looking at the graphs
with the same f's, you will see the shape of the solution remains the same.
|