hydromodpy.solver.boussinesq.runtimes.petsc_vi.vi#

VI orchestration: substeps, diagnostics records, top-level PETSc SNESVI solve.

Functions

attempt_diagnostic_record(*, attempt_index, ...)

Return one compact diagnostic record for a fixed-substep attempt.

dry_equilibrium_result(*, mesh, ...)

Build a steady RuntimeSolveResult for a detected dry VI equilibrium.

normalize_substep_count(value, *, label)

Return a positive substep count.

period_substep_diagnostics(*, final_result, ...)

Return period-level diagnostics, preserving final SNESVI diagnostics.

restored_transient_failure_result(*, inputs, ...)

Return a failed period result restored to the period-start head.

solve_transient_vi_substep(*, inputs, ...)

Solve one Backward-Euler PETSc VI substep with period forcing held fixed.

solve_vi_obstacle_problem(*, assembly_for, ...)

Run one PETSc SNESVI solve on the bounded head-only residual.

solver_diagnostics(snes, *, ...)

Return summary diagnostics exported by the Boussinesq drivers.

substep_attempt_counts(*, ...)

Return the fixed/adaptive substep counts to try for one period.

substep_diagnostic_record(*, result, ...)

Return one JSON-friendly diagnostic record for a substep solve.

sum_attempt_iterations(attempts)

Return the total nonlinear iterations across attempt records.

sum_attempt_ksp_iterations(attempts)

Return the total linear iterations across attempt records.

sum_optional_float(records, key)

Return the sum of nullable float values in substep records.

sum_substep_iterations(records)

Return the total nonlinear iterations across substep records.

sum_substep_ksp_iterations(records)

Return the total linear iterations across substep records.