feat(nonlinear-static-newton-raphson): step 11 - equilibrium-projection-and-reference-gate

This commit is contained in:
KOKO\Mimi
2026-08-28 09:22:33 +09:00
parent 65b56b1755
commit 6dbf1b2bcf
30 changed files with 13122 additions and 728 deletions
@@ -219,25 +219,25 @@ NewtonChannelDecision EvaluateResidualChannel(
const double numerator = InfinityNorm(input.free_residual, is_finite);
const double internal = InfinityNorm(input.free_internal, is_finite);
const double external = InfinityNorm(input.free_external, is_finite);
const double denominator = (std::max)(internal, external);
if (!is_finite) {
return {input.identity,
numerator,
denominator,
external,
NewtonConvergenceBranch::kZeroScale,
kNewtonZeroScaleThreshold,
unit,
false};
}
if (denominator == 0.0) {
if (external == 0.0) {
return {input.identity,
numerator,
denominator,
external,
NewtonConvergenceBranch::kZeroScale,
kNewtonZeroScaleThreshold,
unit,
numerator <= kNewtonZeroScaleThreshold};
}
const double denominator = (std::max)(internal, external);
return {input.identity,
numerator,
denominator,