Applications of the weighted average flux method to the shallow water equations