Repository navigation
Commit a74e867
authored
feat: use the native solver of LoopStructural when it is installed (#148)
* feat: use the native solver of LoopStructural when it is installed
- New setting Solver: Native (the default) or Default. With Native, and
when loop-interpolation-core is installed, the interpolators get
solver='native'. Without the core, the plugin uses the default solver.
- The native solver also solves the inequality constraints, so ADMM is
not set for them when native is used.
- A feature that the native solver cannot solve (for example a fold or a
region mask) is built again with the default solver (cg, or ADMM for
inequalities). The plugin uses the default solver for that feature from
then on, and writes one log message.
* build: require LoopStructural[native] 1.11 and fix the pin bump workflow
- LoopStructural 1.11.0 allows loop-interpolation 0.2, which has the native
solver. Require LoopStructural[native]~=1.11.0 in the three requirement
files.
- The pin bump workflow read the key "LoopStructural" from the release
manifest, but the key of the root package is ".", so it always stopped.
It also did not update loopstructural/requirements.txt (the file that
qpip reads) and did not match a pin with an extra.
* feat: fall back to the default solver for each coordinate, not each feature
The coordinates 1 and 2 of a fault frame have orthogonal rows that the
native core cannot read, so all the faults used cg. Now the plugin finds
the coordinates that the core refuses (with the support check of
loop-interpolation), solves only those with the default solver, and keeps
native for the others. It records the coordinates, so the next build does
not try native for them again. If the check finds no coordinate, the full
feature uses the default solver, as before.
The tests for the ADMM solver of inequality rows now turn the native core
off, because with it the native solver solves the inequalities.
* fix: give the native solver the iteration limit of cg, and fall back when it does not converge
The native core stops after 5 000 iterations by default; cg allows 10 x the
number of nodes. On a large grid the native solve stopped before it
converged. loop-interpolation then keeps the old field, which had the size
of the old grid, so the surfaces failed ("cannot assign 51000 values to
array of shape 87232").
- Before each solve, give each native builder maxiter = 10 x its number of
nodes.
- After the build, a coordinate whose native solve did not converge is
solved again with the default solver, and uses it from then on. The
native limit is not given to the default solver.1 parent eb2e059 commit a74e867
12 files changed
Lines changed: 605 additions & 19 deletions
File tree
- .github/workflows
- loopstructural
- gui
- main
- toolbelt
- requirements
- tests
- qgis
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | | - | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
57 | | - | |
58 | | - | |
| 60 | + | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| 89 | + | |
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
| |||
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
| 106 | + | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
| |||
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
| 138 | + | |
| 139 | + | |
134 | 140 | | |
135 | 141 | | |
136 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
137 | 163 | | |
138 | 164 | | |
139 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
251 | 259 | | |
252 | 260 | | |
253 | 261 | | |
| |||
325 | 333 | | |
326 | 334 | | |
327 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
328 | 339 | | |
329 | 340 | | |
330 | 341 | | |
| |||
1015 | 1026 | | |
1016 | 1027 | | |
1017 | 1028 | | |
1018 | | - | |
| 1029 | + | |
1019 | 1030 | | |
1020 | 1031 | | |
1021 | 1032 | | |
1022 | 1033 | | |
1023 | 1034 | | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
1024 | 1140 | | |
1025 | 1141 | | |
1026 | 1142 | | |
| |||
1238 | 1354 | | |
1239 | 1355 | | |
1240 | 1356 | | |
1241 | | - | |
| 1357 | + | |
1242 | 1358 | | |
1243 | 1359 | | |
1244 | 1360 | | |
| |||
1941 | 2057 | | |
1942 | 2058 | | |
1943 | 2059 | | |
1944 | | - | |
| 2060 | + | |
1945 | 2061 | | |
1946 | 2062 | | |
1947 | 2063 | | |
| |||
2003 | 2119 | | |
2004 | 2120 | | |
2005 | 2121 | | |
2006 | | - | |
| 2122 | + | |
2007 | 2123 | | |
2008 | 2124 | | |
2009 | 2125 | | |
| |||
2020 | 2136 | | |
2021 | 2137 | | |
2022 | 2138 | | |
2023 | | - | |
| 2139 | + | |
2024 | 2140 | | |
2025 | 2141 | | |
2026 | 2142 | | |
| |||
2300 | 2416 | | |
2301 | 2417 | | |
2302 | 2418 | | |
2303 | | - | |
| 2419 | + | |
2304 | 2420 | | |
2305 | 2421 | | |
2306 | 2422 | | |
| |||
0 commit comments