I have a system Ax = b, where B is a constant, but A keeps changing by small amounts in each iteration. I am using UMFPACK 5 to solve this linear system again as again as A changes. I can do the above in two ways:
- Compute the symbolic and numeric factorization of matrix A ONLY in the beginning, and use this numeric object for solving Ax = b in each iteration (of course in sparse matrix representation, Ax changes as A changes. Ap and Ai remain same).
- Compute the symbolic and numeric factorization of matrix A IN EACH iteration (i.e. a new numeric object as A changes) and use this new numeric object to solve Ax = b.
Which of the above ways is correct? I am getting completely different answers (as expected) for the above two procedures. Any help or comment is appreciated. Thanks.