C++ for Scientific Computing (2021-22)
Main content blocks
- Lecturer: Profile: Joseph Pitt-Francis
Course information
Course Term: Trinity
Course Lecture Information: 16 lectures
Course Overview:
Producing almost any numerical software requires writing codes that manipulate matrices and vectors, making Matlab a natural choice as an introductory programming language for scientific computing. However, the ease of programming in Matlab comes at a cost: the codes take a relatively long time to execute; and the software is commercial. While the use of procedural languages such as Fortran and C will overcome these limitations, they do not allow the straightforward coding of operations between matrices and vectors permitted by Matlab. An alternative approach is to use an object-oriented language such as C++ , where vectors and matrices can be represented as classes. Writing subroutines for these classes that have the same syntax as employed by Matlab allows code developed in Matlab to be translated with minimal effort into C++ code. Such an approach combines the ease of development in the Matlab environment without the associated drawbacks.
Section outline
-
Here are the slides and practical exercises for the entire course.
I am not expecting you to complete all the exercises. Some of them are repetitive. I do have a schedule in mind which might help you to pace yourself through the lectures and exercises:
Suggested timetable Week Video lectures to watch Suggested practical exercises Wk 3 Lecture 1, Lecture 2, Lecture 3 Practical sheets 0 and 1 Wk 4 Lecture 4, Lecture 5, Lecture 6 Practical sheet 2 Wk 5 Lec 6A (on sharing), Lecture 7, Lecture 8, Lecture 9 Practical sheet 3 Wk 6 Lecture 10, Lecture 11, Lec 11A (debugging), Lecture 12, Lecture 13 Practical sheet 4 Wk 7 - "More practicals"