13.07.2014 Views

Madagascar Programming Reference Manual

Madagascar Programming Reference Manual

Madagascar Programming Reference Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.3. EXPLANATION OF THE CODE 21<br />

discussed above, with the common coefficients factored out. Note that the loops for<br />

x and z start two units after 0 and end two units before nx and nz. This is because<br />

to evaluate the Laplacian at a particular point (x, z) the farthest values which we<br />

are using are two units behind and two units ahead of the current point (x, z) if we<br />

include the points iz=0,1 ; iz=nz-1, nz and ix=0,1;ix=nx-1,nx we will run out<br />

of bounds. To fill these we will need a boundary condition which we will get from<br />

the next loop for inserting the wavelet.<br />

78-83: 78 /* inject wavelet */<br />

79 for (iz=0; iz

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!