Book contents
- Frontmatter
- Contents
- Preface
- Acknowledgments
- 1 Scientific Computing and Simulation Science
- 2 Basic Concepts and Tools
- 3 Approximation
- 4 Roots and Integrals
- 5 Explicit Discretizations
- 6 Implicit Discretizations
- 7 Relaxation: Discretization and Solvers
- 8 Propagation: Numerical Diffusion and Dispersion
- 9 Fast Linear Solvers
- 10 Fast Eigensolvers
- A C++ Basics
- B MPI Basics
- Bibliography
- Index
4 - Roots and Integrals
Published online by Cambridge University Press: 05 October 2013
- Frontmatter
- Contents
- Preface
- Acknowledgments
- 1 Scientific Computing and Simulation Science
- 2 Basic Concepts and Tools
- 3 Approximation
- 4 Roots and Integrals
- 5 Explicit Discretizations
- 6 Implicit Discretizations
- 7 Relaxation: Discretization and Solvers
- 8 Propagation: Numerical Diffusion and Dispersion
- 9 Fast Linear Solvers
- 10 Fast Eigensolvers
- A C++ Basics
- B MPI Basics
- Bibliography
- Index
Summary
In this chapter we apply the approximation theory we presented in Chapter 3 to find solutions of linear and nonlinear equations and to perform integration of general functions. Both subjects are classical, but they serve as basic tools in scientific computing operations and in solving systems of ordinary and partial differential equations. With regard to root finding, we consider both scalar as well as systems of nonlinear equations. We present different versions of the Newton-Raphson method, the steepest descent method, and the conjugate gradient method (CGM); we will revisit the latter in Chapter 9. With regard to numerical integration we present some basic quadrature approaches, but we also consider advanced quadrature rules with singular integrands or in unbounded domains.
On the programming side, we first introduce the concept of passing a function to a function; in the previous chapter we were passing variables. This allows an easy implementation of recursion, which is so often encountered in scientific computing. We offer several C++ examples from root finding and numerical integration applications that make use of recursion, and we show an effective use of classes and overloaded operators. We also address parallel programming with emphasis on domain decomposition, specifically the concept of reduction operations. We introduce the MPI commands MPI_Reduce and MPI_Allreduce for accomplishing reduction operations among a collection of processes.
- Type
- Chapter
- Information
- Parallel Scientific Computing in C++ and MPIA Seamless Approach to Parallel Algorithms and their Implementation, pp. 188 - 254Publisher: Cambridge University PressPrint publication year: 2003