Benchmark isolated and coupled gravity Schur refinements

This commit is contained in:
2026-09-17 16:23:13 -04:00
parent b18f41f88f
commit bc3c39dcfd
3 changed files with 125 additions and 11 deletions

View File

@@ -36,6 +36,8 @@ struct Options {
bool strategyProbe = false, positivityProbe = false, positivityCertificate = false;
bool preconditionerProbe = false;
std::string preconditionerVariant = "independent";
int schurCorrectionSweeps = 1;
double schurRelaxation = 0.5;
std::string strategy = "baseline";
double gravityTolerance = 1e-10;
int gravityIterations = 300, gravityRestart = 80;
@@ -99,6 +101,10 @@ Options Parse(int argc, char **argv) {
o.preconditionerProbe = true;
else if (a == "--preconditioner-variant")
o.preconditionerVariant = v();
else if (a == "--schur-sweeps")
o.schurCorrectionSweeps = std::stoi(v());
else if (a == "--schur-relaxation")
o.schurRelaxation = std::stod(v());
else if (a == "--pressure-probe")
o.pressureProbe = true;
else if (a == "--shape-curvature")
@@ -422,6 +428,7 @@ template <class Context> int RunContext(Context &context, const Options &o, cons
<< "\ngravity_iterations=" << o.gravityIterations << "\ngravity_restart=" << o.gravityRestart
<< "\npreconditioner_probe=" << o.preconditionerProbe
<< "\npreconditioner_variant=" << o.preconditionerVariant
<< "\nschur_correction_sweeps=" << o.schurCorrectionSweeps << "\nschur_relaxation=" << o.schurRelaxation
<< "\ncompiler=" << __VERSION__ << "\ncompiled=" << __DATE__ << ' ' << __TIME__ << '\n';
metadata.flush();
if (o.preconditionerProbe) {
@@ -442,7 +449,8 @@ template <class Context> int RunContext(Context &context, const Options &o, cons
metadata.flush();
experiment::plateau_diagnostics::BenchmarkPreconditioners(s, o.output,
{.variant = o.preconditionerVariant, .restart = o.restart,
.maximumIterations = o.maxLinear, .relativeTolerance = o.linearTolerance});
.maximumIterations = o.maxLinear, .relativeTolerance = o.linearTolerance,
.schurCorrectionSweeps = o.schurCorrectionSweeps, .schurRelaxation = o.schurRelaxation});
});
// A missed linear gate is a measured outcome, not failure to execute
// the experiment. The CSV retains both recurrence and true gate results.