Skip to content

ComponentTensor has no code generation #3834

Open
@miklos1

Description

@miklos1

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions