Problem with LUSolver

Issue #492 resolved
Praveen C created an issue

LUSolver complains that matrix is not set even though it is. See attached code. It works with version 1.4 but not with 1.5

Comments (7)

  1. Miro Kuchta

    Hi, the code works if you first assemble the matrix and then construct the LUSolver solver.

    A = PETScMatrix()
    
    assemble(a, tensor=A)
    b = assemble(L)
    bc.apply(A,b)
    
    solver = LUSolver(A)
    
  2. Praveen C reporter

    Yes, but assembling after creating solver used to work before. If I am doing a time dependent problem, I want to create a LUSolver once and reuse it in each time step, making use of some optimizations like same_nonzero_pattern. My matrix changes in each time step but same sparsity pattern, so I wanted to take advantage of that. Has the behaviour been deliberately changed in the new versions, we have to assemble matrix before creating LUSolver ?

  3. Log in to comment