Skip to content

Gray-Scott Simulation demo repository for Professional Skills Durham University MISCADA Course 2023, group 12

Notifications You must be signed in to change notification settings

DanielWit/miscada-group-12

 
 

Repository files navigation

Gray-Scott Simulation C++ Implementation

Description

This repository contains a C++ implementation of the Gray-Scott reaction-diffusion model, including simulation and testing. The Gray-Scott model is a mathematical formulation that describes how the concentration of substances distributed in space changes under the influence of local chemical reactions and diffusion. This project allows users to input specific parameters to observe a variety of patterns produced by the model.

The model is described in the following figure.

gray scott model

The parameters required from the user are formatted as follows:

params

Building and Running the Project Locally

To build and run the project locally, use the following commands:

mkdir build && cd build
cmake ..
make all -j
./src/gs_main

Testing

The functionality of the simulation is continuously tested using Google Test. To run the tests locally, execute ctest command.

Continuous Integration/Continuous Deployment (CI/CD)

Our CI/CD pipeline uses GitHub Actions and consists of two parts. First, every commit on all branches triggers a 'build' job that checks the integrity of the code and verifies that all tests pass. If a commit is made to the main branch, GitHub Actions will automatically update the official Docker image of the project on DockerHub in 'docker' job.

Here is an example of a successful GitHub Actions run: image

Running the Project Using Docker

We recommend running our software using Docker as it integrates a Python script that generates a visually appealing simulation output. Follow the steps below:

1- Open a terminal and run the following command:

docker run -p 5050:5050 -it mmohhamadd/gray-scott-sim-cpp-with-tests

2- you will be prompted to input your arbitrary values for the problem parameters. If you don't provide any, the system will generate random ones for you. image

3- The C++ simulation will then start. This process may take a while.

4- Once the C++ simulation ends, the Python script will start creating an animation from the simulation outputs.

5- After the animation is created, an HTTP server will host the result. You can view the animation by visiting the following link in your web browser: http://localhost:5050/animation.gif

Enjoy the simulation! animation (2)

About

Gray-Scott Simulation demo repository for Professional Skills Durham University MISCADA Course 2023, group 12

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 60.1%
  • Shell 13.7%
  • Python 10.5%
  • CMake 8.1%
  • Dockerfile 7.6%