![](https://assets.cambridge.org/97805218/17547/cover/9780521817547.jpg)
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
5 - Explicit Discretizations
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 consider explicit discretizations of space and time derivatives. In such discretizations we can express directly a derivative at one grid point in terms of function values at adjacent grid points (spatial discretizations) or in terms of previous time levels (temporal discretizations). This, in turn, implies that there is no implicit coupling, and thus no matrix inversion is involved; instead, only simple daxpy type operations are required.
The material in this chapter is relatively easy to program both on serial as well as on parallel computers. It is appropriate for demonstrating fundamental concepts of discretization and primary constructs of the C++ language and of the MPI library. Specifically, we will demonstrate the use of loops, arrays, functions, and passing functions to functions. In addition to presenting MPI_Send and MPI_Recv implementations for finite differences, we also introduce MPI_Sendrecv and MPI_Sendrecv_replace as alternative advanced MPI function calls for parallelizing finite differences discretizations.
EXPLICIT SPACE DISCRETIZATIONS
Basics
The formulation of derivatives based on function values on a set of points, which we call the grid, dates back to Euler in the beginning of the eighteenth century. However, advances have of course been made since then. In this section, we will formulate ways to compute first- and higher order derivatives of a function using discrete data points. The key idea is to use Taylor expansions at a subset of adjacent points of the grid, as shown in Figure 5.1.
- Type
- Chapter
- Information
- Parallel Scientific Computing in C++ and MPIA Seamless Approach to Parallel Algorithms and their Implementation, pp. 255 - 308Publisher: Cambridge University PressPrint publication year: 2003