Giter VIP home page Giter VIP logo

juliaturkudatascience / fdesolver.jl Goto Github PK

View Code? Open in Web Editor NEW
15.0 1.0 3.0 12.44 MB

FdeSolver.jl: A Julia package for the numerical solution of fractional differential equations (FDEs) as well as systems of equations.

Home Page: https://juliaturkudatascience.github.io/FdeSolver.jl

License: Other

Julia 100.00%
differential-equations numerical-methods solver ode-solver fractional-calculus predictor-corrector fractional-differential-equations julia fft

fdesolver.jl's Introduction

FdeSolver.jl: Solving fractional differential equations

Stable CI codecov DOI

This is a Julia package for fractional differential equations and ODEs. It provides numerical solutions for nonlinear fractional ordinary differential equations (in the sense of Caputo).

Related work includes the independent FractionalDiffEq Julia Package that provides solutions of differential equations with different fractional operators, and earlier tools that are available in Matlab.

The implemented models are generic and broadly applicable to modeling multivariate signals from a single source or collected across multiple sources. The dynamical models implemented in this package were initially developed for modeling dynamics of interacting microbial communities (Khalighi et al. 2022) but the models are more broadly applicable and applicable to studying multi-omic and host-microbiome interactions.

Method

We implement the predictor-corrector algorithms with a sufficient convergence and accuracy, including fast Fourier transform technique that gives us high computation speed. Interested readers can also find the stability of the methods and see how to implement the methods for solving multi-term fractional differential equations.

Let us suppose the following initial value problem with the Caputo fractional derivative for $\beta>0$:

$${}_{C}\!D_{t_0}^{\beta}y(t)=f(t,y(t))$$

with the initial condition:

$$y(t_0)=y_0,y^{(1)}(t_0)=y^{(1)}_0,...,y^{(m-1)}(t_0)=y^{(m-1)}_0$$

where m is the smallest integer or equal to the order of derivative.

We solve the problem by using predictor corrector and Newton Raphson method.

Installation

If Julia is installed correctly, you can import FdeSolver.jl as:

import Pkg; Pkg.add("FdeSolver")

A few methods on its usage are explained in Examples.

Acknowledgments

We are grateful to all contributors. New issues and pull requests are welcome.

This research has received funding from

  • the Horizon 2020 Programme of the European Union within the FindingPheno project under grant agreement No 952914.
  • Research Council of Finland (grant 330887)

Package documentation is compiled according to the guidelines provided in PkgTutorial.jl.

Publications

Kindly cite this work as follows:

  • Fdesolver: A Julia package for solving fractional differential equations M Khalighi, G Benedetti, L Lahti arXiv preprint, 2022. arXiv:2212.12550

The package development is further linked with the following publications/preprints:

  • Quantifying the impact of ecological memory on the dynamics of interacting communities. M Khalighi, G Sommeria-Klein, D Gonze, K Faust, L Lahti. PLoS Computational Biology 18(6), 2022 doi:10.1371/journal.pcbi.1009396

  • Three-species Lotka-Volterra model with respect to Caputo and Caputo-Fabrizio fractional operators. M Khalighi, L Eftekhari, S Hosseinpour, L Lahti. Symmetry 13 (3):368, 2021. doi:10.3390/sym13030368

  • Ebola epidemic model with dynamic population and memory, F Ndaïrou, M Khalighi, and L Lahti, Chaos, Solitons & Fractals, 170: 113361, 2023. doi:10.1016/j.chaos.2023.113361

fdesolver.jl's People

Contributors

antagomir avatar moeinkh88 avatar riborings avatar

Stargazers

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

Watchers

 avatar

fdesolver.jl's Issues

Operator with dot .=

You used .= in some parts of the main code. For example, in line 24 we have: Y[2, :] .= T0 .+ h .^ β .* F(t, n, β, Y, par...) ./ Γ(β .+ 1)

I found it problematic in some cases, e.g. for the solution of Gonze model with N species.

So, I replaced = instead of .= from the main.jl.

If you think the presence of .= is so crucial, let me know to think more about it. If not, let's remove dots.

Choose a licence

The default licence when you create a template package is MIT, but we can also go for another one. For now, the licence is stored in this file.

README rendering

The current README relies on copypasted figures. Is it possible to automated figure generation. With Julia for Rmarkdown or something similar, Julia specific.

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Make Travis CI and codecov work

Travis CI enables continuous integration of a GitHub repository and codecov check that the code is tested to avoid errors and exceptions. They are free for public repositories, so we can set them up after we decide to make our repo public. They can also be run on shared repositories belonging to an organisation / team.

Register new release

This issue can be used when the second release of the package is ready. New features should be listed:

  • Jacobian case
  • Convergence / Tolerance case
  • Published documentation
  • ...

Benchmarking against MATLAB

We need to compare execution time of our solver against its MATLAB counterpart.

Current challenges:

  • interpolate MATLAB solvers in Julia
  • make sure that interpolation does not affect execution time
  • benchmark and compare Julia and MATLAB results in terms of accuracy and efficiency

Documentation Not Updating on GitHub Pages Despite Successful Workflow Run

When we update the README.md in the repository, the changes are not reflected in the GitHub Pages documentation.

I try to solve it with GHA. The GitHub Actions workflow for documentation (documentation.yml) runs successfully without errors. Despite this, the updates to the README aren't appearing in the stable version of the documentation. The issue persists despite ensuring the correct setup in make.jl and the workflow file.

Minor Error in Example 1

Just wanted to let you know there is a minor error in the first example of the Readme. Running it now gives:

ERROR: LoadError: MethodError: no method matching F(::Float64, ::Vector{Float64}) Closest candidates are: F(::Any, ::Any, ::Any) at ...

As par seems to be missing from the FDEsolver call.

Otherwise, it was much fun to play around with the package, great work!

Improvements

  • To avoid duplication, keep examples in a single place and link there from README. Do not duplicate.
  • Add relevant references from the authors in README and examples (I already added some)

About Readme

In API

We bring examples here. I will edit the examples and choose which one should be there.
and delete the Examples file instead.
We don't need any extra documentation else than README

Register v1.0

Here we are going to release v1.0.0 of FdeSolver.jl, which now solves fractional differential equations in a faster way thanks to Fast-Fourier Transform (FFT).

Testing the FFT version

Before releasing the solver with FFT, we need to add some tests on this newer version. We can update the older tests or make new ones.

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.