Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!cs.umn.edu!ariel.unm.edu!spectre.unm.edu!john From: john@spectre.unm.edu (John Prentice) Newsgroups: comp.lang.fortran Subject: Re: Need complex matrix solver for CM Message-ID: <1991Jun27.233111.958@ariel.unm.edu> Date: 27 Jun 91 23:31:11 GMT References: <1991Jun27.161918.10218@leland.Stanford.EDU> <1991Jun27.190724.26161@ariel.unm.edu> <7887@mace.cc.purdue.edu> Organization: Dept. of Math & Stat, University of New Mexico, Albuquerque Lines: 51 In article <7887@mace.cc.purdue.edu> bfp@mace.cc.purdue.edu (Bryan Putnam) writes: >In article <1991Jun27.190724.26161@ariel.unm.edu> john@spectre.unm.edu (John Prentice) writes: >>In article <1991Jun27.161918.10218@leland.Stanford.EDU> francis@hanauma.stanford.edu (Francis Muir) writes: >>>Re-write the code in REAL; it will probably illuminate. >> >>This is an amazingly presumptuous, not to mention useless, comment. If I > >That sounds like a perfectly good solution to me, although it makes the >linear system twice as large. If you need a High School math reminder: > >Ax=b ==> > >+ A(r) -A(i) + x(r) b(r) >| | = >+ A(i) A(r) + x(i) b(i) Thanks, but I know perfectly well how to convert a complex linear system to a real linear system. As I said before, there are reasons I don't wish to do so having to do with the structure of the matrix I am working with. If you really need an example of where one might not wish to convert a complex to a real linear system, consider a diagonally dominant banded complex matrix. Look at your real matrix above. Both the A(r) and A(i) block matrices will now be diagonally dominant and banded, but the big matrix will not be. By converting this to a real matrix, you lose both the diagonal domiance and you introduce off diagonal bands. Both make solving the system alot harder with anything but Gaussian elimination. My systems are order 10,000 to 100,000. You can't solve them with straight Gaussian elimination and expect to get the answers back anytime soon. That means you need iterative schemes and these often depend on the structure of the matrix such as the bandedness and diagonal dominance. One could construct schemes that would work with the real version of the matrix, but why do it if software exists to do the problem as is? It just makes the problem obscure. In my case, I am solving my system using an iterative scheme which at some point exploits the fact that my matrices have diagonal bands which are large compared to the rest of the matrix. I solve the smaller banded problem using Gaussian elimination as part of my iterative scheme. Reworking the algorithms and proving their convergence properties is not worth the effort if complex matrix solvers exist, as they in fact appear to do. What bugged me about the original comment was not the suggestion to convert to a real matrix, it was the comment "it will probably illuminate". In either case, my question has been answered, so perhaps we can let this particular discussion end. John -- John K. Prentice john@spectre.unm.edu (Internet) Computational Physics Group Amparo Corporation, Albuquerque, NM