You can as well multiply the functions and evaluate the product:
Code:
Emag = InnerProduct(E, n)
and then evaluate Emag at boundary points:
Code:
Emag_vals = Emag(mesh(*bnd_verts, BND)))
Note that the BND flag gives you a boundary mesh point, which is needed to evaluate the normal vector.
Best