fixed NaN issue in C initialisation of jacobi solver