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

Pass a null space through a nonlinear solver

+1 vote

Hi all,
I'm trying to solve a nonlinear elasticity problem, and want to eliminate the rigid body modes. With a linear solver, I use solver.set_nullspace, but I don't see a way to pass it to a nonlinear solver (which would then pass it to the associated linear solver). Seems that I will have to make my own NL solver to be able to use it, or find a way to pass it directly to snes.

Did I miss an option or something? If not, I will create a dolfin issue about this.

Thanks

asked Jul 31, 2014 by mwelland FEniCS User (8,410 points)

1 Answer

+1 vote
 
Best answer

You did not miss anything. To do more low-level things one must go from NonlinearVariationalSolver to NewtonSolver. Check cahn-hilliard demo.

answered Aug 5, 2014 by Jan Blechta FEniCS Expert (51,420 points)
selected Aug 5, 2014 by mwelland

Thanks Jan, so I think I would have to create the linear solver (set the nullspace) and then pass it to the newton solver through the constructor. Is that correct?

This should work.

...