summaryrefslogtreecommitdiff
path: root/stokes.hpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2021-11-12 16:41:14 +0100
committerJaron Kent-Dobias <jaron@kent-dobias.com>2021-11-12 16:41:14 +0100
commitc9cb8dd499c2b2648a78e63f2a0810451a69f8fd (patch)
tree49f58bf75970ac9b7270f5999a628286bef6f8ab /stokes.hpp
parent646dcb5b35afb2f7dbcdae59fe7280d2de91546c (diff)
downloadcode-c9cb8dd499c2b2648a78e63f2a0810451a69f8fd.tar.gz
code-c9cb8dd499c2b2648a78e63f2a0810451a69f8fd.tar.bz2
code-c9cb8dd499c2b2648a78e63f2a0810451a69f8fd.zip
Some tweaking of the Stokes finder, how the lines are recorded, and fewer executables.
Diffstat (limited to 'stokes.hpp')
-rw-r--r--stokes.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/stokes.hpp b/stokes.hpp
index 8c0c1fb..60a3f55 100644
--- a/stokes.hpp
+++ b/stokes.hpp
@@ -237,14 +237,14 @@ public:
newCost = cNew.totalCost(nt);
- δ *= 1.5;
+ δ *= 2;
}
std::cerr << newCost << " " << stepSize << " " << δ << std::endl;
gs = cNew.gs;
- return {δ / 1.5, stepSize};
+ return {δ / 2, stepSize};
}
void relaxNewton(unsigned nt, Real δ₀, Real ε, unsigned maxSteps) {
@@ -254,9 +254,9 @@ public:
while (stepSize > ε && steps < maxSteps) {
std::tie(δ, stepSize) = relaxStepNewton(nt, δ);
if (δ > 100) {
- nt++;
+ break;
}
- δ /= 2;
+ δ /= 3;
steps++;
}
}