A Smooth Particle Hydrodynamics Discretization for the Modelling of Free Surface Flows and Rigid Body Dynamics