Finished the code to support augmented state in the error norm calculation.