GithubHelp home page GithubHelp logo

gabrieleinvernizzi / wave_equation_2d Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 890 KB

2D wave equation solver

License: MIT License

Makefile 5.55% C 89.86% Python 4.59%
c-language openmpi wave-equation-solver

wave_equation_2d's Introduction

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

wave_equation_2d's People

Contributors

gabrieleinvernizzi avatar federoma01 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.