I don't see why it wouldn't work, but haven't put much thought into it. > On May 23, 2016, at 7:24 AM, Marcel UJI (IMAP) <a...@uji.es> wrote: > > Dear Guyer, > > Thank you for your wonderful example. I tried it in my own problem, and I > found much better convergence that simply sweeping the solution as suggested > in FiPy documentation. > > I also tried to figure how to extend your example to a "second order" Newton > iteration, but could not get anything useful (apart from the fact that we > would probably get a second order differential equation for \delta c). Do you > think is that feasible? > > Marcel > > El 13/05/16 a les 20:12, Guyer, Jonathan E. Dr. (Fed) ha escrit: >> 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) >>> <jonathan.gu...@nist.gov> >>> 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 <daniel.wheel...@gmail.com> >>>> 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 >>>> >>>> <kristopher.kuhl...@gmail.com> >>>> 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 >>>>> >>>>> fipy@nist.gov >>>>> http://www.ctcms.nist.gov/fipy >>>>> >>>>> [ NIST internal ONLY: >>>>> https://email.nist.gov/mailman/listinfo/fipy >>>>> ] >>>>> >>>>> >>>> >>>> >>>> -- >>>> Daniel Wheeler >>>> _______________________________________________ >>>> fipy mailing list >>>> >>>> fipy@nist.gov >>>> http://www.ctcms.nist.gov/fipy >>>> >>>> [ NIST internal ONLY: >>>> https://email.nist.gov/mailman/listinfo/fipy >>>> ] >>>> >>> >>> _______________________________________________ >>> fipy mailing list >>> >>> fipy@nist.gov >>> http://www.ctcms.nist.gov/fipy >>> >>> [ NIST internal ONLY: >>> https://email.nist.gov/mailman/listinfo/fipy >>> ] >>> >> >> _______________________________________________ >> fipy mailing list >> >> fipy@nist.gov >> http://www.ctcms.nist.gov/fipy >> >> [ NIST internal ONLY: >> https://email.nist.gov/mailman/listinfo/fipy >> ] >> > > -- > Dr. Marcel Aguilella-Arzo > Professor Titular d'Universitat, Física Aplicada > Coordinador de la Subcomissió d'Especialitat de Ciències Experimentals i > Tecnologia > del Màster Universitari en Professor d'Educació Secundària Obligatòria i > Batxillerat, > Formació Professional i Ensenyament d'Idiomes > Departament de Física > Escola Superior de Tecnologia i Ciències Experimentals > Universitat Jaume I > Av. Sos Baynat, s/n > 12071 Castelló de la Plana (Spain) > +34 964 728 046 > > a...@uji.es > _______________________________________________ > fipy mailing list > fipy@nist.gov > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
_______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]