FEM2D_LINEAR C++ version Solution of the Poisson equation: - Uxx - Uyy = F(x,y) inside the region, U(x,y) = G(x,y) on the boundary of the region. The region is a rectangle, defined by: 0 = XL<= X <= XR = 1 0 = YB<= Y <= YT = 1 The finite element method is used, with piecewise linear basis functions on 3 node triangular elements. The corner nodes of the triangles are generated by an underlying grid whose dimensions are NX = 17 NY = 17 Number of nodes = 289 Number of elements = 512 K I J X Y U U Error exact computed 0 1 1 0 0 0 0 0 1 2 1 0.0625 0 0.0625 0.0625 0 2 3 1 0.125 0 0.125 0.125 0 3 4 1 0.1875 0 0.1875 0.1875 0 4 5 1 0.25 0 0.25 0.25 0 5 6 1 0.3125 0 0.3125 0.3125 0 6 7 1 0.375 0 0.375 0.375 0 7 8 1 0.4375 0 0.4375 0.4375 0 8 9 1 0.5 0 0.5 0.5 0 9 10 1 0.5625 0 0.5625 0.5625 0 10 11 1 0.625 0 0.625 0.625 0 11 12 1 0.6875 0 0.6875 0.6875 0 12 13 1 0.75 0 0.75 0.75 0 13 14 1 0.8125 0 0.8125 0.8125 0 14 15 1 0.875 0 0.875 0.875 0 15 16 1 0.9375 0 0.9375 0.9375 0 16 17 1 1 0 1 1 0 17 1 2 0 0.0625 0 0 0 18 2 2 0.0625 0.0625 0.10056 0.100225 0.000335531 19 3 2 0.125 0.0625 0.199658 0.19911 0.000547596 20 4 2 0.1875 0.0625 0.295886 0.295206 0.000680795 21 5 2 0.25 0.0625 0.38795 0.387195 0.000754779 22 6 2 0.3125 0.0625 0.474712 0.473932 0.00077996 23 7 2 0.375 0.0625 0.55524 0.554477 0.000763232 24 8 2 0.4375 0.0625 0.628842 0.628131 0.000710359 25 9 2 0.5 0.0625 0.69509 0.694463 0.000627081 26 10 2 0.5625 0.0625 0.753842 0.753322 0.000519706 27 11 2 0.625 0.0625 0.80524 0.804844 0.000395463 28 12 2 0.6875 0.0625 0.849712 0.849449 0.000262838 29 13 2 0.75 0.0625 0.88795 0.887818 0.000132048 30 14 2 0.8125 0.0625 0.920886 0.92087 1.59809e-05 31 15 2 0.875 0.0625 0.949658 0.949725 6.76484e-05 32 16 2 0.9375 0.0625 0.97556 0.975651 9.08563e-05 33 17 2 1 0.0625 1 1 0 34 1 3 0 0.125 0 0 0 35 2 3 0.0625 0.125 0.137158 0.13661 0.000547596 36 3 3 0.125 0.125 0.271447 0.270515 0.000931863 37 4 3 0.1875 0.125 0.400108 0.398915 0.00119266 38 5 3 0.25 0.125 0.520598 0.519245 0.00135303 39 6 3 0.3125 0.125 0.63069 0.629262 0.0014272 40 7 3 0.375 0.125 0.728553 0.727128 0.0014254 41 8 3 0.4375 0.125 0.81283 0.811474 0.0013566 42 9 3 0.5 0.125 0.882683 0.881453 0.00123006 43 10 3 0.5625 0.125 0.93783 0.936774 0.00105626 44 11 3 0.625 0.125 0.978553 0.977706 0.00084746 45 12 3 0.6875 0.125 1.00569 1.00507 0.000618319 46 13 3 0.75 0.125 1.0206 1.02021 0.000386542 47 14 3 0.8125 0.125 1.02511 1.02493 0.000174117 48 15 3 0.875 0.125 1.02145 1.02144 9.58713e-06 49 16 3 0.9375 0.125 1.01216 1.01223 6.76484e-05 50 17 3 1 0.125 1 1 0 51 1 4 0 0.1875 0 0 0 52 2 4 0.0625 0.1875 0.170886 0.170206 0.000680795 53 3 4 0.125 0.1875 0.337608 0.336415 0.00119266 54 4 4 0.1875 0.1875 0.496158 0.494596 0.00156273 55 5 4 0.25 0.1875 0.642847 0.641038 0.00180932 56 6 4 0.3125 0.1875 0.77444 0.772495 0.00194507 57 7 4 0.375 0.1875 0.88828 0.8863 0.00197993 58 8 4 0.4375 0.1875 0.982395 0.980472 0.00192335 59 9 4 0.5 0.1875 1.05557 1.05378 0.00178578 60 10 4 0.5625 0.1875 1.1074 1.10582 0.00157957 61 11 4 0.625 0.1875 1.13828 1.13696 0.00131976 62 12 4 0.6875 0.1875 1.14944 1.14842 0.00102457 63 13 4 0.75 0.1875 1.14285 1.14213 0.000716148 64 14 4 0.8125 0.1875 1.12116 1.12074 0.000421518 65 15 4 0.875 0.1875 1.08761 1.08743 0.000174117 66 16 4 0.9375 0.1875 1.04589 1.04587 1.59809e-05 67 17 4 1 0.1875 1 1 0 68 1 5 0 0.25 0 0 0 69 2 5 0.0625 0.25 0.20045 0.199695 0.000754779 70 3 5 0.125 0.25 0.395598 0.394245 0.00135303 71 4 5 0.1875 0.25 0.580347 0.578538 0.00180932 72 5 5 0.25 0.25 0.75 0.747866 0.00213422 73 6 5 0.3125 0.25 0.900438 0.898102 0.00233563 74 7 5 0.375 0.25 1.02828 1.02586 0.0024205 75 8 5 0.4375 0.25 1.13102 1.12862 0.00239644 76 9 5 0.5 0.25 1.20711 1.20483 0.00227286 77 10 5 0.5625 0.25 1.25602 1.25396 0.00206194 78 11 5 0.625 0.25 1.27828 1.2765 0.0017792 79 12 5 0.6875 0.25 1.27544 1.27399 0.001444 80 13 5 0.75 0.25 1.25 1.24892 0.00108009 81 14 5 0.8125 0.25 1.20535 1.20463 0.000716148 82 15 5 0.875 0.25 1.1456 1.14521 0.000386542 83 16 5 0.9375 0.25 1.07545 1.07532 0.000132048 84 17 5 1 0.25 1 1 0 85 1 6 0 0.3125 0 0 0 86 2 6 0.0625 0.3125 0.224712 0.223932 0.00077996 87 3 6 0.125 0.3125 0.44319 0.441762 0.0014272 88 4 6 0.1875 0.3125 0.64944 0.647495 0.00194507 89 5 6 0.25 0.3125 0.837938 0.835602 0.00233563 90 6 6 0.3125 0.3125 1.00384 1.00124 0.00260048 91 7 6 0.375 0.3125 1.14318 1.14044 0.00274181 92 8 6 0.4375 0.3125 1.25299 1.25023 0.00276363 93 9 6 0.5 0.3125 1.33147 1.3288 0.0026726 94 10 6 0.5625 0.3125 1.37799 1.37551 0.00247887 95 11 6 0.625 0.3125 1.39318 1.39098 0.00219651 96 12 6 0.6875 0.3125 1.37884 1.377 0.0018439 97 13 6 0.75 0.3125 1.33794 1.33649 0.001444 98 14 6 0.8125 0.3125 1.27444 1.27342 0.00102457 99 15 6 0.875 0.3125 1.19319 1.19257 0.000618319 100 16 6 0.9375 0.3125 1.09971 1.09945 0.000262838 101 17 6 1 0.3125 1 1 0 102 1 7 0 0.375 0 0 0 103 2 7 0.0625 0.375 0.24274 0.241977 0.000763232 104 3 7 0.125 0.375 0.478553 0.477128 0.0014254 105 4 7 0.1875 0.375 0.70078 0.6988 0.00197993 106 5 7 0.25 0.375 0.903281 0.900861 0.0024205 107 6 7 0.3125 0.375 1.08068 1.07794 0.00274181 108 7 7 0.375 0.375 1.22855 1.22561 0.00294037 109 8 7 0.4375 0.375 1.34363 1.34061 0.00301542 110 9 7 0.5 0.375 1.42388 1.42091 0.00296964 111 10 7 0.5625 0.375 1.46863 1.46582 0.00280974 112 11 7 0.625 0.375 1.47855 1.47601 0.0025468 113 12 7 0.6875 0.375 1.45568 1.45348 0.00219651 114 13 7 0.75 0.375 1.40328 1.4015 0.0017792 115 14 7 0.8125 0.375 1.32578 1.32446 0.00131976 116 15 7 0.875 0.375 1.22855 1.22771 0.00084746 117 16 7 0.9375 0.375 1.11774 1.11734 0.000395463 118 17 7 1 0.375 1 1 0 119 1 8 0 0.4375 0 0 0 120 2 8 0.0625 0.4375 0.253842 0.253131 0.000710359 121 3 8 0.125 0.4375 0.50033 0.498974 0.0013566 122 4 8 0.1875 0.4375 0.732395 0.730472 0.00192335 123 5 8 0.25 0.4375 0.94352 0.941123 0.00239644 124 6 8 0.3125 0.4375 1.12799 1.12523 0.00276363 125 7 8 0.375 0.4375 1.28113 1.27811 0.00301542 126 8 8 0.4375 0.4375 1.39944 1.39629 0.00314575 127 9 8 0.5 0.4375 1.48079 1.47763 0.00315255 128 10 8 0.5625 0.4375 1.52444 1.5214 0.00303821 129 11 8 0.625 0.4375 1.53113 1.52832 0.00280974 130 12 8 0.6875 0.4375 1.50299 1.50051 0.00247887 131 13 8 0.75 0.4375 1.44352 1.44146 0.00206194 132 14 8 0.8125 0.4375 1.3574 1.35582 0.00157957 133 15 8 0.875 0.4375 1.25033 1.24927 0.00105626 134 16 8 0.9375 0.4375 1.12884 1.12832 0.000519706 135 17 8 1 0.4375 1 1 0 136 1 9 0 0.5 0 0 0 137 2 9 0.0625 0.5 0.25759 0.256963 0.000627081 138 3 9 0.125 0.5 0.507683 0.506453 0.00123006 139 4 9 0.1875 0.5 0.74307 0.741284 0.00178578 140 5 9 0.25 0.5 0.957107 0.954834 0.00227286 141 6 9 0.3125 0.5 1.14397 1.1413 0.0026726 142 7 9 0.375 0.5 1.29888 1.29591 0.00296964 143 8 9 0.4375 0.5 1.41829 1.41513 0.00315255 144 9 9 0.5 0.5 1.5 1.49679 0.00321431 145 10 9 0.5625 0.5 1.54329 1.54013 0.00315255 146 11 9 0.625 0.5 1.54888 1.54591 0.00296964 147 12 9 0.6875 0.5 1.51897 1.5163 0.0026726 148 13 9 0.75 0.5 1.45711 1.45483 0.00227286 149 14 9 0.8125 0.5 1.36807 1.36628 0.00178578 150 15 9 0.875 0.5 1.25768 1.25645 0.00123006 151 16 9 0.9375 0.5 1.13259 1.13196 0.000627081 152 17 9 1 0.5 1 1 0 153 1 10 0 0.5625 0 0 0 154 2 10 0.0625 0.5625 0.253842 0.253322 0.000519706 155 3 10 0.125 0.5625 0.50033 0.499274 0.00105626 156 4 10 0.1875 0.5625 0.732395 0.730816 0.00157957 157 5 10 0.25 0.5625 0.94352 0.941458 0.00206194 158 6 10 0.3125 0.5625 1.12799 1.12551 0.00247887 159 7 10 0.375 0.5625 1.28113 1.27832 0.00280974 160 8 10 0.4375 0.5625 1.39944 1.3964 0.00303821 161 9 10 0.5 0.5625 1.48079 1.47763 0.00315255 162 10 10 0.5625 0.5625 1.52444 1.52129 0.00314575 163 11 10 0.625 0.5625 1.53113 1.52811 0.00301542 164 12 10 0.6875 0.5625 1.50299 1.50023 0.00276363 165 13 10 0.75 0.5625 1.44352 1.44112 0.00239644 166 14 10 0.8125 0.5625 1.3574 1.35547 0.00192335 167 15 10 0.875 0.5625 1.25033 1.24897 0.0013566 168 16 10 0.9375 0.5625 1.12884 1.12813 0.000710359 169 17 10 1 0.5625 1 1 0 170 1 11 0 0.625 0 0 0 171 2 11 0.0625 0.625 0.24274 0.242344 0.000395463 172 3 11 0.125 0.625 0.478553 0.477706 0.00084746 173 4 11 0.1875 0.625 0.70078 0.69946 0.00131976 174 5 11 0.25 0.625 0.903281 0.901502 0.0017792 175 6 11 0.3125 0.625 1.08068 1.07848 0.00219651 176 7 11 0.375 0.625 1.22855 1.22601 0.0025468 177 8 11 0.4375 0.625 1.34363 1.34082 0.00280974 178 9 11 0.5 0.625 1.42388 1.42091 0.00296964 179 10 11 0.5625 0.625 1.46863 1.46561 0.00301542 180 11 11 0.625 0.625 1.47855 1.47561 0.00294037 181 12 11 0.6875 0.625 1.45568 1.45294 0.00274181 182 13 11 0.75 0.625 1.40328 1.40086 0.0024205 183 14 11 0.8125 0.625 1.32578 1.3238 0.00197993 184 15 11 0.875 0.625 1.22855 1.22713 0.0014254 185 16 11 0.9375 0.625 1.11774 1.11698 0.000763232 186 17 11 1 0.625 1 1 0 187 1 12 0 0.6875 0 0 0 188 2 12 0.0625 0.6875 0.224712 0.224449 0.000262838 189 3 12 0.125 0.6875 0.44319 0.442571 0.000618319 190 4 12 0.1875 0.6875 0.64944 0.648415 0.00102457 191 5 12 0.25 0.6875 0.837938 0.836494 0.001444 192 6 12 0.3125 0.6875 1.00384 1.002 0.0018439 193 7 12 0.375 0.6875 1.14318 1.14098 0.00219651 194 8 12 0.4375 0.6875 1.25299 1.25051 0.00247887 195 9 12 0.5 0.6875 1.33147 1.3288 0.0026726 196 10 12 0.5625 0.6875 1.37799 1.37523 0.00276363 197 11 12 0.625 0.6875 1.39318 1.39044 0.00274181 198 12 12 0.6875 0.6875 1.37884 1.37624 0.00260048 199 13 12 0.75 0.6875 1.33794 1.3356 0.00233563 200 14 12 0.8125 0.6875 1.27444 1.27249 0.00194507 201 15 12 0.875 0.6875 1.19319 1.19176 0.0014272 202 16 12 0.9375 0.6875 1.09971 1.09893 0.00077996 203 17 12 1 0.6875 1 1 0 204 1 13 0 0.75 0 0 0 205 2 13 0.0625 0.75 0.20045 0.200318 0.000132048 206 3 13 0.125 0.75 0.395598 0.395212 0.000386542 207 4 13 0.1875 0.75 0.580347 0.579631 0.000716148 208 5 13 0.25 0.75 0.75 0.74892 0.00108009 209 6 13 0.3125 0.75 0.900438 0.898994 0.001444 210 7 13 0.375 0.75 1.02828 1.0265 0.0017792 211 8 13 0.4375 0.75 1.13102 1.12896 0.00206194 212 9 13 0.5 0.75 1.20711 1.20483 0.00227286 213 10 13 0.5625 0.75 1.25602 1.25362 0.00239644 214 11 13 0.625 0.75 1.27828 1.27586 0.0024205 215 12 13 0.6875 0.75 1.27544 1.2731 0.00233563 216 13 13 0.75 0.75 1.25 1.24787 0.00213422 217 14 13 0.8125 0.75 1.20535 1.20354 0.00180932 218 15 13 0.875 0.75 1.1456 1.14425 0.00135303 219 16 13 0.9375 0.75 1.07545 1.07469 0.000754779 220 17 13 1 0.75 1 1 0 221 1 14 0 0.8125 0 0 0 222 2 14 0.0625 0.8125 0.170886 0.17087 1.59809e-05 223 3 14 0.125 0.8125 0.337608 0.337433 0.000174117 224 4 14 0.1875 0.8125 0.496158 0.495737 0.000421518 225 5 14 0.25 0.8125 0.642847 0.642131 0.000716148 226 6 14 0.3125 0.8125 0.77444 0.773415 0.00102457 227 7 14 0.375 0.8125 0.88828 0.88696 0.00131976 228 8 14 0.4375 0.8125 0.982395 0.980816 0.00157957 229 9 14 0.5 0.8125 1.05557 1.05378 0.00178578 230 10 14 0.5625 0.8125 1.1074 1.10547 0.00192335 231 11 14 0.625 0.8125 1.13828 1.1363 0.00197993 232 12 14 0.6875 0.8125 1.14944 1.14749 0.00194507 233 13 14 0.75 0.8125 1.14285 1.14104 0.00180932 234 14 14 0.8125 0.8125 1.12116 1.1196 0.00156273 235 15 14 0.875 0.8125 1.08761 1.08641 0.00119266 236 16 14 0.9375 0.8125 1.04589 1.04521 0.000680795 237 17 14 1 0.8125 1 1 0 238 1 15 0 0.875 0 0 0 239 2 15 0.0625 0.875 0.137158 0.137225 6.76484e-05 240 3 15 0.125 0.875 0.271447 0.271437 9.58713e-06 241 4 15 0.1875 0.875 0.400108 0.399933 0.000174117 242 5 15 0.25 0.875 0.520598 0.520212 0.000386542 243 6 15 0.3125 0.875 0.63069 0.630071 0.000618319 244 7 15 0.375 0.875 0.728553 0.727706 0.00084746 245 8 15 0.4375 0.875 0.81283 0.811774 0.00105626 246 9 15 0.5 0.875 0.882683 0.881453 0.00123006 247 10 15 0.5625 0.875 0.93783 0.936474 0.0013566 248 11 15 0.625 0.875 0.978553 0.977128 0.0014254 249 12 15 0.6875 0.875 1.00569 1.00426 0.0014272 250 13 15 0.75 0.875 1.0206 1.01925 0.00135303 251 14 15 0.8125 0.875 1.02511 1.02391 0.00119266 252 15 15 0.875 0.875 1.02145 1.02051 0.000931863 253 16 15 0.9375 0.875 1.01216 1.01161 0.000547596 254 17 15 1 0.875 1 1 0 255 1 16 0 0.9375 0 0 0 256 2 16 0.0625 0.9375 0.10056 0.100651 9.08563e-05 257 3 16 0.125 0.9375 0.199658 0.199725 6.76484e-05 258 4 16 0.1875 0.9375 0.295886 0.29587 1.59809e-05 259 5 16 0.25 0.9375 0.38795 0.387818 0.000132048 260 6 16 0.3125 0.9375 0.474712 0.474449 0.000262838 261 7 16 0.375 0.9375 0.55524 0.554844 0.000395463 262 8 16 0.4375 0.9375 0.628842 0.628322 0.000519706 263 9 16 0.5 0.9375 0.69509 0.694463 0.000627081 264 10 16 0.5625 0.9375 0.753842 0.753131 0.000710359 265 11 16 0.625 0.9375 0.80524 0.804477 0.000763232 266 12 16 0.6875 0.9375 0.849712 0.848932 0.00077996 267 13 16 0.75 0.9375 0.88795 0.887195 0.000754779 268 14 16 0.8125 0.9375 0.920886 0.920206 0.000680795 269 15 16 0.875 0.9375 0.949658 0.94911 0.000547596 270 16 16 0.9375 0.9375 0.97556 0.975225 0.000335531 271 17 16 1 0.9375 1 1 0 272 1 17 0 1 0 0 0 273 2 17 0.0625 1 0.0625 0.0625 0 274 3 17 0.125 1 0.125 0.125 0 275 4 17 0.1875 1 0.1875 0.1875 0 276 5 17 0.25 1 0.25 0.25 0 277 6 17 0.3125 1 0.3125 0.3125 0 278 7 17 0.375 1 0.375 0.375 0 279 8 17 0.4375 1 0.4375 0.4375 0 280 9 17 0.5 1 0.5 0.5 0 281 10 17 0.5625 1 0.5625 0.5625 0 282 11 17 0.625 1 0.625 0.625 0 283 12 17 0.6875 1 0.6875 0.6875 0 284 13 17 0.75 1 0.75 0.75 0 285 14 17 0.8125 1 0.8125 0.8125 0 286 15 17 0.875 1 0.875 0.875 0 287 16 17 0.9375 1 0.9375 0.9375 0 288 17 17 1 1 1 1 0 FEM2D_LINEAR: Normal end of execution.