Architecture#

How the code is organized: the layers and their allowed imports, the packages, the storage layout and the subsystems. For a task, start from the recipes.

The foundations#

Mental model

How a TOML file becomes a stored run, why the boundaries are where they are, and the files to open first.

Mental model and design choices
Layered architecture

The import matrix, the rules the gate holds, and the rules a reviewer holds. The graph and the gate table are generated: Layer graph, Architecture gates.

Layered architecture
Packages

One page per top-level subpackage: its parts, its import rules, and where to add what.

Packages
Storage layout

Disk is the truth and the database is an index: the data classes, naming, atomic writes, retention.

Storage layout
Data scopes and schema evolution

The three databases, how their schemas move, and the canonical formats.

Data scopes and schema evolution
Contracts and design patterns

The public facade, the storage Protocols, the field registry, and the patterns the code reuses.

Contracts and design patterns
Pipeline resume

How an interrupted run restarts from the artifacts on disk.

Pipeline resume from artifacts

Engine notes#

What a developer of an engine needs and cannot read at a glance in the code.

Mesh engines

The mesh engines behind one port and the cell mesh every solver reads.

Mesh engines
Mesh pivot

The HydroMesh pivot and who reads it.

The mesh pivot and the cell mesh
Solver backends

MODFLOW 6, MODFLOW-NWT and Boussinesq, and the contracts of the MODFLOW family.

MODFLOW and Boussinesq backends
Boussinesq engines

The engines step by step, the experimental closures and the diagnostics of a run.

Boussinesq engines and experimental closures
From TOML to solver outputs

The path of a run with the objects named. The comparison of sealed runs follows.

From TOML to solver outputs
Calibration internals

The loop of a session and its classes.

Calibration internals
Processes and boundaries

The runtime objects Flow and Transport, and the flow boundary conditions.

Processes and boundaries
Stream network and spatial support

Supports, zones, hydrography, and the simulated active network.

Supports and the simulated network