added copy() to diag and file tridiag_solve2 uses the TDMA approach