feat(nonlinear-static-newton-raphson): step 11 - equilibrium-projection-and-reference-gate
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user