- marked as trivial
Detect if a form is self-adjoint (symmetric)
Issue #14
new
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_form(expression):
return expression transformed to a truly canonical form, i.e. a representation that is completely unique
self_adjoint = True
for each integrand:
a = canonical_form(integrand)
b = canonical_form(replace(integrand, {v:u}))
if not a == b:
self_adjoint = False
break
Note that a truly canonical form does not exist for the entire algebra supported by ufl, so some theoretical false negatives may be unavoidable.
Comments (1)
-
reporter - Log in to comment