I have posted an implementation at https://gist.github.com/guyer/f29c759fd7f0f01363b8483c7bc644cb
I'm not sure the way that I determine the Jacobian expression is completely legitimate, but it seems to work. Please don't hesitate to ask any questions (or offer corrections!). > On May 11, 2016, at 4:57 PM, Guyer, Jonathan E. Dr. (Fed) > <[email protected]> wrote: > > I'm not sure I have anything posted publicly. I will put together a minimal > example. > >> On May 11, 2016, at 12:42 PM, Daniel Wheeler <[email protected]> >> wrote: >> >> Hi Kris, >> >> FiPy doesn't have an automated way to do Newton iterations. You can >> always construct your own Newton iteration scheme using the terms and >> equations as you would ordinarily, but then you have to do the >> variational derivatives and the coupling by hand. This also assumes >> that you are familiar with the Newton method. You can query an >> equation for its residual which then needs to be added to the Newton >> version of the equation. I think that means that each equation >> requires two implementations, the regular and the Newton. >> >> Regarding examples of using FiPy with Newton iterations, I don't >> believe that we have any examples in the source code although I do >> know that some people have used it in this way including Jon Guyer. He >> may have examples in Github somewhere that would help you get started, >> but I'll let him point you to them. >> >> Cheers, >> >> Daniel >> >> On Tue, May 10, 2016 at 9:31 AM, Kris Kuhlman >> <[email protected]> wrote: >>> I am interested in trying to use newton iterations, rather than simply >>> fixed-point iterations, to speed up the convergence of the non-linear >>> iterations in my fipy problem. >>> >>> I have found this mention of a term useful for newton iterations, >>> >>> http://www.ctcms.nist.gov/fipy/fipy/generated/fipy.terms.html#module-fipy.terms.residualTerm >>> >>> and I see this mention of an example using newton iterations >>> >>> https://github.com/usnistgov/fipy/wiki/ScharfetterGummel >>> >>> but I don't see the actual code it is talking about. Is there an example >>> available somewhere? >>> >>> Kris >>> >>> _______________________________________________ >>> fipy mailing list >>> [email protected] >>> http://www.ctcms.nist.gov/fipy >>> [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] >>> >> >> >> >> -- >> Daniel Wheeler >> _______________________________________________ >> fipy mailing list >> [email protected] >> http://www.ctcms.nist.gov/fipy >> [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > > > _______________________________________________ > fipy mailing list > [email protected] > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
