shadowbourne / multicore-n-planet-simulator

3rd Year: 1st - 90. Vectorized and multicore n-body simulators written and extensively optimised in C++ for scalability to millions of particles/planets (using Euler method and Runge-Kutta 2).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

multicore-n-planet-simulator - Euler Method and Runge-Kutta 2

Submitted as part of the degree of Msci Natural Sciences (3rd year) to the Board of Examiners in the Department of Computer Sciences, Durham University. This summative assignment was assessed and marked by the professor of the module in question:

Grade: 1st - 90/100, 1st in year (of 78 students).

Vectorized and multicore n-body simulators written and extensively optimised in C++ for scalability to millions of particles/planets to be run on a single node of a supercomputer.

Demo video (taken from my portfolio page):

Gifdemo1

Vectorized and multicore n-body simulator(s) written and extensively optimised in C++ for scalability to millions of particles/planets to be run on a single node of a supercomputer.

Contents:

  • step-1.cpp contains the basic non-vectorized code for the n-body solver using the first-order Euler Method numerical time-stepping scheme (18/20).
  • step-2.cpp contains a vectorized version of step 1 for more efficient computation of for loops (20/20).
  • step-3.cpp upgrades the numerical scheme from steps 1 & 2 to a second order RK2 (Runge-Kutta 2) scheme. Step 3 is also then vectorized (16/20).
  • step-4.cpp takes Step 3 and parallelizes the code using OpenMP to run for-loops on multiple cores efficiently (16/20).
  • report.pdf contains an indepth analysis of the Strong Scalability and Convergence of the code and algorithms produced (20/20).

Collision Rules:

Rules

Analysis of Strong Scalability and Convergence of the code and algorithms produced (from report.pdf):

Report

About

3rd Year: 1st - 90. Vectorized and multicore n-body simulators written and extensively optimised in C++ for scalability to millions of particles/planets (using Euler method and Runge-Kutta 2).


Languages

Language:C++ 100.0%