17 September 2021 9:31:12.143 AM FEM1D_BVP_QUADRATIC_TEST FORTRAN90 version Test the FEM1D_BVP_QUADRATIC library. TEST00 Solve -( A(x) U'(x) )' + C(x) U(x) = F(x) for 0 < x < 1, with U(0) = U(1) = 0. A(X) = 1.0 C(X) = 1.0 F(X) = X U(X) = X - SINH(X) / SINH(1) Number of nodes = 11 I X U Uexact Error 1 0.00 0.291434E-15 0.00000 0.291434E-15 2 0.10 0.147663E-01 0.147663E-01 0.425352E-07 3 0.20 0.286795E-01 0.286795E-01 0.571764E-07 4 0.30 0.408783E-01 0.408782E-01 0.136956E-06 5 0.40 0.504833E-01 0.504834E-01 0.101285E-06 6 0.50 0.565908E-01 0.565906E-01 0.260108E-06 7 0.60 0.582598E-01 0.582599E-01 0.118118E-06 8 0.70 0.545078E-01 0.545074E-01 0.433460E-06 9 0.80 0.442944E-01 0.442945E-01 0.911125E-07 10 0.90 0.265190E-01 0.265183E-01 0.682090E-06 11 1.00 0.00000 0.00000 0.00000 l1 norm of error = 0.174804E-06 L2 norm of error = 0.387933E-04 Seminorm of error = 0.150200E-02 Max norm of error = 0.764223E-04 TEST01 Solve -( A(x) U'(x) )' + C(x) U(x) = F(x) for 0 < x < 1, with U(0) = U(1) = 0. A1(X) = 1.0 C1(X) = 0.0 F1(X) = X * ( X + 3 ) * exp ( X ) U1(X) = X * ( 1 - X ) * exp ( X ) Number of nodes = 11 I X U Uexact Error 1 0.00 -0.555112E-15 0.00000 0.555112E-15 2 0.10 0.994734E-01 0.994654E-01 0.805308E-05 3 0.20 0.195424 0.195424 0.106371E-08 4 0.30 0.283482 0.283470 0.115050E-04 5 0.40 0.358038 0.358038 0.173068E-08 6 0.50 0.412197 0.412180 0.162001E-04 7 0.60 0.437309 0.437309 0.188347E-08 8 0.70 0.422911 0.422888 0.225438E-04 9 0.80 0.356087 0.356087 0.137113E-08 10 0.90 0.221395 0.221364 0.310661E-04 11 1.00 0.00000 0.00000 0.00000 l1 norm of error = 0.812492E-05 L2 norm of error = 0.475788E-03 Seminorm of error = 0.183976E-01 Max norm of error = 0.128552E-02 TEST02 Solve -( A(x) U'(x) )' + C(x) U(x) = F(x) for 0 < x < 1, with U(0) = U(1) = 0. A2(X) = 1.0 C2(X) = 2.0 F2(X) = X * ( 5 - X ) * exp ( X ) U2(X) = X * ( 1 - X ) * exp ( X ) Number of nodes = 11 I X U Uexact Error 1 0.00 0.124900E-14 0.00000 0.124900E-14 2 0.10 0.994709E-01 0.994654E-01 0.550166E-05 3 0.20 0.195419 0.195424 0.508820E-05 4 0.30 0.283475 0.283470 0.473316E-05 5 0.40 0.358029 0.358038 0.849604E-05 6 0.50 0.412187 0.412180 0.716298E-05 7 0.60 0.437299 0.437309 0.962545E-05 8 0.70 0.422902 0.422888 0.140319E-04 9 0.80 0.356079 0.356087 0.738470E-05 10 0.90 0.221392 0.221364 0.272862E-04 11 1.00 0.00000 0.00000 0.00000 l1 norm of error = 0.811911E-05 L2 norm of error = 0.475222E-03 Seminorm of error = 0.183976E-01 Max norm of error = 0.128743E-02 TEST03 Solve -( A(x) U'(x) )' + C(x) U(x) = F(x) for 0 < x < 1, with U(0) = U(1) = 0. A3(X) = 1.0 C3(X) = 2.0 * X F3(X) = - X * ( 2 * X * X - 3 * X - 3 ) * exp ( X ) U3(X) = X * ( 1 - X ) * exp ( X ) Number of nodes = 11 I X U Uexact Error 1 0.00 0.138778E-15 0.00000 0.138778E-15 2 0.10 0.994722E-01 0.994654E-01 0.678361E-05 3 0.20 0.195422 0.195424 0.263832E-05 4 0.30 0.283478 0.283470 0.781120E-05 5 0.40 0.358033 0.358038 0.490736E-05 6 0.50 0.412191 0.412180 0.107886E-04 7 0.60 0.437302 0.437309 0.615514E-05 8 0.70 0.422905 0.422888 0.170217E-04 9 0.80 0.356081 0.356087 0.521325E-05 10 0.90 0.221393 0.221364 0.286415E-04 11 1.00 0.00000 0.00000 0.00000 l1 norm of error = 0.817824E-05 L2 norm of error = 0.475415E-03 Seminorm of error = 0.183976E-01 Max norm of error = 0.128668E-02 TEST04 Solve -( A(x) U'(x) )' + C(x) U(x) = F(x) for 0 < x < 1, with U(0) = U(1) = 0. A4(X) = 1.0 + X * X C4(X) = 0.0 F4(X) = ( X + 3 X^2 + 5 X^3 + X^4 ) * exp ( X ) U4(X) = X * ( 1 - X ) * exp ( X ) Number of nodes = 11 I X U Uexact Error 1 0.00 0.163758E-14 0.00000 0.163758E-14 2 0.10 0.994768E-01 0.994654E-01 0.113792E-04 3 0.20 0.195421 0.195424 0.392651E-05 4 0.30 0.283499 0.283470 0.285030E-04 5 0.40 0.358030 0.358038 0.791252E-05 6 0.50 0.412238 0.412180 0.581535E-04 7 0.60 0.437299 0.437309 0.979047E-05 8 0.70 0.422990 0.422888 0.102429E-03 9 0.80 0.356079 0.356087 0.758261E-05 10 0.90 0.221528 0.221364 0.163419E-03 11 1.00 0.00000 0.00000 0.00000 l1 norm of error = 0.357360E-04 L2 norm of error = 0.478830E-03 Seminorm of error = 0.184190E-01 Max norm of error = 0.137041E-02 TEST05 Solve -( A(x) U'(x) )' + C(x) U(x) = F(x) for 0 < x < 1, with U(0) = U(1) = 0. A5(X) = 1.0 + X * X for X <= 1/3 = 7/9 + X for 1/3 < X C5(X) = 0.0 F5(X) = ( X + 3 X^2 + 5 X^3 + X^4 ) * exp ( X ) for X <= 1/3 = ( - 1 + 10/3 X + 43/9 X^2 + X^3 ) .* exp ( X ) for 1/3 <= X U5(X) = X * ( 1 - X ) * exp ( X ) Number of nodes = 11 I X U Uexact Error 1 0.00 0.194289E-15 0.00000 0.194289E-15 2 0.10 0.996896E-01 0.994654E-01 0.224195E-03 3 0.20 0.195842 0.195424 0.417557E-03 4 0.30 0.284132 0.283470 0.661161E-03 5 0.40 0.358565 0.358038 0.526847E-03 6 0.50 0.412668 0.412180 0.487695E-03 7 0.60 0.437633 0.437309 0.324708E-03 8 0.70 0.423209 0.422888 0.321354E-03 9 0.80 0.356238 0.356087 0.151286E-03 10 0.90 0.221550 0.221364 0.185962E-03 11 1.00 0.00000 0.00000 0.00000 l1 norm of error = 0.300069E-03 L2 norm of error = 0.628343E-03 Seminorm of error = 0.184672E-01 Max norm of error = 0.144690E-02 TEST06 Solve -( A(x) U'(x) )' + C(x) U(x) = F(x) for 0 < x < 1, with U(0) = U(1) = 0. A6(X) = 1.0 C6(X) = 0.0 F6(X) = pi*pi*sin(pi*X) U6(X) = sin(pi*x) Compute L2 norm and seminorm of error for various N. N L1 error L2 error Seminorm error Maxnorm error 11 0.000024 0.000839 0.032523 0.183654E-02 21 0.000002 0.000105 0.008161 0.239035E-03 41 0.000000 0.000013 0.002042 0.301793E-04 81 0.000000 0.000002 0.000511 0.378181E-05 161 0.000000 0.000000 0.000128 0.473020E-06 TEST07 Solve -( A(x) U'(x) )' + C(x) U(x) = F(x) for 0 < x < 1, with U(0) = U(1) = 0. Becker/Carey/Oden example Compute L2 norm and seminorm of error for various N. N L1 error L2 error Seminorm error Maxnorm error 11 0.023636 0.069885 1.722483 0.278261 21 0.005263 0.017570 0.975957 0.869379E-01 41 0.000772 0.003667 0.502186 0.260734E-01 81 0.000054 0.000408 0.119887 0.399866E-02 161 0.000003 0.000048 0.029132 0.543592E-03 TEST08 Solve -( A(x) U'(x) )' + C(x) U(x) = F(x) for 0 < x < 1, with U(0) = U(1) = 0. A8(X) = 1.0 C8(X) = 0.0 F8(X) = X * ( X + 3 ) * exp ( X ), X <= 2/3 = 2 * exp ( 2/3), 2/3 < X U8(X) = X * ( 1 - X ) * exp ( X ), X <= 2/3 = X * ( 1 - X ) * exp ( 2/3 ), 2/3 < X Number of nodes = 11 I X U Uexact Error 1 0.00 0.305311E-15 0.00000 0.305311E-15 2 0.10 0.846356E-01 0.994654E-01 0.148298E-01 3 0.20 0.165749 0.195424 0.296757E-01 4 0.30 0.238968 0.283470 0.445021E-01 5 0.40 0.298686 0.358038 0.593515E-01 6 0.50 0.338007 0.412180 0.741731E-01 7 0.60 0.348281 0.437309 0.890272E-01 8 0.70 0.319995 0.409024 0.890287E-01 9 0.80 0.252243 0.311637 0.593949E-01 10 0.90 0.145599 0.175296 0.296975E-01 11 1.00 0.00000 0.00000 0.00000 l1 norm of error = 0.445164E-01 L2 norm of error = 0.569727E-01 Seminorm of error = 0.212209 Max norm of error = 0.967138E-01 TEST09 Solve -( A(x) U'(x) )' + C(x) U(x) = F(x) for 0 < x < 1, with U(0) = U(1) = 0. A9(X) = 1.0 C9(X) = 0.0 F9(X) = X * ( X + 3 ) * exp ( X ), X <= 2/3 = 2 * exp ( 2/3), 2/3 < X U9(X) = X * ( 1 - X ) * exp ( X ), X <= 2/3 = X * ( 1 - X ), 2/3 < X Number of nodes = 11 I X U Uexact Error 1 0.00 -0.582867E-15 0.00000 0.582867E-15 2 0.10 0.734466E-01 0.994654E-01 0.260188E-01 3 0.20 0.143371 0.195424 0.520536E-01 4 0.30 0.205401 0.283470 0.780689E-01 5 0.40 0.253931 0.358038 0.104107 6 0.50 0.282062 0.412180 0.130118 7 0.60 0.281148 0.437309 0.156161 8 0.70 0.243386 0.210000 0.333861E-01 9 0.80 0.181953 0.160000 0.219531E-01 10 0.90 0.100977 0.900000E-01 0.109765E-01 11 1.00 0.00000 0.00000 0.00000 l1 norm of error = 0.557130E-01 L2 norm of error = 0.807930E-01 Seminorm of error = 0.222691 Max norm of error = 0.170560 TEST10 Solve -( A(x) U'(x) )' + C(x) U(x) = F(x) for 0 < x < 1, with U(0) = U(1) = 0. A(X) = 1.0 C(X) = 1.0 F(X) = X U(X) = X - SINH(X) / SINH(1) log(E) E L2error H1error Maxerror 0 2 0.471405E-02 0.362083E-01 0.766215E-02 1 4 0.602037E-03 0.930851E-02 0.108553E-02 2 8 0.757116E-04 0.234472E-02 0.146767E-03 3 16 0.947875E-05 0.587307E-03 0.191493E-04 4 32 0.118531E-05 0.146898E-03 0.244769E-05 5 64 0.148178E-06 0.367288E-04 0.309464E-06 6 128 0.185228E-07 0.918249E-05 0.389059E-07 log(E1) E1 / E2 L2rate H1rate Maxrate 0 2/ 4 2.96904 1.95970 2.81935 1 4/ 8 2.99127 1.98913 2.88680 2 8/ 16 2.99775 1.99723 2.93816 3 16/ 32 2.99943 1.99930 2.96780 4 32/ 64 2.99986 1.99983 2.98358 5 64/ 128 2.99996 1.99996 2.99171 Created graphics data file "data.txt". Created plot file "l2.png". Created plot file "h1.png". Created plot file "mx.png". FEM1D_BVP_QUADRATIC_TEST Normal end of execution. 17 September 2021 9:31:12.151 AM