Giter Club home page Giter Club logo

numbaida's Introduction

build passing

MIT License


NumbaIDA




Report Bug Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Known Issues
  4. Contributing
  5. License
  6. Acknowledgments

About The Project

NumbaIDA is a Python package allowing you to quickly solve Differential Algebraic Equation (DAE) problems in Numba JIT compiled functions using the LLNL SUNDIALS IDA solver. The code borrows heavilty from NumbdaLSODA but uses IDA instead of LSODA (thank you!)

DAEs may be thought of a a system of ordinary differential equations (ODEs) with some additional constraints. For example, consider the linear sytem

dx/dt = - a * x + b * y,

dy/dt = - b * y + a * x

with the constaint x + y = 1. In this case, you can rewrite the equation for dx/dt so that it doesn't include any y terms. Alternatively, you can use a solver such as IDA to solve this as a DAE problem. NumbaIDA allows you to use the IDA solver in Python as a JIT compiled function using Numba.

Built With

(back to top)

Getting Started

The examples directory shows example(s) of how to input a DAE problem into NumbaIDA.

Prerequisites

In order to install NumbaIDA you require a number of commonly used utility programs for building software. On Ubuntu/Debian these may be easily installed by running:

sudo apt-get update
sudo apt-get install -y gcc cmake build-essential clang-tidy python3

Next, install 'pip' and 'venv' with:

        python3 -m pip install --upgrade pip
        python3 -m pip install --upgrade venv

Installation

It is recommended to install and run 'NumbaIDA' a virtual environment. This can be done by navigating to the root directory (NumbaIDA/ by default) and running:

        python3 -m pip install --upgrade venv
        python3 -m venv .venv
        activate .venv/bin/activate

Next install scikit-build into the virtual environment:

python3 -m pip install scikit-build

Finally, install NumbaIDA with

pip install .

Known Issues

  1. Does not allow concurrent solve calls
  2. SUNDIALS is very flexible and allows a number of linear and nonlinear solvers to be used โ€“ currently it is only possible to use the defaults.
  3. Currently, only dense matrices/vectors may be used
  4. IT is not yet possible to use one of SUNDIAL's root-finders during the residual calculation

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

See LICENSE.txt for more information.

(back to top)

SUNDIALS is distributed under the BSD 3-Clause License:

Copyright (c) 2002-2022, Lawrence Livermore National Security and Southern Methodist University. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  • Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Acknowledgments

(back to top)

numbaida's People

Contributors

joeyshuttleworth avatar

Watchers

 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.