do iDof = 1, (maxPolyDegree+1)2 write(,) 'Leg coeff ', iDof, ' has error: ', legVal(iDof) - legCoeffs(iDof) end do