Add bounded coupled damping and prediction-based attempt selection

This commit is contained in:
2026-09-18 10:45:45 -04:00
parent 46249d0758
commit 422c46bcbf
11 changed files with 2296 additions and 101 deletions

View File

@@ -53,6 +53,25 @@ export namespace mean_field::solver::nonlinear {
}
};
struct BacktrackedCoupledCurvatureCorrection final {
CoupledTrialCorrectionOptions correction{};
int maximumAttemptsPerIteration{1};
BacktrackedCoupledStep search{};
NearAcceptanceCoupledAttempt attempt{};
void Validate() const {
correction.Validate();
search.Validate();
attempt.Validate();
if (maximumAttemptsPerIteration <= 0)
throw std::invalid_argument("A coupled trial policy requires a positive attempt budget.");
}
};
template <typename Candidate>
concept CoupledTrialNumerics = std::same_as<Candidate, CoupledCurvatureCorrection> ||
std::same_as<Candidate, BacktrackedCoupledCurvatureCorrection>;
template <typename Candidate>
concept EnthalpyNumerics = std::same_as<Candidate, SampledEnthalpy> ||
std::same_as<Candidate, PolynomialEnthalpy>;
@@ -64,7 +83,7 @@ export namespace mean_field::solver::nonlinear {
template <typename Candidate>
concept TrialPathNumerics = std::same_as<Candidate, UncorrectedTrial> ||
std::same_as<Candidate, CoupledCurvatureCorrection>;
CoupledTrialNumerics<Candidate>;
// Types select algorithms; tolerances and the mesh-dependent work sizes
// remain runtime data. Adding a strategy cannot silently change a model's