03.12.2012 Views

C++ for Scientists - Technische Universität Dresden

C++ for Scientists - Technische Universität Dresden

C++ for Scientists - Technische Universität Dresden

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.

270 CHAPTER 14. NUMERICAL EXERCISES<br />

}<br />

} ;<br />

athens::richardson( poisson scaled(), 0.5∗x, y, 1.e−8, 1000 ) ;<br />

int main() {<br />

typedef glas::dense vector v type ;<br />

v type x( 10 ) ;<br />

glas::random seed seed ;<br />

glas::random( x, seed ) ;<br />

double lambda ;<br />

athens::inverse iteration( solve(), x, 100, lambda ) ;<br />

std::cout ≪ ”lambda = ” ≪ lambda ≪ std::endl ;<br />

std::ofstream xf( ”x.out” ) ;<br />

<strong>for</strong> ( int i=0; i

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

Saved successfully!

Ooh no, something went wrong!