hydromodpy.solver.boussinesq.runtimes.petsc_vi.obstacle#

Obstacle-specific math for the PETSc VI head-only formulation.

Functions

clip_head_to_bounds(head_m, *, lower, upper)

Return one initial head guess inside the PETSc variable bounds.

free_residual_norm(*, residual, head_m, ...)

Return the free-cell raw balance norm, excluding active obstacles.

obstacle_tolerance(tol_state_update_inf)

Return the tolerance used to classify active obstacle cells.

prescribed_head_cells(prescribed_head_m_by_cell)

Return the canonical prescribed-head cell vector, if provided.

projected_vi_residual(*, residual, head_m, ...)

Return the residual left after applying bound complementarity signs.

reconstruct_obstacle_reactions(*, mesh, ...)

Reconstruct non-negative obstacle reactions from the raw balance residual.