|
745 | 745 | " ────────────────────────────────────────────────────────────────────────────\n",
|
746 | 746 | "\n",
|
747 | 747 | "\u001b[1m Example for nsoli\u001b[22m\n",
|
748 |
| - "\u001b[1m –––––––––––––––––––\u001b[22m\n", |
| 748 | + "\u001b[1m –––––––––––––––––\u001b[22m\n", |
749 | 749 | "\n",
|
750 | 750 | "\u001b[1m Simple 2D problem.\u001b[22m\n",
|
751 |
| - "\u001b[1m --------------------\u001b[22m\n", |
| 751 | + "\u001b[1m ------------------\u001b[22m\n", |
752 | 752 | "\n",
|
753 | 753 | " You should get the same results as for nsol.jl because GMRES will solve the\n",
|
754 | 754 | " equation for the step exactly in two iterations. Finite difference Jacobians\n",
|
|
896 | 896 | " 1.55516e-04 1.84641e-03 1.84641e-03\n",
|
897 | 897 | " 1.33169e-06 1.82363e-04 1.82363e-04\n",
|
898 | 898 | " 1.13965e-08 2.34291e-06 2.34291e-06\n",
|
899 |
| - " 9.75259e-11 2.42602e-11 2.42602e-11" |
| 899 | + " 9.75259e-11 2.42596e-11 2.42596e-11" |
900 | 900 | ]
|
901 | 901 | },
|
902 | 902 | "execution_count": 5,
|
|
945 | 945 | "output_type": "stream",
|
946 | 946 | "text": [
|
947 | 947 | "Shamanskii, n=5\n",
|
948 |
| - " 94.777 ms (74 allocations: 739.66 KiB)\n", |
| 948 | + " 95.012 ms (75 allocations: 740.95 KiB)\n", |
949 | 949 | "Newton-GMRES, fixed eta\n",
|
950 |
| - " 1.185 ms (303 allocations: 513.23 KiB)\n", |
| 950 | + " 1.040 ms (319 allocations: 513.47 KiB)\n", |
951 | 951 | "Newton-GMRES, Eisenstat-Walker\n",
|
952 |
| - " 1.187 ms (303 allocations: 513.23 KiB)\n" |
| 952 | + " 1.041 ms (319 allocations: 513.47 KiB)\n" |
953 | 953 | ]
|
954 | 954 | }
|
955 | 955 | ],
|
|
983 | 983 | "output_type": "stream",
|
984 | 984 | "text": [
|
985 | 985 | "Newton-GMRES, fixed eta\n",
|
986 |
| - " 1.228 ms (370 allocations: 509.06 KiB)\n", |
| 986 | + " 1.058 ms (385 allocations: 508.58 KiB)\n", |
987 | 987 | "Newton-GMRES, Eisenstat-Walker\n",
|
988 |
| - " 1.229 ms (370 allocations: 509.06 KiB)\n" |
| 988 | + " 1.056 ms (385 allocations: 508.58 KiB)\n" |
989 | 989 | ]
|
990 | 990 | }
|
991 | 991 | ],
|
|
1060 | 1060 | "output_type": "stream",
|
1061 | 1061 | "text": [
|
1062 | 1062 | "nsol, sham=5\n",
|
1063 |
| - " 3.571 ms (416 allocations: 6.29 MiB)\n" |
| 1063 | + " 3.631 ms (421 allocations: 6.30 MiB)\n" |
1064 | 1064 | ]
|
1065 | 1065 | }
|
1066 | 1066 | ],
|
|
1099 | 1099 | "output_type": "stream",
|
1100 | 1100 | "text": [
|
1101 | 1101 | "nsoli, not preconditioned\n",
|
1102 |
| - " 4.380 ms (3899 allocations: 986.98 KiB)\n" |
| 1102 | + " 3.645 ms (4259 allocations: 1004.08 KiB)\n" |
1103 | 1103 | ]
|
1104 | 1104 | }
|
1105 | 1105 | ],
|
|
1132 | 1132 | "text": [
|
1133 | 1133 | "nsoli, preconditioned, \n",
|
1134 | 1134 | " Eisenstat-Walker forcing term\n",
|
1135 |
| - " 1.377 ms (772 allocations: 653.78 KiB)\n" |
| 1135 | + " 1.334 ms (792 allocations: 654.31 KiB)\n" |
1136 | 1136 | ]
|
1137 | 1137 | }
|
1138 | 1138 | ],
|
|
1162 | 1162 | "output_type": "stream",
|
1163 | 1163 | "text": [
|
1164 | 1164 | "nsoli, preconditioned, fixed eta\n",
|
1165 |
| - " 1.729 ms (975 allocations: 927.78 KiB)\n" |
| 1165 | + " 1.684 ms (1007 allocations: 928.69 KiB)\n" |
1166 | 1166 | ]
|
1167 | 1167 | }
|
1168 | 1168 | ],
|
|
1193 | 1193 | "text": [
|
1194 | 1194 | "nsoli, preconditioned, \n",
|
1195 | 1195 | " Eisenstat-Walker forcing term\n",
|
1196 |
| - " 1.364 ms (792 allocations: 741.77 KiB)\n" |
| 1196 | + " 1.329 ms (816 allocations: 742.42 KiB)\n" |
1197 | 1197 | ]
|
1198 | 1198 | }
|
1199 | 1199 | ],
|
|
1225 | 1225 | "text": [
|
1226 | 1226 | "nsoli, left preconditioned, \n",
|
1227 | 1227 | " Eisenstat-Walker forcing term\n",
|
1228 |
| - " 1.555 ms (896 allocations: 747.52 KiB)\n" |
| 1228 | + " 1.396 ms (990 allocations: 751.45 KiB)\n" |
1229 | 1229 | ]
|
1230 | 1230 | }
|
1231 | 1231 | ],
|
|
1258 | 1258 | "name": "stdout",
|
1259 | 1259 | "output_type": "stream",
|
1260 | 1260 | "text": [
|
1261 |
| - " 2.438 ms (1634 allocations: 2.05 MiB)\n" |
| 1261 | + " 2.317 ms (1806 allocations: 2.06 MiB)\n" |
1262 | 1262 | ]
|
1263 | 1263 | }
|
1264 | 1264 | ],
|
|
1437 | 1437 | "\n",
|
1438 | 1438 | "julia> function PreCondBeam(v, x, bdata)\n",
|
1439 | 1439 | " J = bdata.D2\n",
|
1440 |
| - " ptv = J\u000b", |
1441 |
| - "\n", |
| 1440 | + " ptv = J\\v\n", |
1442 | 1441 | " end\n",
|
1443 | 1442 | "PreCondBeam (generic function with 1 method)\n",
|
1444 | 1443 | "\n",
|
|
1626 | 1625 | "\n",
|
1627 | 1626 | "julia> function PreCondBeam(v, x, bdata)\n",
|
1628 | 1627 | " J = bdata.D2\n",
|
1629 |
| - " ptv = J\u000b", |
1630 |
| - "\n", |
| 1628 | + " ptv = J\\v\n", |
1631 | 1629 | " end\n",
|
1632 | 1630 | "PreCondBeam (generic function with 1 method)\n",
|
1633 | 1631 | "\n",
|
|
1863 | 1861 | " iteration + 1. So, for scalar equations, it's a row vector.\n",
|
1864 | 1862 | "\n",
|
1865 | 1863 | "\u001b[1m Example for ptcsol\u001b[22m\n",
|
1866 |
| - "\u001b[1m ––––––––––––––––––––\u001b[22m\n", |
| 1864 | + "\u001b[1m ––––––––––––––––––\u001b[22m\n", |
1867 | 1865 | "\n",
|
1868 | 1866 | "\u001b[1m The buckling beam problem.\u001b[22m\n",
|
1869 |
| - "\u001b[1m ----------------------------\u001b[22m\n", |
| 1867 | + "\u001b[1m --------------------------\u001b[22m\n", |
1870 | 1868 | "\n",
|
1871 | 1869 | " You'll need to use TestProblems for this to work. The preconditioner is a\n",
|
1872 | 1870 | " solver for the high order term.\n",
|
|
1875 | 1873 | "\u001b[36m \u001b[39m\n",
|
1876 | 1874 | "\u001b[36m julia> function PreCondBeam(v, x, bdata)\u001b[39m\n",
|
1877 | 1875 | "\u001b[36m J = bdata.D2\u001b[39m\n",
|
1878 |
| - "\u001b[36m ptv = J\u000b", |
1879 |
| - "\u001b[39m\n", |
| 1876 | + "\u001b[36m ptv = J\\v\u001b[39m\n", |
1880 | 1877 | "\u001b[36m end\u001b[39m\n",
|
1881 | 1878 | "\u001b[36m PreCondBeam (generic function with 1 method)\u001b[39m\n",
|
1882 | 1879 | "\u001b[36m \u001b[39m\n",
|
|
1986 | 1983 | "name": "stdout",
|
1987 | 1984 | "output_type": "stream",
|
1988 | 1985 | "text": [
|
1989 |
| - " 575.041 μs (571 allocations: 2.75 MiB)\n" |
| 1986 | + " 517.959 μs (490 allocations: 2.47 MiB)\n" |
1990 | 1987 | ]
|
1991 | 1988 | }
|
1992 | 1989 | ],
|
|
2036 | 2033 | "name": "stdout",
|
2037 | 2034 | "output_type": "stream",
|
2038 | 2035 | "text": [
|
2039 |
| - " 1.847 ms (1891 allocations: 6.01 MiB)\n" |
| 2036 | + " 1.632 ms (1945 allocations: 6.11 MiB)\n" |
2040 | 2037 | ]
|
2041 | 2038 | }
|
2042 | 2039 | ],
|
|
2125 | 2122 | "file_extension": ".jl",
|
2126 | 2123 | "mimetype": "application/julia",
|
2127 | 2124 | "name": "julia",
|
2128 |
| - "version": "1.10.0" |
| 2125 | + "version": "1.10.2" |
2129 | 2126 | }
|
2130 | 2127 | },
|
2131 | 2128 | "nbformat": 4,
|
|
0 commit comments