GithubHelp home page GithubHelp logo

dopri.jl's Introduction

Dopri.jl

Build Status Coverage Status

Dopri.jl is a Julia wrapper for the DOPRI5 and DOP853 integrators by Ernst Hairer.

Install

Note: Windows is currently not supported.

You need to have either Gfortran or the Intel Fortran Compiler installed to be able to build the binary dependencies. Dopri.jl can then be installed through Julia's package manager.

Pkg.add("Dopri")

Usage

The API is modelled after that of ODE.jl.

tout, yout = dopri5(F!, y0, tspan; keywords...)
tout, yout = dop853(F!, y0, tspan; keywords...)

The only differences are the mutating user function F! (see below) and a few additional keyword arguments.

The following keyword arguments are supported:

  • params: A Julia object containing additional parameters that are passed to the user functions.
  • atol: Vector of absolute tolerances. Default: sqrt(eps()).
  • rtol: Vector of realtive tolerances. Default: 1e-6.
  • points
    • = :all: Output is given for each value in tspan and all intermediate solver steps.
    • = :specified: Output is given for each value in tspan.
    • = :last: Output is given for the final step only.
  • solout: User function that is called after every successfull integration step (see below).
  • dense: Vector of indices for which dense output shall be performed. Default: Dense output is provided for all components. Is also set automatically for points=:specified and points=:all.
  • verbose: Print messages from DOPRI5 and DOP853. Default: false.

User Functions

F!(f, t, y, params) = ...
  • f: f=dy/dt
  • t: Current step.
  • y: Current state vector.
  • params: User parameters (see above).
solout!(told, t, y, contd, params) = ... return dopricode[:nominal]

If the user supplies a solout function, it will be called after every successful integration step. Within solout the contd function can be used to approximate state vector components between the current and the preceding integration step via dense output.

  • told: Last step.
  • t: Current step.
  • y: Current state vector.
  • contd: yi = contd(i, t1) Get dense output yi for component i at t1 with told < t1 < t.
  • params: User parameters (see above).

solout must return one of the following return codes:

  • dopricode[:nominal]: If the integration shall continue nominally.
  • dopricode[:altered]: If numerical solution was altered in solout.
  • dopricode[:abort]: If the integration shall be stopped.

dopri.jl's People

Contributors

crbinz avatar helgee avatar

Watchers

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