![]() |
OptFEM2DP1 Toolbox
V1.2
Matlab/Octave Optimized P1-Lagrange Finite Element Method in 2D
|
00001 function Test=valid_FEMmatrices() 00002 % automatic generation with sage 00003 % Copyright: 00004 % See \ref license 00005 i=1; 00006 Test(i).u=@(x,y) x + y; 00007 Test(i).cu='x + y'; 00008 Test(i).v=@(x,y) x - y; 00009 Test(i).cv='x - y'; 00010 Test(i).w=@(x,y) 2.*x + y; 00011 Test(i).cw='2*x + y'; 00012 Test(i).Mass=0.0000000000000000; 00013 Test(i).MassW=0.08333333333333333; 00014 Test(i).Stiff=0.0000000000000000; 00015 Test(i).degree=1; 00016 i=2; 00017 Test(i).u=@(x,y) 3.*x + 2.*y - 1; 00018 Test(i).cu='3*x + 2*y - 1'; 00019 Test(i).v=@(x,y) 2.*x - 2.*y + 1; 00020 Test(i).cv='2*x - 2*y + 1'; 00021 Test(i).w=@(x,y) 2.*x - 5.*y; 00022 Test(i).cw='2*x - 5*y'; 00023 Test(i).Mass=1.666666666666667; 00024 Test(i).MassW=-1.083333333333333; 00025 Test(i).Stiff=2.000000000000000; 00026 Test(i).degree=1; 00027 i=3; 00028 Test(i).u=@(x,y) 3.*x.^2 - x.*y + 2.*y.^2; 00029 Test(i).cu='3*x^2 - x*y + 2*y^2'; 00030 Test(i).v=@(x,y) 2.*x.^2 + x.*y - 3.*y.^2 - y; 00031 Test(i).cv='2*x^2 + x*y - 3*y^2 - y'; 00032 Test(i).w=@(x,y) x.*y; 00033 Test(i).cw='x*y'; 00034 Test(i).Mass=-0.7500000000000000; 00035 Test(i).MassW=-0.3416666666666667; 00036 Test(i).Stiff=0.8333333333333333; 00037 Test(i).degree=2; 00038 i=4; 00039 Test(i).u=@(x,y) 3.*x.^2 - 4.*x.*y + 2.*y.^2 - x + 4.*y + 4; 00040 Test(i).cu='3*x^2 - 4*x*y + 2*y^2 - x + 4*y + 4'; 00041 Test(i).v=@(x,y) 2.*x.^2 + 2.*x.*y - 3.*y.^2 - 2.*y + 1; 00042 Test(i).cv='2*x^2 + 2*x*y - 3*y^2 - 2*y + 1'; 00043 Test(i).w=@(x,y) x.^2 + y.^2 - 3; 00044 Test(i).cw='x^2 + y^2 - 3'; 00045 Test(i).Mass=-0.3611111111111111; 00046 Test(i).MassW=0.2805555555555556; 00047 Test(i).Stiff=-17.33333333333333; 00048 Test(i).degree=2; 00049 i=5; 00050 Test(i).u=@(x,y) 3.*x.^3 - 2.*x.*y + 2.*y.^2 + 3.*x; 00051 Test(i).cu='3*x^3 - 2*x*y + 2*y^2 + 3*x'; 00052 Test(i).v=@(x,y) -3.*y.^3 + 2.*x.^2 + 2.*x.*y - 2.*y; 00053 Test(i).cv='-3*y^3 + 2*x^2 + 2*x*y - 2*y'; 00054 Test(i).w=@(x,y) x.^2.*y + x.*y.^2 - 2.*x.*y + 1; 00055 Test(i).cw='x^2*y + x*y^2 - 2*x*y + 1'; 00056 Test(i).Mass=-0.5708333333333333; 00057 Test(i).MassW=-0.4377380952380952; 00058 Test(i).Stiff=10.33333333333333; 00059 Test(i).degree=3; 00060 i=6; 00061 Test(i).u=@(x,y) 3.*x.^4 + 3.*x.^3 + 2.*y.^2; 00062 Test(i).cu='3*x^4 + 3*x^3 + 2*y^2'; 00063 Test(i).v=@(x,y) 2.*y.^4 - 3.*y.^3 + 2.*x.^2; 00064 Test(i).cv='2*y^4 - 3*y^3 + 2*x^2'; 00065 Test(i).w=@(x,y) x.^4 + y.^3 - 3; 00066 Test(i).cw='x^4 + y^3 - 3'; 00067 Test(i).Mass=1.400515873015873; 00068 Test(i).MassW=-3.020477994227994; 00069 Test(i).Stiff=16.00000000000000; 00070 Test(i).degree=4; 00071 i=7; 00072 Test(i).u=@(x,y) x.^5 + 3.*x.^3.*y.^2 - y.^5; 00073 Test(i).cu='x^5 + 3*x^3*y^2 - y^5'; 00074 Test(i).v=@(x,y) 3.*x.^5 + 2.*x.^3.*y.^2 + 2.*y.^5 + 2.*x.^2.*y.^2; 00075 Test(i).cv='3*x^5 + 2*x^3*y^2 + 2*y^5 + 2*x^2*y^2'; 00076 Test(i).w=@(x,y) -3.*x.^3.*y.^2 + x.^2 + y.^2 + 1; 00077 Test(i).cw='-3*x^3*y^2 + x^2 + y^2 + 1'; 00078 Test(i).Mass=0.9669672919672920; 00079 Test(i).MassW=1.011666243809101; 00080 Test(i).Stiff=18.73777777777778; 00081 Test(i).degree=5; 00082 i=8; 00083 Test(i).u=@(x,y) x.^6 - x.^5 + 3.*x.^3.*y.^2 - y.^5; 00084 Test(i).cu='x^6 - x^5 + 3*x^3*y^2 - y^5'; 00085 Test(i).v=@(x,y) y.^6 + 3.*x.^5 + 2.*x.^3.*y.^2 + 2.*y.^5 + 2.*x.^2.*y.^2; 00086 Test(i).cv='y^6 + 3*x^5 + 2*x^3*y^2 + 2*y^5 + 2*x^2*y^2'; 00087 Test(i).w=@(x,y) 4.*x.^6 - 3.*x.^3.*y.^3 - y.^6; 00088 Test(i).cw='4*x^6 - 3*x^3*y^3 - y^6'; 00089 Test(i).Mass=0.4305452484023913; 00090 Test(i).MassW=0.5553725794902266; 00091 Test(i).Stiff=6.920317460317460; 00092 Test(i).degree=6;