| Parallel Scientific Computing in C++ and MPI : A Seamless Approach to Parallel Algorithms and their Implementation - Sample Code Ch. 9 |
|
Page 10 of 12
Chapter 9 OverviewBook Chapter IntroductionWe have already discussed how to solve tridiagonal linear systems of equations using direct solvers (the Thomas algorithm) in chapter 6 and some iterative solvers (Jacobi, Gauss-Seidel, SOR and multigrid) in chapter 7. We have also discussed solutions of nonlinear and linear systems and have introduced the conjugate gradient method in chapter 4. In the current chapter we revisit this subject and present general algorithms for the direct and iterative solution of large linear systems. We start with the classical Gaussian elimination (which is a fast solver!) and then proceed with more sophisticated solvers and preconditioners for symmetric and non-symmetric systems. In parallel computing, we introduce the broadcasting command MPI_Bcast, and demonstrate its usefulness in the context of Gaussian elimination. In addition, we reiterate the use of MPI_Send, MPI_Recv, MPI_Allgather, and MPI_Allreduce through example implementations of algorithms presented in this chapter. SCchapter9 Introduction and Chapter 9 Driver ProgramsWithin the text, there are several places where the software suite is referenced. In some cases the code is explicitly placed within the text, and at other times within the text we merely alert you that the software is available on this CD. As you read through Chapter 9, you will find that the following function/classes were discussed.
The declarations and definitions of these functions/classes can be found in the following files: Go to the file SCchapter9.h for function/class declarations In the case that an entire program (meaning that a main() function is provided) is presented in the text, we classify this as a driver program. Unlike the functions/classes above, driver programs are complete C++ programs which can be compiled and executed. As you read through the book, you will see that driver programs are often times created by using functions/classes which are in the SCchapter files. We denote driver programs which are explicitly given in the text of the book in red. In some chapters, we present very few driver programs explicitly in the text, however we provide some example driver programs which demonstrate how to use the functions/classes with in SCchapter files. Such driver programs are denoted in black.
|