### energy minimization problems -- is there a conjugate gradient method?

For simpler expressions for the elastic energy density $W$, I am able to use the built-in nonlinear solver in FEniCS and it works fine:

```
Pi = W(x,y)*dx - inner(b,y)*dx
dPi = derivative(Pi, y, v)
ddPi = derivative(dPi, y, dy)
solve(dPi == 0, y, bcs=bc, J=ddPi,tol=tol,M=M)
```

For more complex expressions for $W$, the Newton method does not converge. The Newton method is "wasteful" in that it doesn't use the information that this is a minimization problem. I'm thinking of coding a simple steepest descent (gradient flow) to do this, i.e. I start with an initial guess and go downhill using artificial time-stepping. This would be robust in finding me a solution but could also be very inefficient if I'm in a narrow valley. Nonlinear conjugate gradient is likely the best method for this problem, but needs much more effort to code (with line searches and so on) -- at least with my level of knowledge of FEniCS. Also I would lose the automatic mesh adaptivity.

I wonder if anyone has suggestions on a good way to solve this. Thanks.

This is a very useful pointer and I'm looking further into it.