A Wave Propagation Method for Conservation Laws and Balance Laws with Spatially Varying Flux Functions | Synapse