Scalar wave equation solver