IntermediateLinearContraction#

Source: models/common/IntermediateLinearContraction.py

Contract an operator with a field over the last intermediate dimension.

\[ \text{out}_i = \sum_j \text{operator}_{ij}\, \text{field}_j \]

operator is a two-dimensional intermediate quantity (sub_batch_ndim=2, rows x cols) and field is a one-dimensional field (sub_batch_ndim=1) whose length matches the column axis of operator. The output out is the field on the operator’s row axis. Linear in both operands, so the pushforward is the same contraction applied to each tangent. Reusable beyond any one physics.

Inputs#

operator — input · Scalar · required

Linear operator whose trailing intermediate axis is contracted (rows x cols).

field — input · Scalar · required

Field contracted against the operator’s column axis.

Outputs#

out — output · Scalar · required

Contraction result over the operator’s row axis.