17 September 2021 9:31:15.155 AM fem2d_poisson_rectangle() FORTRAN90 version Solution of the Poisson equation on a unit rectangle in 2 dimensions. - Uxx - Uyy = F(x,y) in the box U(x,y) = G(x,y) on the boundary. The finite element method is used, with piecewise quadratic basis functions on 6 node triangular elements. The corner nodes of the triangles are generated by an underlying grid whose dimensions are NX = 7 NY = 7 Number of nodes = 169 Number of elements = 72 Number of unknowns = 169 The matrix bandwidth is 79 fem2d_poisson_rectangle(): Wrote an EPS file "rectangle_nodes.eps" containing a picture of the nodes. fem2d_poisson_rectangle(): Wrote an ASCII node file "rectangle_nodes.txt" of the form X(I), Y(I) which can be used for plotting. fem2d_poisson_rectangle(): Wrote an EPS file "rectangle_elements.eps" containing a picture of the elements. fem2d_poisson_rectangle(): Wrote an ASCII element file "rectangle_elements.txt" of the form Node(1) Node(2) Node(3) Node(4) Node(5) Node(6) which can be used for plotting. Initial 5 x 5 block of matrix A: Col: 1 2 3 4 5 Row --- 1 1.00000 -0.666667 0.166667 0.00000 0.00000 2 -0.666667 2.66667 -0.666667 0.00000 0.00000 3 0.166667 -0.666667 2.00000 -0.666667 0.166667 4 0.00000 0.00000 -0.666667 2.66667 -0.666667 5 0.00000 0.00000 0.166667 -0.666667 2.00000 Part of right hand side F: 1 0.0000000 2 0.0000000 3 0.18568099E-17 4 -.37136199E-17 5 -.19478644E-17 6 0.76093486E-17 7 -.11414023E-16 8 0.15218697E-16 9 -.76093486E-17 10 0.0000000 A after BC adjustment: Col: 1 2 3 4 5 Row --- 1 1.00000 0.00000 0.00000 0.00000 0.00000 2 0.00000 1.00000 0.00000 0.00000 0.00000 3 0.00000 0.00000 1.00000 0.00000 0.00000 4 0.00000 0.00000 0.00000 1.00000 0.00000 5 0.00000 0.00000 0.00000 0.00000 1.00000 F after BC adjustment: 1 0.0000000 2 0.83333333E-01 3 0.16666667 4 0.25000000 5 0.33333333 6 0.41666667 7 0.50000000 8 0.58333333 9 0.66666667 10 0.75000000 Part of the solution vector: 1 0.0000000 2 0.83333333E-01 3 0.16666667 4 0.25000000 5 0.33333333 6 0.41666667 7 0.50000000 8 0.58333333 9 0.66666667 10 0.75000000 ********************************************* * * * ERRORS: * * L2 error = 0.131703E-02 * * H1 seminorm error = 0.600400E-01 * * * ********************************************* COMPARE: Compare computed and exact solutions at the nodes. X Y U U computed exact 0.0000 0.0000 0.0000 0.0000 0.0833 0.0000 0.0833 0.0833 0.1667 0.0000 0.1667 0.1667 0.2500 0.0000 0.2500 0.2500 0.3333 0.0000 0.3333 0.3333 0.4167 0.0000 0.4167 0.4167 0.5000 0.0000 0.5000 0.5000 0.5833 0.0000 0.5833 0.5833 0.6667 0.0000 0.6667 0.6667 0.7500 0.0000 0.7500 0.7500 0.8333 0.0000 0.8333 0.8333 0.9167 0.0000 0.9167 0.9167 1.0000 0.0000 1.0000 1.0000 0.0000 0.0833 0.0000 0.0000 0.0833 0.0833 0.1503 0.1503 0.1667 0.0833 0.2961 0.2961 0.2500 0.0833 0.4330 0.4330 0.3333 0.0833 0.5575 0.5575 0.4167 0.0833 0.6667 0.6667 0.5000 0.0833 0.7588 0.7588 0.5833 0.0833 0.8334 0.8333 0.6667 0.0833 0.8908 0.8908 0.7500 0.0833 0.9330 0.9330 0.8333 0.0833 0.9627 0.9627 0.9167 0.0833 0.9837 0.9837 1.0000 0.0833 1.0000 1.0000 0.0000 0.1667 -0.0000 0.0000 0.0833 0.1667 0.2127 0.2127 0.1667 0.1667 0.4165 0.4167 0.2500 0.1667 0.6036 0.6036 0.3333 0.1667 0.7661 0.7663 0.4167 0.1667 0.8996 0.8996 0.5000 0.1667 0.9997 1.0000 0.5833 0.1667 1.0663 1.0663 0.6667 0.1667 1.0994 1.0997 0.7500 0.1667 1.1036 1.1036 0.8333 0.1667 1.0832 1.0833 0.9167 0.1667 1.0461 1.0461 1.0000 0.1667 1.0000 1.0000 0.0000 0.2500 -0.0000 0.0000 0.0833 0.2500 0.2664 0.2663 0.1667 0.2500 0.5202 0.5202 0.2500 0.2500 0.7501 0.7500 0.3333 0.2500 0.9457 0.9457 0.4167 0.2500 1.0998 1.0997 0.5000 0.2500 1.2071 1.2071 0.5833 0.2500 1.2665 1.2663 0.6667 0.2500 1.2790 1.2790 0.7500 0.2500 1.2501 1.2500 0.8333 0.2500 1.1869 1.1869 0.9167 0.2500 1.0997 1.0997 1.0000 0.2500 1.0000 1.0000 0.0000 0.3333 0.0000 0.0000 0.0833 0.3333 0.3075 0.3075 0.1667 0.3333 0.5994 0.5997 0.2500 0.3333 0.8624 0.8624 0.3333 0.3333 1.0829 1.0833 0.4167 0.3333 1.2532 1.2532 0.5000 0.3333 1.3655 1.3660 0.5833 0.3333 1.4198 1.4198 0.6667 0.3333 1.4162 1.4167 0.7500 0.3333 1.3624 1.3624 0.8333 0.3333 1.2661 1.2663 0.9167 0.3333 1.1408 1.1408 1.0000 0.3333 1.0000 1.0000 0.0000 0.4167 -0.0000 0.0000 0.0833 0.4167 0.3334 0.3333 0.1667 0.4167 0.6496 0.6496 0.2500 0.4167 0.9331 0.9330 0.3333 0.4167 1.1698 1.1698 0.4167 0.4167 1.3499 1.3497 0.5000 0.4167 1.4659 1.4659 0.5833 0.4167 1.5165 1.5163 0.6667 0.4167 1.5032 1.5032 0.7500 0.4167 1.4331 1.4330 0.8333 0.4167 1.3163 1.3163 0.9167 0.4167 1.1667 1.1667 1.0000 0.4167 1.0000 1.0000 0.0000 0.5000 -0.0000 0.0000 0.0833 0.5000 0.3421 0.3422 0.1667 0.5000 0.6664 0.6667 0.2500 0.5000 0.9571 0.9571 0.3333 0.5000 1.1988 1.1994 0.4167 0.5000 1.3826 1.3826 0.5000 0.5000 1.4994 1.5000 0.5833 0.5000 1.5492 1.5493 0.6667 0.5000 1.5322 1.5327 0.7500 0.5000 1.4571 1.4571 0.8333 0.5000 1.3330 1.3333 0.9167 0.5000 1.1755 1.1755 1.0000 0.5000 1.0000 1.0000 0.0000 0.5833 0.0000 0.0000 0.0833 0.5833 0.3334 0.3333 0.1667 0.5833 0.6496 0.6496 0.2500 0.5833 0.9331 0.9330 0.3333 0.5833 1.1698 1.1698 0.4167 0.5833 1.3499 1.3497 0.5000 0.5833 1.4659 1.4659 0.5833 0.5833 1.5165 1.5163 0.6667 0.5833 1.5032 1.5032 0.7500 0.5833 1.4331 1.4330 0.8333 0.5833 1.3163 1.3163 0.9167 0.5833 1.1667 1.1667 1.0000 0.5833 1.0000 1.0000 0.0000 0.6667 -0.0000 0.0000 0.0833 0.6667 0.3075 0.3075 0.1667 0.6667 0.5994 0.5997 0.2500 0.6667 0.8624 0.8624 0.3333 0.6667 1.0829 1.0833 0.4167 0.6667 1.2532 1.2532 0.5000 0.6667 1.3655 1.3660 0.5833 0.6667 1.4198 1.4198 0.6667 0.6667 1.4162 1.4167 0.7500 0.6667 1.3624 1.3624 0.8333 0.6667 1.2661 1.2663 0.9167 0.6667 1.1408 1.1408 1.0000 0.6667 1.0000 1.0000 0.0000 0.7500 -0.0000 0.0000 0.0833 0.7500 0.2664 0.2663 0.1667 0.7500 0.5202 0.5202 0.2500 0.7500 0.7501 0.7500 0.3333 0.7500 0.9457 0.9457 0.4167 0.7500 1.0998 1.0997 0.5000 0.7500 1.2071 1.2071 0.5833 0.7500 1.2665 1.2663 0.6667 0.7500 1.2790 1.2790 0.7500 0.7500 1.2501 1.2500 0.8333 0.7500 1.1869 1.1869 0.9167 0.7500 1.0997 1.0997 1.0000 0.7500 1.0000 1.0000 0.0000 0.8333 -0.0000 0.0000 0.0833 0.8333 0.2127 0.2127 0.1667 0.8333 0.4165 0.4167 0.2500 0.8333 0.6036 0.6036 0.3333 0.8333 0.7661 0.7663 0.4167 0.8333 0.8996 0.8996 0.5000 0.8333 0.9997 1.0000 0.5833 0.8333 1.0663 1.0663 0.6667 0.8333 1.0994 1.0997 0.7500 0.8333 1.1036 1.1036 0.8333 0.8333 1.0832 1.0833 0.9167 0.8333 1.0461 1.0461 1.0000 0.8333 1.0000 1.0000 0.0000 0.9167 0.0000 0.0000 0.0833 0.9167 0.1503 0.1503 0.1667 0.9167 0.2961 0.2961 0.2500 0.9167 0.4330 0.4330 0.3333 0.9167 0.5575 0.5575 0.4167 0.9167 0.6667 0.6667 0.5000 0.9167 0.7588 0.7588 0.5833 0.9167 0.8334 0.8333 0.6667 0.9167 0.8908 0.8908 0.7500 0.9167 0.9330 0.9330 0.8333 0.9167 0.9627 0.9627 0.9167 0.9167 0.9837 0.9837 1.0000 0.9167 1.0000 1.0000 0.0000 1.0000 0.0000 0.0000 0.0833 1.0000 0.0833 0.0833 0.1667 1.0000 0.1667 0.1667 0.2500 1.0000 0.2500 0.2500 0.3333 1.0000 0.3333 0.3333 0.4167 1.0000 0.4167 0.4167 0.5000 1.0000 0.5000 0.5000 0.5833 1.0000 0.5833 0.5833 0.6667 1.0000 0.6667 0.6667 0.7500 1.0000 0.7500 0.7500 0.8333 1.0000 0.8333 0.8333 0.9167 1.0000 0.9167 0.9167 1.0000 1.0000 1.0000 1.0000 fem2d_poisson_rectangle(): Wrote an ASCII solution file "rectangle_solution.txt" of the form U( X(I), Y(I) ) which can be used for plotting. fem2d_poisson_rectangle(): Normal end of execution. 17 September 2021 9:31:15.158 AM