Embedded smoothed particle hydrodynamics