R2Multiplication

Source: models/common/R2Multiplication.py

Multiplication of form A B, where \(A\) and \(B\) are second order tensors. A and B can be inverted and/or transposed per request.

Mirrors the C++ R2Multiplication model (include/neml2/models/common/R2Multiplication.h). The forward composes the (optionally inverted and/or transposed) operands via the R2 @ matmul. The pushforward applies the product rule to the matmul and, when an operand is inverted, the matrix-inverse differential identity \(d(X^-1) = -X^-1 dX X^-1\) – all expressed in typed R2 algebra, no Jacobian materialised.

Inputs

Ainput · R2 · required

Variable A

Binput · R2 · required

Variable B

Outputs

tooutput · R2 · required

The result of the multiplication

Other options

invert_Abool · default False

Whether to invert A

invert_Bbool · default False

Whether to invert B

transpose_Abool · default False

Whether to transpose A

transpose_Bbool · default False

Whether to transpose B