A
André Roberge
In FiPy (a finite volume PDE solver), equations are "magically" set up as
eqX = TransientTerm() == ExplicitDiffusionTerm(coeff=D)
and solved via
eqX.solve(...)
How can eqX be anything than True or False?... This must be via a redefinition of "==" but I can't see how that is done. I did look at many of the source files, thinking that it must be via a redefinition of "__eq__" somewhere but with no luck. Any pointers would be appreciated.
eqX = TransientTerm() == ExplicitDiffusionTerm(coeff=D)
and solved via
eqX.solve(...)
How can eqX be anything than True or False?... This must be via a redefinition of "==" but I can't see how that is done. I did look at many of the source files, thinking that it must be via a redefinition of "__eq__" somewhere but with no luck. Any pointers would be appreciated.