You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ComponentTensors. While this particular problem can be "fixed" by changing the UFL snippet, the same problem might arise in other cases as well.
The text was updated successfully, but these errors were encountered:
I have introduced code generation of ComponentTensors by translating them into loopy in the branch translation-of-comptensors. Currently I am not doing any optimisations on the expressions which are translated from Slate to gem. I am unsure if I will still need ComponentTensor code generation after including the optimisations.
ComponentTensor does now have code generation via firedrakeproject/tsfc#203. However the optimisation that needs to be applied in the original description is not yet applied.
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" ofComponentTensor
s. While this particular problem can be "fixed" by changing the UFL snippet, the same problem might arise in other cases as well.The text was updated successfully, but these errors were encountered: