Boussinesq Solver UML Diagrams#
Scope#
These diagrams document the software architecture of
hydromodpy.solver.boussinesq.
They are intentionally limited to four views:
package context;
core classes;
process-to-backend runtime sequence;
transient-step activity.
This is the right level for this package. The mathematical derivation already lives in the scientific notes, so the architecture documentation should focus on structure, responsibilities and handoff boundaries.
Simplification Review#
The current Boussinesq package is already much clearer than before:
the canonical Dirichlet concept is now prescribed boundary cells;
the active driver/runtime path now uses that prescribed-cell representation;
edge-based boundary diagnostics are rebuilt explicitly in
boundary_flux_reconstruction.pyinstead of driving the solve path;the method and engine taxonomy is explicit;
runtime state construction is centralized;
steady and transient orchestration have been extracted out of the main driver;
process-to-runtime normalization is extracted into
solver_contract.py;forcing resolution is now split into a stable facade plus specialized submodules;
shared boundary/ocean/drainage preparation is isolated in
drivers/forcing.py;the public assembly layer is now one facade over dedicated internal modules for inputs, fluxes, surface closures and residual builders;
the public semianalytic Jacobian layer is now one facade over dedicated internal modules for common helpers and sparse triplet builders;
runtime summary shaping and common runtime-result packaging are extracted into dedicated helpers;
the process-to-solver contract is explicit.
The main remaining simplification targets are:
keep the driver thin and avoid regrowing orchestration logic in
boussinesq.py;keep future cleanups focused on
assembly_residuals.py,assembly_fluxes.py,jacobian_operator_triplets.pyandjacobian_partition_triplets.py, which are now the main size hotspots;continue factoring small pieces of common runtime bookkeeping only when the resulting helper stays clearer than the duplicated code.
Diagram 1: Package Context#
Diagram 2: Core Classes#
Diagram 3: Process To Backend Sequence#
Diagram 4: Transient Step Activity#
Notes#
The canonical runtime path is now based on
prescribed_head_m_by_cell.The main orchestration split is now:
boussinesq.pyfor top-level coordination;drivers/steady.pyanddrivers/transient.pyfor solve execution;solver_contract.pyfor process-to-runtime normalization;runtime_summary.pyfor runtime-summary shaping;forcing_resolution.pyplusforcing/for process-to-array mapping;drivers/forcing.pyfor shared boundary and drainage preparation;jacobian/semianalytic.pyplus its internal triplet modules for the semianalytic linearization layer.
The diagrams deliberately separate:
hydrological problem definition;
method and formulation selection;
execution-engine selection;
nonlinear runtime execution;
export and diagnostics.