Giter Club home page Giter Club logo

odepack's Introduction

ODEPACK

This is a Modern Fortran interface for the LSODA and LSODAR routines in ODEPACK, which is for solving ordinary differential equation initial value problems. This repository contains a modified version of ODEPACK which is threadsafe.

Example

For a simple example see test/test_lsoda.f90

Building

CMake

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
# run tests
./test/test_lsoda
./test/test_threadsafe
# run benchmark
./test/benchmark

Add as a dependency to your CMake projects with the CMake Package Manager

Fortran Package Manager

fpm build --profile release
fpm test --profile release

Documentation

The file src/odepack_mod.f90 contains extensive comments describing the use of the user-interfacing class lsoda_class.

Differences from original ODEPACK

  • This repository replaces common blocks with a passed derived type. This makes the code threadsafe.
  • The code now attempts to link to optimized linear algebra routines (e.g. OpenBLAS). If, e.g. OpenBLAS, is not found on the system, then compilation falls back on LAPACK routines downloaded from netlib. This replaces the old LINPACK routines that came with the original version of ODEPACK.
  • This repository changes the interface to the ODE right-hand-side subroutine, the jacobian and the root-finding subroutine, by adding a ierr argument. If ierr is set to less than 0 in these subroutines, then the integration is gracefully terminated.
  • Root-finding now indicates the direction of the root. See variable jroot in src/odepack_mod.f90
  • LSODA no longer prints fatal error messages. Error messages are stored in a string which the user can access and print if they like. See error_message in src/odepack_mod.f90.

odepack's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

odepack's Issues

Fail to build with fpm

When I used your code in December, there were no issues.
But when I try building it now, it fails with the following message:

.\.\src\lapack\dgbtrs.f:1:2:

    1 | *> \brief \b DGBTRS
      |  1
Error: Invalid character in name at (1)
compilation terminated due to -fmax-errors=1.
[  3%]                       dgbtrs.f  done.
.\.\src\lapack\dgbtf2.f:1:2:

...

Support for ZVODE

Hello!

Very nice effort you have here! I am looking for an interface for ZVODE. Is this something you are planning to have in the near future?

Thanks!

Eelis

add topics

I suggest adding the topics ode, odepack, ode-solver, fortran-package-manager in the About section.

typo

In the sentence "This is a Modern Fortran interface the LSODA and LSODAR routines in ODEPACK" there should be "for" after "interface".

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.