Fix counters in pdesolver_non_smooth.c
Add write_iteration_info function
Fix output