Detect if a form is self-adjoint (symmetric)
Implement algorithm to determine whether or not a bilinear form is self-adjoint (symmetric). Form compilers could exploit this information in code generation and could inform an assembler.
Pseudo-steps for such an algorithm could be:
def canonical_
return expression transformed to a truly canonical form, i.e. a representation that is completely unique
self_adjoint = True
for each integrand:
a = canonical_
b = canonical_
if not a == b:
break
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Medium
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Obsolete
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
- Martin Sandve Alnæs
Related branches
Related bugs
Sprints
Whiteboard
Note that a truly canonical form does not exist for the entire algebra supported by ufl, so some theoretical false negatives may be unavoidable.