Add sparse_matrix and iterative_method code
Fix unsafe use of strncat reported by cppcheck
merge