Skip to content

GabrieleInvernizzi/wave_equation_2d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2D wave equation solver

The project is comprised of two executables, the serial and the parallel implementations. The parallel one is built on top of OpenMPI.

Build

Before trying to build the project ensure to have installed the following dependencies:

  • gcc
  • make
  • OpenMPI (5.0.1)

Next, to download and build the project run the following commands:

git clone https://github.com/GabrieleInvernizzi/wave_equation_2d.git
cd wave_equation_2d
make

This will create two executables in the ./bin directory:

  • wave_eq_s: the serial implementation
  • wave_eq_p: the parallel implementation

There are some make flags that can be setted to tailor compilation, for more info look at the Makefile.

Usage

The serial implementation can be run as any other program.

./wave_eq_s

The parallel implementation must be run as an OpenMPI parallel application, there are multiple ways to do so. The simplest one is by using mpirun.

mpirun -n 5 ./wave_eq_p

To know more about all the options that can be used with both implementations run them with the help flag.

./wave_eq_s --help

Next, the simulation file can be encoded as a video using the script sim2video.

pipenv run python3 ./sim2video.py ../out.sim

Example video

sin.forcing.mp4

Releases

No releases published

Packages

No packages published