Typed operator-first IR (pops.model)¶
The typed IR is the single internal contract the board facade (Physics authoring facade) and the operator-first builder (Operator modules) both lower to. It carries no numerics; it is the type layer the compiler checks and the codegen consumes.
Type |
Meaning |
|---|---|
|
a conservative state |
|
an auxiliary / solved-field space (e.g. |
|
the tangent of a state, values of |
|
a local linear operator type |
|
a matrix-free operator type for a Krylov solve |
|
a typed |
|
a named, typed operator in the registry |
|
the ordered, integer-id’d registry of operators |
|
a typed multi-output |
The operator kinds are local_rate, local_source, local_linear_operator,
field_operator, grid_operator, projection, diagnostic,
matrix_free_operator, local_nonlinear_residual, global_residual.
Lowering¶
The board facade builds exactly these objects (see Physics authoring facade for the full
map): m.state -> StateSpace, m.solve_field -> field_operator,
m.rate -> local_rate (output Rate(U)), m.local_linear_operator -> a LocalLinearOperatorExpr math object that m.operator(...) registers as a
local_linear_operator. A time program’s T.define / T.solve / T.fields lower to
P.call / P.linear_combine / P.solve_local_linear / P.solve_fields.
Program.dump_operator_ir() renders the operator-first IR a board program lowers to, and
Model.dump_module_ir() renders the typed Module a board model lowers to – so the
equivalence is inspectable, not assumed.