[petsc-users] Finding NullSpaces of Jacobian and TransposeJacobian

Smith, Barry F. bsmith at mcs.anl.gov
Thu Apr 12 09:37:42 CDT 2018


   A few thoughts,


> On Apr 12, 2018, at 7:47 AM, Ali Berk Kahraman <aliberkkahraman at yahoo.com> wrote:
> 
> Dear All,
> 
> I am trying to solve a Poisson problem with a known source function with all Neumann BCs.

   If you are using finite elements then the matrix should be symmetric and hence its transpose nullspace is the same as the original matrix. 

   Presumably you want to know the transpose null space so you can remove it from the right hand side to get a consistent linear system? With 
GMRES you don't need to actually remove it from the right hand side. Just apply GMRES to the inconsistent system, what will happen, if you 
use a good preconditioner is that GMRES will converge to a solution that minimizes the residual. So the residual norm will not be zero but the solution to GMRES is a valid solution to the linear system. In fact the "left over" residual will be in the null space of the transpose; in your case it will be the null space (since it is one dimensional).

   Barry


> Hence, I know that my problem does not always have a solution, at those times it has a transpose nullspace of one vector. If I know that vector, I can inform petsc of its existence using a MatNullSpace object.
> 
> Currently, I am trying to find the nullspace vector by solving a linear system where TrJacobian*nullvec = e, but an arbitrary row of the TrJacobian (ith row) is replaced with all zeros except for the ith column, and every entry of e is 0 except for the ith entry which is 1. However, sometimes the KSP that solves this either does not converge, or even if it converges the nullvec it creates does not help with the original problem's ksp.
> 
> Is there a more reliable way to find the transpose nullspace of a matrix?
> 
> Best Regards,
> 
> Ali Berk Kahraman
> M.Sc. Student, Mechanical Eng.
> Bogazici Uni. Istanbul, Turkey
> 



More information about the petsc-users mailing list