April 29 2007 6:42:08.053 AM FEM1D_NONLINEAR FORTRAN90 version Solve a nonlinear boundary value problem: -d/dx (p(x) du/dx) + q(x)*u + u*u' = f(x) on an interval [xl,xr], with the values of u or u' specified at xl and xr. The equation is to be solved for X greater than XL = .000000 and less than XR = 1.00000 The boundary conditions are: At X = XL, U= .000000 At X = XR, U'= 1.00000 This is test problem #2: P(X) = 1, Q(X) = 0, F(X) = -0.5*pi*cos(0.5*pi*X) + 2*sin(0.5*pi*X)*(1-cos(0.5*pi*X)/pi. Boundary conditions: U(0) = 0, U'(1) = 1. The exact solution is U(X) = 2*(1-cos(pi*x/2))/pi Number of quadrature points per element is 1 Number of iterations is 10 Node Location 0 .000000 1 .100000 2 .200000 3 .300000 4 .400000 5 .500000 6 .600000 7 .700000 8 .800000 9 .900000 10 1.00000 Subint Length 1 .100000 2 .100000 3 .100000 4 .100000 5 .100000 6 .100000 7 .100000 8 .100000 9 .100000 10 .100000 Subint Quadrature point 1 0.500000E-01 2 .150000 3 .250000 4 .350000 5 .450000 6 .550000 7 .650000 8 .750000 9 .850000 10 .950000 Subint Left Node Right Node 1 0 1 2 1 2 3 2 3 4 3 4 5 4 5 6 5 6 7 6 7 8 7 8 9 8 9 10 9 10 Node Unknown 0 -1 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 Printout of tridiagonal linear system: Equation ALEFT ADIAG ARITE RHS 1 20.0000 -10.0000 -.154454 2 -10.0000 20.0000 -10.0000 -.147799 3 -10.0000 20.0000 -10.0000 -.136149 4 -10.0000 20.0000 -10.0000 -.119284 5 -10.0000 20.0000 -10.0000 -0.972917E-01 6 -10.0000 20.0000 -10.0000 -0.706000E-01 7 -10.0000 20.0000 -10.0000 -0.399792E-01 8 -10.0000 20.0000 -10.0000 -0.651058E-02 9 -10.0000 20.0000 -10.0000 0.284722E-01 10 -10.0000 10.0000 1.02308 Computed solution: Node X(I) U(X(I)) 0 .000000 .000000 1 .100000 0.279485E-01 2 .200000 0.713424E-01 3 .300000 .129516 4 .400000 .201305 5 .500000 .285022 6 .600000 .378468 7 .700000 .478975 8 .800000 .583479 9 .900000 .688634 10 1.00000 .790942 Computed solution: Node X(I) U(X(I)) 0 .000000 .000000 1 .100000 0.148389E-02 2 .200000 0.184564E-01 3 .300000 0.504114E-01 4 .400000 0.965231E-01 5 .500000 .155664 6 .600000 .226426 7 .700000 .307153 8 .800000 .395967 9 .900000 .490808 10 1.00000 .589466 Computed solution: Node X(I) U(X(I)) 0 .000000 .000000 1 .100000 0.978230E-02 2 .200000 0.350230E-01 3 .300000 0.751252E-01 4 .400000 .129110 5 .500000 .195640 6 .600000 .273059 7 .700000 .359430 8 .800000 .452588 9 .900000 .550198 10 1.00000 .649816 Computed solution: Node X(I) U(X(I)) 0 .000000 .000000 1 .100000 0.777244E-02 2 .200000 0.310140E-01 3 .300000 0.691526E-01 4 .400000 .121249 5 .500000 .186017 6 .600000 .261860 7 .700000 .346904 8 .800000 .439050 9 .900000 .536021 10 1.00000 .635418 Computed solution: Node X(I) U(X(I)) 0 .000000 .000000 1 .100000 0.776462E-02 2 .200000 0.309987E-01 3 .300000 0.691306E-01 4 .400000 .121221 5 .500000 .185985 6 .600000 .261824 7 .700000 .346867 8 .800000 .439012 9 .900000 .535982 10 1.00000 .635380 Computed solution: Node X(I) U(X(I)) 0 .000000 .000000 1 .100000 0.776462E-02 2 .200000 0.309987E-01 3 .300000 0.691306E-01 4 .400000 .121221 5 .500000 .185985 6 .600000 .261824 7 .700000 .346867 8 .800000 .439012 9 .900000 .535982 10 1.00000 .635380 Computed solution: Node X(I) U(X(I)) 0 .000000 .000000 1 .100000 0.776462E-02 2 .200000 0.309987E-01 3 .300000 0.691306E-01 4 .400000 .121221 5 .500000 .185985 6 .600000 .261824 7 .700000 .346867 8 .800000 .439012 9 .900000 .535982 10 1.00000 .635380 Computed solution: Node X(I) U(X(I)) 0 .000000 .000000 1 .100000 0.776462E-02 2 .200000 0.309987E-01 3 .300000 0.691306E-01 4 .400000 .121221 5 .500000 .185985 6 .600000 .261824 7 .700000 .346867 8 .800000 .439012 9 .900000 .535982 10 1.00000 .635380 Computed solution: Node X(I) U(X(I)) 0 .000000 .000000 1 .100000 0.776462E-02 2 .200000 0.309987E-01 3 .300000 0.691306E-01 4 .400000 .121221 5 .500000 .185985 6 .600000 .261824 7 .700000 .346867 8 .800000 .439012 9 .900000 .535982 10 1.00000 .635380 Computed solution: Node X(I) U(X(I)) 0 .000000 .000000 1 .100000 0.776462E-02 2 .200000 0.309987E-01 3 .300000 0.691306E-01 4 .400000 .121221 5 .500000 .185985 6 .600000 .261824 7 .700000 .346867 8 .800000 .439012 9 .900000 .535982 10 1.00000 .635380 Compare computed and exact solutions: X Computed U Exact U .000000 .000000 .000000 .125000 0.135731E-01 0.122325E-01 .250000 0.500647E-01 0.484598E-01 .375000 .108198 .107290 .500000 .185985 .186462 .625000 .283085 .282933 .750000 .392940 .392996 .875000 .511740 .512421 1.00000 .635380 .636620 FEM1D_NONLINEAR: Normal end of execution. April 29 2007 6:42:08.055 AM