17.11.2012 Views

Numerical recipes

Numerical recipes

Numerical recipes

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

886 Chapter 19. Partial Differential Equations<br />

}<br />

jm1=jj-1;<br />

rstrct(itemp[jm1],itemp[jj],nf); RLh(�uh).<br />

rstrct(iu[jm1],iu[jj],nf); R�uh.<br />

lop(itau[jm1],iu[jm1],nf);<br />

LH(R�uh) stored temporarily in �τh.<br />

matsub(itau[jm1],itemp[jm1],itau[jm1],nf); Form �τh.<br />

if (jj == j)<br />

trerr=ALPHA*anorm2(itau[jm1],nf); Estimate truncation error τ.<br />

rstrct(irhs[jm1],irhs[jj],nf); fH.<br />

matadd(irhs[jm1],itau[jm1],irhs[jm1],nf); fH + �τh.<br />

}<br />

slvsm2(iu[1],irhs[1]); Bottom of V: Solve on coars-<br />

nf=3;<br />

est grid.<br />

for (jj=2;jj

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

Saved successfully!

Ooh no, something went wrong!