Open
Description
They are all removed before code generation through renaming indices. Unfortunately this may cause some duplication in the generated code. One known case is the Jacobian inverse, but there may be others.
The UFL snippet for matrix inversion is to assemble the adjugate (ListTensor
), and then element-wise divide it by the determinant (ComponentTensor
). If the Jacobian inverse is applied several times, then the division step will happen several times due to the "inlining" of ComponentTensor
s. While this particular problem can be "fixed" by changing the UFL snippet, the same problem might arise in other cases as well.