A new Petrov–Galerkin (PG) method involving two parameters, namely α1 and α2, is presented, which yields the following schemes on rectangular meshes: (i) a compact stencil obtained by the linear interpolation of the Galerkin FEM and the classical central finite difference method (FDM), should the parameters be equal, that is, a 1 = a 2 = a ; and (ii) the nonstandard compact stencil presented in (Int. J. Numer. Meth. Engng 2011; 86:18–46) for the Helmholtz equation if the parameters are distinct, that is, α1 ≠ α2. The nonstandard compact stencil is obtained by taking the linear interpolation of the diffusive terms (specified by α1) and the mass terms (specified by α2) that appear in the stencils obtained by the standard Galerkin FEM and the classical central FDM, respectively. On square meshes, these two schemes were shown to provide solutions to the Helmholtz equation that have a dispersion accuracy of fourth and sixth order, respectively (Int. J. Numer. Meth. Engng 2011; 86:18–46). The objective of this paper is to study the performance of this PG method for the Helmholtz equation using nonuniform meshes and the treatment of natural boundary conditions.