output energy error in iterative solver