Free-surface flow simulations for moored and floating offshore platforms