This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

What is the definition of solve with nullspace

+4 votes

Given a matrix A and the vectors u and b and an orthonormal nullspace B. What does the following code actually solve?

solver = KrylovSolver()
solver.set_nullspace(B)
solver.solve(A, U, b)

I would have assumed it solves $$(1-B^TB)\;A\;x = (1-B^T B)\;b.$$ Is this correct or is the projector only applied to the left hand side, i.e. $$(1-B^TB)\;A\;x = b$$ and if so how do I project also the right hand side?

asked Jan 23, 2014 by monien FEniCS Novice (790 points)

1 Answer

+1 vote

The projection is handled by the underlying linear algebra library (i.e., PETSc). I believe that the projection is applied to the LHS only. You can use the DOLFIN class VectorSpaceBasis to modify $b$. See VectorSpaceBasis::orthogonalize.

answered Jan 28, 2014 by Garth N. Wells FEniCS Expert (35,930 points)
...