26.08.2015 Views

nonsymmetric dynamics

ML 5.0 Smoothed Aggregation User's Guide - Trilinos - Sandia ...

ML 5.0 Smoothed Aggregation User's Guide - Trilinos - Sandia ...

SHOW MORE
SHOW LESS
  • No tags were found...

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

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

* Solve A k u = b (k is current grid level) */<br />

proc multilevel(A k , b, u, k)<br />

u = S 1 k (A k, b, u);<br />

if ( k ≠ Nlevel − 1)<br />

P k = determine interpolant( A k );<br />

ˆr = P T k (b − A ku) ;<br />

 k+1 = P T k A kP k ; v = 0;<br />

multilevel(Âk+1, ˆr, v, k + 1);<br />

u = u + P k v;<br />

u = S 2 k (A k, b, u);<br />

Figure 1: High level multigrid V cycle consisting of ‘Nlevel’ grids to solve (1), with A 0 = A.<br />

are approximate solvers corresponding to k steps of pre and post smoothing, respectively.<br />

These smoothers are discussed in Section 9. For now, it suffices to view them as basic iterative<br />

methods (e.g. Gauss-Seidel) which effectively smooth out the error associated with<br />

the current approximate solution. The P k ’s (interpolation operators that transfer solutions<br />

from coarse grids to finer grids) are the key ingredient that are determined automatically by<br />

the algebraic multigrid method 2 . For the purposes of this guide, it is important to understand<br />

that when the multigrid method is used, a hierarchy of grids, grid transfer operators<br />

(P k ), and coarse grid discretizations (A k ) are created. To complete the specification of the<br />

multigrid method, smoothers must be supplied on each level. There are several smoothers<br />

within ML or an iterative solver package can be used, or users can write their own smoother<br />

(see Section 9).<br />

4 Quick Start<br />

This section is intended for the impatient user. It’s assumed that you’ve already have a local<br />

copy of Trilinos 3 . Using the instructions here, your build of Trilinos will have the following<br />

libraries: AztecOO, Epetra, EpetraExt, Ifpack, Loca, ML, new package,<br />

NOX, Amesos and Teuchos.<br />

1. cd into the Trilinos directory.<br />

2. Make a build directory, e.g., mkdir sandbox.<br />

3. cd sandbox.<br />

4. Configure Trilinos:<br />

(a) ../configure --enable-teuchos --enable-amesos --enable-aztecoo --enable-epetra<br />

if you do not want to use MPI.<br />

(b) ../configure --enable-teuchos<br />

--enable-amesos --enable-aztecoo --enable-epetra --with-mpi-compilers=/usr/local<br />

(or wherever your MPI compilers are located) to use MPI.<br />

2 The P k ’s are usually determined as a preprocessing step and not computed within the iteration.<br />

3 Please refer to the Trilinos web page, trilinos.sandia.gov, to obtain a copy of Trilinos.<br />

8

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

Saved successfully!

Ooh no, something went wrong!