On Mon, May 5, 2025 at 3:52 AM MIGUEL MOLINOS PEREZ <mmoli...@us.es> wrote:
> Dear all, > > I am working on the resolution of a non-linear problem via SNES with a > large null-space (at least 70% of the equations are trivial). In a nutshell > I have a mesh with active and non-active nodes, and the non-active nodes > introduces the null-space. > > So far I've dealing with it using NGMRES but I want to use a scheme based > on NR. However, despite removing the null-space using PETSc's in-build > functions the linear solver (KSP+PC) diverges at the first iteration. > However, If I remove the non-active nodes and use the same solver > (SNES+KSP+PC), which failed before, now I can solve the non-linear system. > > Any clue? I’m missing something? > The most likely thing is that the nullspace is slightly wrong, or the convergence test is not accounting for the nullspace somehow. However, since so many equations are inactive, I would consider projecting the problem. I might either 1) Select a subset of the mesh to phrase the problem on. In you use DMPlex, you could use DMPlexFilter(). 2) Use a constraint to get a subsystem for Newton using SNESVI. The SNESVIRS will project the linear system onto a subspace without the constraints. Thanks, Matt > Thanks, > Miguel -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!bByLEARdv_XsY4xZu0ezoqCT2bh14450x43ffJDakWXMjru0Po-BcPS5TJl_mDXpjWZaJkliCDj07YjYyLjm$ <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!bByLEARdv_XsY4xZu0ezoqCT2bh14450x43ffJDakWXMjru0Po-BcPS5TJl_mDXpjWZaJkliCDj07TT0nwzb$ >