Supersampling method for efficient grid-based electronic structure calculations