GithubHelp home page GithubHelp logo

yangdryang / rehuel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pakketeretet2/rehuel

0.0 0.0 0.0 955 KB

Rehuel is a simple C++11 library for solving ordinary differential equations with (implicit) Runge-Kutta methods.

License: Other

Makefile 2.49% C++ 87.03% TeX 9.86% Shell 0.62%

rehuel's Introduction

Rehuel

A simple C++11 library for solving ordinary differential equations.

Rehuel is a relatively simple C++11 library for solving ordinary differential equations. It is named after the Dutch mathematician Rehuel Lobatto.

The goals of the project are two-fold: On the one hand, we aim to provide a high quality solver for various kinds of methods that can be drag-and-dropped into other projects, similar to Matlab's ode45 and ode15s. On the other hand, the project also provides me with an interesting test bed for the various methods out there.

For a quick tutorial/guide, see the guide in \ref guide.md


Recommended solvers

Non-stiff:
DORMAND_PRINCE_54 (A good default explicit RK method (think ode45))
CASH_KARP_54 (Ditto, might be optimized later to "fail early" on moderately stiff systems)
Moderately stiff:
It depends really. Try DORMAND_PRINCE_54, and monitor your RAM. If you are running out of RAM and/or the solution takes forever, integrate over a shorter interval. If the solution still takes too long, try a stiff solver.
Very stiff:
RADAU_IIA_53 (this should probably be your default stiff solver)
RADAU_IIA_95 (if you need more strict tolerance or a lot of steps)
LOBATTO_IIIC_43 (similar to RADAU_IIA_53)
LOBATTO_IIIC_85 (similar to RADAU_IIA_85)

In examples/example_equations.cpp we provide a small driver program that can apply various methods to various problems so you can get a feel for the strengths and weaknesses of each method.


Building/installing

The library needs some compiling but a lot of it is defined in headers. The Makefile creates a shared library for linking from other projects.

Its only dependency is a C++11-capable compiler and the Armadillo library.

See examples/example_equations.cpp for code that applies the methods to some test problems. There are also some tests in the test/ directory. These directories both have their own Makefile.

You can use Doxygen to generate the source documentation.


Resources

Most of the design and choices are based on the following excellent resources by Ernst Hairer and Gerhard Wanner:

  • Stiff differential equations solved by Radau methods
  • Solving Ordinary Differential Equations I
  • Solving Ordinary Differential Equations II

rehuel's People

Contributors

pakketeretet2 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.