Git Product home page Git Product logo

dopri.jl's Introduction

This package is deprecated and will not be maintained anymore because all use cases are covered by the DifferentialEquations.jl ecosystem.

Dopri.jl

Build Status Build status Coverage Status

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

Install

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

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:

  • 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) = ...
  • f: f=dy/dt
  • t: Current step.
  • y: Current state vector.
solout!(told, t, y, contd) = ... 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.

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.

Passing Additional Parameters to User Functions

A closure can be used to pass additional parameters to the user functions, e.g.:

parameter = pi
tout, yout = dop853((f, t, y) -> F!(f, t, y, parameter), y0, tspan)

dopri.jl's People

Contributors

helgee avatar crbinz avatar staticfloat avatar tkelman avatar

Watchers

James Cloos avatar Mike Kretlow 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.