On Oct 12, 2012, at 5:17 PM, Kris Kuhlman wrote: > On Fri, Oct 12, 2012 at 9:03 AM, Jonathan Guyer <[email protected]> wrote: >> The script below illustrates the way I would do this. >> >> Note that it crashes once h == hs because C is then zero and the >> DiffusionTerm gets an infinite coefficient. > Multiplying the equation >> through by C does not work for some reason; Wheeler might know why. > > Thanks! That certainly is simpler. I had seen something like that > approach in the archives of the mailing list, but without the > conditions incorporated. I was confused by the rules or convention > that FiPy uses to do lazy evaluation of expressions - allowing > functional dependence. I guess I assumed it also handled functions > lazily.
var.setValue() (or var.value as we now recommend) changes the existing values of a pre-declared FiPy Variable. var = m * x + b creates a new object representing a functional relationship. A pre-declared FiPy Variable cannot become a functional relationship; it has a value and that value can be manually changed, but it is otherwise static. _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
