Giter VIP home page Giter VIP logo

swerve's Introduction

Documentation Status

swerve

Shallow Water Equations for RelatiVistic Environments

swerve is a set of software designed to investigate the general relativistic form of the shallow water equations. The code is developed in the notebook Shallow_Water_Equations.ipynb, before being implemented in an optimized C++/CUDA version which runs on the GPU. MPI is used to run the code on multiple GPUs (if available).

Installation and usage

The CUDA version can be built using the Makefile and run using the parameters in the file input_file.txt. Before compiling, make sure that the variables CUDA_PATH and MPI_PATH at the top of the Makefile point to the correct locations of CUDA and MPI on your system. The code can then be compiled by executing make (or make debug to include debug flags).

To run on e.g. 2 GPU's/processors, execute

mpirun -np 2 ./gr_cuda

or to use the custom input file custom_input.txt,

mpirun -np 2 ./gr_cuda custom_input.txt

This code outputs into an HDF5 file which can be viewed using the notebook Plotting.ipynb (inadvisable except for very small files) or using the python script plot.py.

A version of the code which evolves a section of the domain using the compressible fluid equations on a finer grid can be compiled and run using make mesh and ./mesh.

Testing

A set of tests can be compiled by going to the main swerve directory and executing

make test

then a test case can be run:

cd testing
./flat

This test case provides initial data that is flat with a static gravitational field and no burning. It then tests that this data remains unchanged after being evolved through 100 timesteps.

Unit tests can be run by compiling the tests then running

cd testing
./unit_tests

This will run a set of tests on the majority of the individual functions used and output to screen whether each function tested has passed or failed.

swerve's People

Contributors

harpolea avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

hfmw01 lj-cug

swerve's Issues

Refactor so that CUDA processes only split in x, y directions

Given that:

  • the shallow water and compressible grids both have different numbers of points in the z direction,

  • the calculation of A when finding shallow water variables requires all points in the z direction,

  • all calculations in z direction can be / already are separated from those in the x,y directions,

it makes more sense that each CUDA process is at a point in (x,y) space, and loops over all points in the z direction.

Input file documentation

Write documentation about input files - both mesh_input.txt and the C++ file required to describe the initial data.

Automate documentation

Set up documentation to be automatically generated from docstrings using Doxygen / sphinx.

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.