Mostly cleaning, with addition of total field calculation.

The scalar field, f, is summed and used as a second check on
numerical stability.