How to write the cofactor of a matrix

Hi!

Is there a short-hand way of defining the cofactor matrix of a matrix A? Do I need to import any special package in dolfin to do it?

It’s available in UFL Form language β€” Unified Form Language (UFL) 2019.2.0.dev0 documentation

Hi bleyerj! Thanks for your response. I have already tried that and FEniCS responded with the error message

 M = cofac (F)
NameError: name 'cofac' is not defined

from ufl import cofac

2 Likes

Thanks, that worked.