A generalized finite element method(GFEM) is presented for the calculation of incompressible flow in nozzle. Based on the theory of variable-domain variation, the adaptive condition of grid nodes is established for the purpose that nodes can be adjusted during calculation until the extreme value of the functional is reached, and both the optimum value of physical parameter and the optimal node positions can be obtained. The results of the calculation show that the GFEM is strict in theory, suitable in calculation, and is. an extension of finite element method to a more precised method with adaptive grids.