Puzzled by FiPy's use of "=="

André Roberge andre.roberge at gmail.com
Mon Mar 26 07:47:13 EDT 2012


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.



More information about the Python-list mailing list