On Oct 1, 2007, at 4:39 AM, Florian De Vuyst wrote:
I have a question about multiple Poisson problem solution with
different RHS.
When using the LU matrix factorization as linear solver, is it
possible
to factorize once for all the system matrix, then apply the LU
factorization to different RHS ?
This would be very interesting for performance improvement.
This is not presently possible. It would not be too difficult to
cache the matrix solve it with different RHS; you could do this by
calling eq._prepareLinearSystem() and then eq._solveLinearSystem()
using the same matrix but different RHS. However, since FiPy was
designed to handle general PDEs, it does not assume that the RHS can
come from only one source. You would need to build the RHS manually,
as there is presently no mechanism to do this without building the
matrix as well. For a simple source, it wouldn't be too hard; you
just need to get the cell scaling right. I believe it's just a matter
of multiplying the source by mesh.getCellVolumes(), but Daniel can
confirm.