A finite-element formulation of heating rate and skin friction on the basis of conservation laws