1. A method of executing an algorithm on a set of data comprising: reading an (m+2k) by (n+2k) array of data of the set of data from an external memory; storing the (m+2k) by (n+2k) array of data in a first on-chip memory; storing a (2k) by (n+2k) array portion of the (m+2k) by (n+2k) array of data in a second on-chip memory; executing k time steps of a time domain modeling algorithm on a first (m) by (n) array of data in the (m+2k) by (n+2k) array of data to generate a set of results; storing the set of results in the external memory; reading the (2k) by (n+2k) array portion of the (m+2k) by (n+2k) array of data from the second on-chip memory; storing the (2k) by (n+2k) array portion of the first subset of data in the first on-chip memory; reading an (m) by (n+2k) array of the set of data from the external memory; storing the (m) by (n+2k) array of data in the first on-chip memory; and executing k time steps of the time domain modeling algorithm on a second (m) by (n) array of data in the (2k) by (n+2k) array portion of the (m+2k) by (n+2k) array of data and the (m) by (n+2k) array of data, wherein the first (m) by (n) array of data and the second (m) by (n) array of data are contiguous arrays of data.