tridiagonal solver 2nd version, pcalc model