On Wed, Jul 10, 2013 at 2:36 PM, Noam Yorav-Raphael <[email protected]>wrote:
> Thanks! Now I managed to get the expected result. > > It took me some time to realize that since ρ is time-dependent I had to > use hasOld=True and updateOld(). I wonder if it's possible for fipy to > detect that the TransientTerm coefficient has changed and issue an > informative warning. > A TransientTerm could check that the variable it is solving does have "hasOld" set to "True", however, it is not strictly necessary for a CellVariable to have an old value if there are no sweeps in the time step. It probably would be a good requirement though and it certainly does no harm, other than using more memory. I created a ticket for this http://matforge.org/fipy/ticket/647. I've been caught by this quite a few times. Regarding updateOld, this is a lot harder because for any given inner iteration (or sweep), the equation has no idea of the latest count. The equation would have to know the iteration count in order to do the updateOld. Some atypical reset is always required at the start of a time step. The other alternative is to introduce time stepping objects (non-linear solvers), but we have resisted this up until now. I think we would go down this road if we wrapped Trilinos's NOX (non-linear solver package) for fipy or any other low level non-linear solver. I don't want to get into writing iterators, steppers or NL solvers myself if possible. -- Daniel Wheeler
_______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
