A general method for computational fluid dynamics with boundaries moving in any prescribed fashion, is presented. The method adapts the boundary fitted mesh to the changing spatial domain by deforming it and, when necessary due to grid quality requirements, regenerating it. Finite volumes are used for the discretisation of Navier-Stokes equations, the mesh is regenerated by the advancing front method and an elliptic differential equation, or an analytical expression, is used to compute the mesh motion. Results are presented for two model problems.