Add bounded coupled damping and prediction-based attempt selection
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user