This project's objective was to write parallel numerical code in C+++ to solve a 2D reaction-diffusion problem, with the goal of maximal computational performance. These types of problems can be quite computationally expensive if there are phenomena covering a wide range of time-scales.
A variant of the Barkley model was considered
where
with
Central finite difference was used as the numerical differentiation method and forward (explicit) Euler for time integration. The system of PDEs above can then be written in discrete form as
The PDE was to be discretized on a
The initial condition of the
and Neumann boundary conditions were used on all boundaries.
The objective of the project was to minimize time-to-solution.
The code could have been parallelized with either MPI (message-passing paradigm) or OpenMP (memory-sharing paradigm), with the later being chosen after conducting preliminary tests. The Report elaborates on this choice, analyses the parallel scaling of the code for different test cases, describes optimizations made to the code and explains why LAPACK and BLAS were not used in this project.
An additional constraint was that: "code should be able to run on
The program was required to output the
Parameters | Case 1 | Case 2 | Case 3 | Case 4 |
---|---|---|---|---|
101 | 251 | 101 | 151 | |
101 | 251 | 101 | 81 | |
0.75 | 0.75 | 0.5 | 0.75 | |
0.06 | 0.06 | 0.1 | 0.0001 | |
50.0 | 13.0 | 50.0 | 12.5 | |
5.0 | 5.0 | 5.0 | 1.0 | |
0.0 | 0.0 | 0.0 | 0.01 |
with their solutions shown below (for
Usage of the program is documented on the Makefile. The desired time-step and total integration time must always be provided, while the remaining parameters will take by default the values of Case 1.
This project was developed as part of a coursework for AERO70011 - High Performance Computing taught by Dr. Chris Cantwell (Imperial College London - MEng Aeronautical Engineering).