jdriordan / diffy-solver

A template program to solve a 1-D differential equation in C, and plot the result using matplotlib.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

diffy-solver

All this program does is solve a differential equation over a 1-D C array, and then animate the results using matplotlib via python. Included (via comments) are first and second order central finite difference methods, and some initial conditions. It has a simple wave equation with constant boundary conditions hardcoded.

Usage

Twiddle with the C program as appropriate and compile with:

gcc -Wall -O2 -std=c99 -lm reaction.c

and run with simply $ ./main.sh.

About

A template program to solve a 1-D differential equation in C, and plot the result using matplotlib.


Languages

Language:C 75.3%Language:Python 21.1%Language:Shell 3.5%