If you are worried about performance, I cannot imagine that translating a solver from Fortran to Python would be advantageous. Wrapping a Fortran solver would not be too hard. Providing the FiPy API for such a solver would also not be tremendously difficult. These are not beginner tasks, though.
On Feb 9, 2014, at 10:58 AM, yuan wang <rose.w...@tufts.edu> wrote: > Hi Fipyers, > > I read in the documentation that there are three solvers for Fipy: PySparse, > SciPy, and Trilinos. Does any of the solvers use Thomas Algorithm for > tridiagonal matrix? The most efficient one seems to be PySparse, but it uses > LU factorization. In my situation, Thomas Algorithm will be more efficient. > > Also, how difficult will it be to implement my own solver with existing Fipy > code? I found a very efficient revised Thomas Algorithm written in Fortran > and thinking of translating it to Python and integrate it with Fipy, because > Fipy is very good in defining coefficient matrix. > > The main reason I am exploring other solvers is that I found the default > solver takes really long to solve. I have 14 pdes, it sweep to convergence in > 24 sweeps. It will take about 24s to converge. That's about 1s for each sweep > of 14 pdes. The Fortran code I was looking at would take only about 0.1s for > each sweep. > > I appreciate your help. > > Best regards, > Rose > > -- > Yuan (Rose) Wang > PhD Candidate, Tufts University > Cellphone: 617-699-8006 > _______________________________________________ > 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 ]