On Tue, Sep 6, 2016 at 6:58 AM, Krishna <krishnaku...@imperial.ac.uk> wrote: > > Since python to be a very distributed ecosystem, this question for some kind > of a starter code, may not fit well in a general/computational math > stackexchange post , nor in this mailing list. fipy's details are certainly > required to implement an Aitken type dynamic under relaxation. , I.e. one > needs access to the internal and residual matrices, in order to apply text > book formulae, and then split the relaxation vectors into individual scalars > for use in the 'underrelaxation' parameter for each sweep method. The first > two sweeps must be static/initial 'underrelaxation' so that we can apply the > formula.
I see. Here is an example of doing Newton iterations in FiPy https://gist.github.com/guyer/f29c759fd7f0f01363b8483c7bc644cb It uses the ResidualTerm. If you look at that code, it uses the justResidualVector, which gives the residual vector. You can also get access to the matrix and b vector separately. For the under relaxation, I don't think it's possible to apply it as a vector that's different for each equation. There is probably some way to do it akin to what's happening in the ResidualTerm. -- Daniel Wheeler _______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]