If you run this, you get an error raise SymbolicParsingError("Must build NCC matrices with same variables.") from here. It is complaining that vars does not match with self._ncc_vars. The latter are [v] as expected.
However, the issue seems to be that CartesianGradient is calling
here when trying to evaluate dx(curl(v)), which means that expression_matrices is called with vars=[curl(v)]. This means that vars doesn't match with self._ncc_vars yielding the above error. I'm not sure what is supposed to be occurring here, but I seem to remember having a similar issue in the past.
I think there's a problem with matrix construction involving the gradient of the curl of a vector in cartesian geometry. Here is a simple example:
If you run this, you get an error
raise SymbolicParsingError("Must build NCC matrices with same variables.")
from here. It is complaining thatvars
does not match withself._ncc_vars
. The latter are[v]
as expected.However, the issue seems to be that
CartesianGradient
is callinghere when trying to evaluate
dx(curl(v))
, which means thatexpression_matrices
is called withvars=[curl(v)]
. This means thatvars
doesn't match withself._ncc_vars
yielding the above error. I'm not sure what is supposed to be occurring here, but I seem to remember having a similar issue in the past.