Inverse heat-conduction problem by finite-element formulation