# Implementing the Newton Method per hand

**URL:** <https://fenicsproject.discourse.group/t/implementing-the-newton-method-per-hand/1266>\
**Category:** Linear Algebra\
**Created:** [August 4, 2019, 5:58pm UTC](https://fenicsproject.discourse.group/t/implementing-the-newton-method-per-hand/1266 "2019-08-04T17:58:17Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![nate](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/nate/32/17_2.png) [@nate](https://fenicsproject.discourse.group/u/nate)\
**Post date:** [August 22, 2019, 2:58pm UTC](https://fenicsproject.discourse.group/t/implementing-the-newton-method-per-hand/1266/4 "2019-08-22T14:58:14Z")

</div>

I know you’ve already gone through all this work, but why not just use the inbuilt `NewtonSolver` (or `PETScSNESSolver`) and attach the nullspace to the matrices using `petsc4py`?

See, for example, [here](https://fenicsproject.discourse.group/t/set-krylov-linear-solver-paramters-in-newton-solver/1070/3). You can attach the nullspaces at the `CustomSolver.solver_setup()` stage.

---

_[View the full topic](https://fenicsproject.discourse.group/t/implementing-the-newton-method-per-hand/1266)._
