On Aug 27, 2009, at 1:46 PM, Ranjit Chacko wrote:
I figured out where the type error came from. Using the fft's
returned complex valued arrays. Everything works fine if I use an
operation that yields a real valued array.
Yes, that was going to be my suggestion. Unfortunately, even if you do
something like
conv = ConvolutionVariable(var)
eq = ... + conv * conv.conjugate()
(assuming that's physically appropriate) it still doesn't work because
`conv * conv.conjugate()` is still complex, just with zero imaginary
component everywhere, and things like the Viewers don't understand it
(the solvers probably don't either, but I haven't tested). Of course,
it's not that hard to define a RealVariable() object, but this is
something we should probably integrate in FiPy.