A finite-element method based on the streamline-upwind/Petrov–Galerkin stabilization technique is developed to solve the compressible Euler equations. The method is extended for computing unsteady small disturbances in the flow domain as a result of boundary motion, which is applied through the linearized solid-wall boundary condition. The method is able to calculate the frequency-dependent generalized aerodynamic forces without any need for deformation of mesh inside the flow domain. Error estimates are used to drive automated -refinement of mesh for steady-state and frequency-domain calculations. Steady-state solutions and generalized aerodynamic forces are compared to benchmark data for transonic and supersonic Mach numbers. The results show that the presence of shocks in the flow makes it difficult to use a single mesh for all computations, including the linearized flow. The -refinement procedure is shown to be an effective way of ensuring reliable computations for the nonlinear and linearized solvers. Some associated challenges with the refinement procedure are also highlighted.