Guide to Scientific Computing in C++

Front Cover
Springer Science & Business Media, Feb 15, 2012 - Computers - 250 pages

The computational demands of modern-day simulation software needed across a range of diverse scientific disciplines lead many programmers to choose to write their code in an object-oriented language such as C++.

This easy-to-read textbook/reference presents an essential guide to object-oriented C++ programming for scientific computing. With a practical focus on learning by example, the theory is supported by numerous exercises. Features of both the C++ language and standard libraries are highlighted via the development of classes of vectors and matrices, allowing demonstration of key concepts such as inheritance, encapsulation, operator overloading, templates, and exception handling. The text then explains how these classes can be adapted for parallel computing, before demonstrating how a flexible, extensible library can be written for the numerical solution of differential equations.

Topics and features: provides a specific focus on the application of C++ to scientific computing, including parallel computing using MPI; stresses the importance of a clear programming style to minimize the introduction of errors into code; presents a practical introduction to procedural programming in C++, covering variables, flow of control, input and output, pointers, functions, and reference variables; exhibits the efficacy of classes, highlighting the main features of object-orientation; examines more advanced C++ features, such as templates and exceptions; supplies useful tips and examples throughout the text, together with chapter-ending exercises, and code available to download from www.springer.com.

This clearly written textbook is a “must-read” for programmers of all levels of expertise. Basic familiarity with concepts such as operations between vectors and matrices, and the Newton-Raphson method for finding the roots of non-linear equations, would be an advantage, but extensive knowledge of the underlying mathematics is not assumed.

 

What people are saying - Write a review

We haven't found any reviews in the usual places.

Contents

Getting Started
1
Flow of Control
25
File Input and Output
43
Pointers
55
Blocks Functions and Reference Variables
65
An Introduction to Classes
87
Inheritance and Derived Classes
116
Templates
131
Developing Classes for Linear Algebra Calculations
151
An Introduction to Parallel Programming Using MPI
165
Designing ObjectOriented Numerical Libraries
192
Appendix A Linear Algebra
213
Appendix B Other Programming Constructs You Might Meet
224
Appendix C Solutions to Exercises
230
Further Reading
245
Index
246

Errors and Exceptions
141

Other editions - View all

Common terms and phrases

About the author (2012)

Dr Joe Pitt-Francis is a Senior Research Fellow at the Department of Computer Science and teaches Computer Science at Exeter College, the University of Oxford, UK.

Dr Jonathan Whiteley is a University Lecturer at the Department of Computer Science and Governing Body Fellow of Linacre College, the University of Oxford, UK.