Le Samedi 21 Octobre 2006 00:47, Bwalya Malama a écrit : > Hi: > > I am trying to solve the following using SuperLU: > > Ax = b (1) > > where the vector "b" changes as I match thru time but the matrix "A" is > fixed. Using "routines" from numerical recipies, I can solve (1) with "A" > factored into "L*U" only once. For different "b"'s I only call the > backsubstitution routine. My question is, can one do the same thing using > SuperLU? From what is in the gmm++ manual, it appears one has to decompose > "A" everytime (1) is solved for different "b"'s. Is that the case? Or is > it possible to decompose "A" only once, and using "LU" for subsequent > solutions?
Hi, Yes, you can decompose the matrix and store the decomposition. The gmm interface to SuperLU allows to declare an object SuperLU_factor<double> SLUf; The decomposition is made by the method SLUf.build_with(A); Where A is your sparse matrix. Then, you can solve the triangular systems using SLUf.solve(x, b); (You can also solve the transposed system using SLUf.solve(x, b, getfem::LU_TRANSP) and with complexes the conjugated system with SLUf.solve(x, b, getfem::LU_CONJUGATED) ). By the way, The Gmm interface to SuperLU is not complete at all. A lot of SuperLU fonctionalities are not interfaced. You can also take it as a model to build your own interfaces to the methods you need. Yves. ------------------------------------------------------------------------- Yves Renard ([EMAIL PROTECTED]) tel : (33) 04.72.43.80.11 Pole de Mathematiques, INSA de Lyon fax : (33) 04.72.43.85.29 Institut Camille Jordan - CNRS UMR 5208 20, rue Albert Einstein 69621 Villeurbanne Cedex, FRANCE http://math.univ-lyon1.fr/~renard ------------------------------------------------------------------------- _______________________________________________ Getfem-users mailing list [email protected] https://mail.gna.org/listinfo/getfem-users
