Fixed a bug in the linear minimization with PospQ.

It now runs but generates nan for potential and temperature.  Still bugs, but first time it runs without a runtime error.