A Framework for Mesh Refinement Suitable for Finite-Volume and Discontinuous-Galerkin Schemes with Application to Multiphase Flow Prediction