  We propose an accurate and energy-stable parametric finite element method for
solving the sharp-interface continuum model of solid-state dewetting in
three-dimensional space. The model describes the motion of the film\slash vapor
interface with contact line migration and is governed by the surface diffusion
equation with proper boundary conditions at the contact line. We present a new
weak formulation for the problem, in which the interface and its contact line
are evolved simultaneously. By using piecewise linear elements in space and
backward Euler in time, we then discretize the weak formulation to obtain a
fully discretized parametric finite element approximation. The resulting
numerical method is shown to be well-posed and unconditionally energy-stable.
Furthermore, the numerical method is extended for solving the sharp interface
model of solid-state dewetting with anisotropic surface energies in the
Riemmanian metric form. Numerical results are reported to show the convergence
and efficiency of the proposed numerical method as well as the anisotropic
effects on the morphological evolution of thin films in solid-state dewetting.
