import type { XpbdIncrementalPotentialStepResultN } from './xpbd-incremental-potential-step.js'; /** Decision-ready condition classified from retained incremental-step evidence. */ export type XpbdIncrementalPotentialDiagnosisConditionN = 'progressed' | 'converged-without-iteration' | 'initial-state-refused' | 'iteration-limit' | 'line-search-exhausted' | 'line-search-refused' | 'direction-refused' | 'stalled' | 'application-refused'; /** * A legitimate caller-controlled response to one diagnosed condition. * * Levers are named, never applied. The classifier therefore cannot silently * change solver policy or turn a loud refusal into an apparent success. */ export type XpbdIncrementalPotentialDiagnosisLeverN = 'warm-start-previous-positions' | 'warm-start-feasible-inertial-prediction' | 'repair-initial-state' | 'newton-direction-policy' | 'mass-diagonal-policy' | 'raise-iteration-budget' | 'lower-gradient-tolerance' /** Lower the authored threshold of a non-packed-gradient stop test. */ | 'lower-convergence-tolerance' /** * Re-author the stop test in a unit that does not move with the timestep. * * Offered only under `'packed-gradient'`, where the threshold is on a * quantity carrying a `deltaTime²` factor and an immediate accept can mean * a real force fell below the solver's resolution rather than that the * scene is at rest. */ | 'timestep-independent-convergence' | 'inspect-blocking-filter' | 'inspect-application-evidence'; /** Pure diagnosis of one integrated incremental-potential step. */ export interface XpbdIncrementalPotentialDiagnosisN { /** Stable condition classified without thresholds or scene assumptions. */ readonly condition: XpbdIncrementalPotentialDiagnosisConditionN; /** Caller-controlled policies that legitimately address this condition. */ readonly levers: readonly XpbdIncrementalPotentialDiagnosisLeverN[]; /** Concise explanation suitable for a diagnostic panel or log. */ readonly summary: string; /** Scalar evidence used to choose the condition. */ readonly facts: Readonly>; } /** * Classify one step using only evidence already retained in its result. * * The function is deterministic, pure, and deliberately does not judge * scene intent. In particular, convergence at the initial point can mean * either genuine rest or an over-loose tolerance; it is surfaced as * `converged-without-iteration` for the caller to interpret. Gradient * tolerance is offered only there, and only as a request to lower it. */ export declare function diagnoseXpbdIncrementalPotentialStepN(result: XpbdIncrementalPotentialStepResultN): XpbdIncrementalPotentialDiagnosisN; //# sourceMappingURL=xpbd-incremental-potential-diagnosis.d.ts.map