Skip to content

Commit 199c4a2

Browse files
committed
Testing for v1.0.2 of SIAMFANLEquations.jl
1 parent 5d6d944 commit 199c4a2

11 files changed

+101
-779
lines changed

SIAMFANL.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@
678678
"file_extension": ".jl",
679679
"mimetype": "application/julia",
680680
"name": "julia",
681-
"version": "1.10.0"
681+
"version": "1.10.2"
682682
}
683683
},
684684
"nbformat": 4,

SIAMFANLCh1.ipynb

+3-5
Large diffs are not rendered by default.

SIAMFANLCh1s.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -2004,7 +2004,7 @@
20042004
"file_extension": ".jl",
20052005
"mimetype": "application/julia",
20062006
"name": "julia",
2007-
"version": "1.10.0"
2007+
"version": "1.10.2"
20082008
}
20092009
},
20102010
"nbformat": 4,

SIAMFANLCh2.ipynb

+16-16
Large diffs are not rendered by default.

SIAMFANLCh2s.ipynb

+29-702
Large diffs are not rendered by default.

SIAMFANLCh3.ipynb

+9-9
Large diffs are not rendered by default.

SIAMFANLCh3s.ipynb

+23-26
Original file line numberDiff line numberDiff line change
@@ -745,10 +745,10 @@
745745
" ────────────────────────────────────────────────────────────────────────────\n",
746746
"\n",
747747
"\u001b[1m Example for nsoli\u001b[22m\n",
748-
"\u001b[1m –––––––––––––––––––\u001b[22m\n",
748+
"\u001b[1m –––––––––––––––––\u001b[22m\n",
749749
"\n",
750750
"\u001b[1m Simple 2D problem.\u001b[22m\n",
751-
"\u001b[1m --------------------\u001b[22m\n",
751+
"\u001b[1m ------------------\u001b[22m\n",
752752
"\n",
753753
" You should get the same results as for nsol.jl because GMRES will solve the\n",
754754
" equation for the step exactly in two iterations. Finite difference Jacobians\n",
@@ -896,7 +896,7 @@
896896
" 1.55516e-04 1.84641e-03 1.84641e-03\n",
897897
" 1.33169e-06 1.82363e-04 1.82363e-04\n",
898898
" 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"
900900
]
901901
},
902902
"execution_count": 5,
@@ -945,11 +945,11 @@
945945
"output_type": "stream",
946946
"text": [
947947
"Shamanskii, n=5\n",
948-
" 94.777 ms (74 allocations: 739.66 KiB)\n",
948+
" 95.012 ms (75 allocations: 740.95 KiB)\n",
949949
"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",
951951
"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"
953953
]
954954
}
955955
],
@@ -983,9 +983,9 @@
983983
"output_type": "stream",
984984
"text": [
985985
"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",
987987
"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"
989989
]
990990
}
991991
],
@@ -1060,7 +1060,7 @@
10601060
"output_type": "stream",
10611061
"text": [
10621062
"nsol, sham=5\n",
1063-
" 3.571 ms (416 allocations: 6.29 MiB)\n"
1063+
" 3.631 ms (421 allocations: 6.30 MiB)\n"
10641064
]
10651065
}
10661066
],
@@ -1099,7 +1099,7 @@
10991099
"output_type": "stream",
11001100
"text": [
11011101
"nsoli, not preconditioned\n",
1102-
" 4.380 ms (3899 allocations: 986.98 KiB)\n"
1102+
" 3.645 ms (4259 allocations: 1004.08 KiB)\n"
11031103
]
11041104
}
11051105
],
@@ -1132,7 +1132,7 @@
11321132
"text": [
11331133
"nsoli, preconditioned, \n",
11341134
" 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"
11361136
]
11371137
}
11381138
],
@@ -1162,7 +1162,7 @@
11621162
"output_type": "stream",
11631163
"text": [
11641164
"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"
11661166
]
11671167
}
11681168
],
@@ -1193,7 +1193,7 @@
11931193
"text": [
11941194
"nsoli, preconditioned, \n",
11951195
" 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"
11971197
]
11981198
}
11991199
],
@@ -1225,7 +1225,7 @@
12251225
"text": [
12261226
"nsoli, left preconditioned, \n",
12271227
" 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"
12291229
]
12301230
}
12311231
],
@@ -1258,7 +1258,7 @@
12581258
"name": "stdout",
12591259
"output_type": "stream",
12601260
"text": [
1261-
" 2.438 ms (1634 allocations: 2.05 MiB)\n"
1261+
" 2.317 ms (1806 allocations: 2.06 MiB)\n"
12621262
]
12631263
}
12641264
],
@@ -1437,8 +1437,7 @@
14371437
"\n",
14381438
"julia> function PreCondBeam(v, x, bdata)\n",
14391439
" J = bdata.D2\n",
1440-
" ptv = J\u000b",
1441-
"\n",
1440+
" ptv = J\\v\n",
14421441
" end\n",
14431442
"PreCondBeam (generic function with 1 method)\n",
14441443
"\n",
@@ -1626,8 +1625,7 @@
16261625
"\n",
16271626
"julia> function PreCondBeam(v, x, bdata)\n",
16281627
" J = bdata.D2\n",
1629-
" ptv = J\u000b",
1630-
"\n",
1628+
" ptv = J\\v\n",
16311629
" end\n",
16321630
"PreCondBeam (generic function with 1 method)\n",
16331631
"\n",
@@ -1863,10 +1861,10 @@
18631861
" iteration + 1. So, for scalar equations, it's a row vector.\n",
18641862
"\n",
18651863
"\u001b[1m Example for ptcsol\u001b[22m\n",
1866-
"\u001b[1m ––––––––––––––––––––\u001b[22m\n",
1864+
"\u001b[1m ––––––––––––––––––\u001b[22m\n",
18671865
"\n",
18681866
"\u001b[1m The buckling beam problem.\u001b[22m\n",
1869-
"\u001b[1m ----------------------------\u001b[22m\n",
1867+
"\u001b[1m --------------------------\u001b[22m\n",
18701868
"\n",
18711869
" You'll need to use TestProblems for this to work. The preconditioner is a\n",
18721870
" solver for the high order term.\n",
@@ -1875,8 +1873,7 @@
18751873
"\u001b[36m \u001b[39m\n",
18761874
"\u001b[36m julia> function PreCondBeam(v, x, bdata)\u001b[39m\n",
18771875
"\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",
18801877
"\u001b[36m end\u001b[39m\n",
18811878
"\u001b[36m PreCondBeam (generic function with 1 method)\u001b[39m\n",
18821879
"\u001b[36m \u001b[39m\n",
@@ -1986,7 +1983,7 @@
19861983
"name": "stdout",
19871984
"output_type": "stream",
19881985
"text": [
1989-
" 575.041 μs (571 allocations: 2.75 MiB)\n"
1986+
" 517.959 μs (490 allocations: 2.47 MiB)\n"
19901987
]
19911988
}
19921989
],
@@ -2036,7 +2033,7 @@
20362033
"name": "stdout",
20372034
"output_type": "stream",
20382035
"text": [
2039-
" 1.847 ms (1891 allocations: 6.01 MiB)\n"
2036+
" 1.632 ms (1945 allocations: 6.11 MiB)\n"
20402037
]
20412038
}
20422039
],
@@ -2125,7 +2122,7 @@
21252122
"file_extension": ".jl",
21262123
"mimetype": "application/julia",
21272124
"name": "julia",
2128-
"version": "1.10.0"
2125+
"version": "1.10.2"
21292126
}
21302127
},
21312128
"nbformat": 4,

SIAMFANLCh4.ipynb

+2-2
Large diffs are not rendered by default.

SIAMFANLCh4s.ipynb

+12-12
Large diffs are not rendered by default.

SIAMFANLCh5.ipynb

+4-4
Large diffs are not rendered by default.

src/Chapter1/simpleptc.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fpsize=fsize(printlabel)
4646
figure(1)
4747
subplot(1,2,1)
4848
~printlabel || title("Figure 1.6 from print book")
49-
semilogy(pival,abs.(ptcerr),"k--",nival,abs.(newterr),"k-")
49+
semilogy(pival,abs.(ptcerr).+1.e-18,"k--",nival,abs.(newterr),"k-")
5050
PTClabel=L"$\Psi$TC"
5151
legend((PTClabel,"Newton"),fontsize=fpsize)
5252
xlabel("Iterations",fontsize=fpsize)

0 commit comments

Comments
 (0)