Skip to content

Commit

Permalink
Merge branch 'main' into compathelper/new_version/2022-12-24-01-20-13…
Browse files Browse the repository at this point in the history
…-168-02421240641
  • Loading branch information
rveltz authored May 7, 2024
2 parents dc7c1f6 + 3912546 commit 588865a
Show file tree
Hide file tree
Showing 56 changed files with 3,671 additions and 1,109 deletions.
1 change: 1 addition & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
types:
- created
workflow_dispatch:
permissions:
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.8' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'.
#- '1.3' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
# - 'nightly'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- run: |
julia --project=docs -e '
using Documenter: doctest
using DDEBifurcationKit
doctest(DDEBifurcationKit)' # change MYPACKAGE to the name of your package
- run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
26 changes: 26 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Documentation

on:
push:
branches:
- main
- 'release-'
- master # update to match your development branch (master, main, dev, trunk, ...)
tags: '*'
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1.8'
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
run: julia --project=docs/ docs/make.jl
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Documentation: http://docs.travis-ci.com/user/languages/julia/
language: julia
os:
- linux
- osx
julia:
- 1.5
notifications:
email: false
codecov: true
coveralls: true
jobs:
allow_failures:
- os: osx
- julia: nightly
include:
- stage: "Documentation"
julia: 1.5
os: linux
script:
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
Pkg.instantiate()'
- julia --project=docs/ docs/make.jl
after_success: skip
after_success:
# push coverage results to Codecov
- julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder())'
12 changes: 9 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,23 @@ version = "0.0.1"
BifurcationKit = "0f109fa4-8a5d-4b75-95aa-f515264e7665"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
Infiltrator = "5903a43b-9cc3-4c30-8d17-598619ec4e9b"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NonlinearEigenproblems = "067cfa3b-fa88-53b2-a873-5b23b3a16e31"
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"

[compat]
BifurcationKit = "0.2"
Parameters = "0.12"
julia = "1.7"
BifurcationKit = "0.3"
DocStringExtensions = "0.9"
ForwardDiff = "0.10.36"
NonlinearEigenproblems = "1.1.1"
Parameters = "0.12"
RecursiveArrayTools = "2.38.10"
SciMLBase = "1.98.1"
Setfield = "^1.1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# DDEBifurcationKit

| **Documentation** | **Build Status** | **Downloads** |
|:-----------------:|:----------------:|:-------------:|
| [![docs-dev][docs-dev-img]][docs-dev-url] | [![Build Status](https://github.com/bifurcationkit/DDEBifurcationKit.jl/workflows/CI/badge.svg)](https://github.com/bifurcationkit/DDEBifurcationKit.jl/actions?query=workflow%3ACI) [![codecov](https://codecov.io/gh/bifurcationkit/DDEBifurcationKit.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/bifurcationkit/DDEBifurcationKit.jl)| |

[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-stable-url]: https://bifurcationkit.github.io/BifurcationKitDocs.jl/stable
[docs-dev-img]: https://img.shields.io/badge/docs-dev-purple.svg
[docs-dev-url]: https://bifurcationkit.github.io/DDEBifurcationKit.jl/dev


`DDEBifurcationKit.jl` is a component package in the `BifurcationKit` ecosystem. It holds the delay differential equation (DDE) utilities. While completely independent
and usable on its own, users interested in using this
functionality should check out [BifurcationKit.jl](https://github.com/bifurcationkit/BifurcationKit.jl).
Expand All @@ -10,7 +20,7 @@ Assuming that you already have Julia correctly installed, it suffices to import
`DDEBifurcationKit.jl` in the standard way:

```julia
import Pkg; Pkg.add("DDEBifurcationKit")
import Pkg; Pkg.add("https://github.com/bifurcationkit/DDEBifurcationKit.jl")
```

## Support and citation
Expand All @@ -29,4 +39,28 @@ If you use this package for your work, we ask that you cite the following paper.
HAL_ID = {hal-02902346},
HAL_VERSION = {v1},
}
```
```

## Main features

Type of delay: Constant (C), state-dependent (SD), nested (N)

|Features| delay type | Matrix Free|Custom state| [Tutorial](https://bifurcationkit.github.io/BifurcationKitDocs.jl/dev/tutorials/tutorials/) | GPU |
|---|---|---|---|---|---|
| (Deflated) Krylov-Newton| C/SD | Yes | Yes| | |
| Continuation PALC (Natural, Secant, Tangent, Polynomial) | C/SD| | | | |
| Bifurcation / Fold / Hopf point detection | C/SD | Y| | | |
| Fold Point continuation |C/SD | Y | | |
| Hopf Point continuation | C/SD | | `AbstractArray` | | |
| ~~Bogdanov-Takens Point newton~~ | C/SD | Y | `AbstractArray` | | |
| Branch point / Fold / Hopf normal form | C/SD | Y| | | | |
| Branch switching at Branch / Hopf points | C/SD | Y | `AbstractArray` | |
| <span style="color:red">**Automatic bifurcation diagram computation of equilibria**</span> | C/SD| Y| `AbstractArray` | | |
| ~~Periodic Orbit (Trapezoid) Newton / continuation~~ | | | `AbstractVector` | | |
| Periodic Orbit (Collocation) Newton / continuation | C/SD | | `AbstractVector` | | |
| ~~Periodic Orbit (Parallel Poincaré / Standard Shooting) Newton / continuation~~ | | | `AbstractArray` | | |
| ~~Fold, Neimark-Sacker, Period doubling detection~~ | | | `AbstractVector` | | |
| ~~Continuation of Fold of periodic orbits~~ | | | `AbstractVector` | | |
| Bogdanov-Takens / Bautin / Cusp / Zero-Hopf / Hopf-Hopf point detection | C/SD| Y| | |
|~~Bogdanov-Takens / Bautin / Cusp / Zero-Hopf / Hopf-Hopf normal forms~~ | | Y| | |
| ~~Branching from Bogdanov-Takens points to Fold / Hopf curve~~ | | | `AbstractVector` | | |
20 changes: 20 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[deps]
BifurcationKit = "0f109fa4-8a5d-4b75-95aa-f515264e7665"
DDEBifurcationKit = "954e4062-bdb8-4e3f-9eee-d47105dd3e65"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[compat]
BifurcationKit = "0.3"
DifferentialEquations = "6.19.0, 7.1.0"
Documenter = "0.27"
Setfield = "0.5.0, 0.7.0, 0.8.0, 1"
julia = "1"
55 changes: 55 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using Pkg

using Documenter, DDEBifurcationKit, Setfield, BifurcationKit
# using DocThemeIndigo
ENV["GKSwstype"] = "100"

# to display progress
# ENV["JULIA_DEBUG"] = Documenter

makedocs(doctest = false,
sitename = "Bifurcation Analysis of DDEs in Julia",
format = Documenter.HTML(collapselevel = 1,assets = ["assets/indigo.css"]),
# format = DocumenterLaTeX.LaTeX(),
authors = "Romain Veltz",
pages = Any[
"Home" => "index.md",
"Tutorials" => "tutorials/tutorials.md",
"Problems" => [
"Bifurcation Problem" => "BifProblem.md",
"Periodic Orbits" => [
"Introduction" => "periodicOrbit.md",
"Collocation" => "periodicOrbitCollocation.md",
],
],
"Functionalities" => [
"Bifurcations" => [
"Bifurcation detection (codim 1)" => "detectionBifurcation.md",
"Fold / Hopf Continuation (codim 2)" => "codim2Continuation.md",
# "Bogdanov-Takens refinement (codim 3)" => "codim3Continuation.md",
],
"Normal form" => [
"Simple branch point" => "simplebp.md",
"Non-simple branch point" => "nonsimplebp.md",
"Simple Hopf" => "simplehopf.md",
"Normal form (periodic orbit)" => [],
],
"Branch switching" => "branchswitching.md",
],
"Options" => [
# "Linear Solvers" => "linearsolver.md",
# "Bordered linear solvers" => "borderedlinearsolver.md",
"Eigen Solvers" => "eigensolver.md",
# "Bordered arrays" => "Borderedarrays.md",
],
"Contributing" => [
],
"Frequently Asked Questions" => "faq.md",
"Library" => "library.md"
]
)

deploydocs(
repo = "github.com/bifurcationkit/DDEBifurcationKit.jl.git",
devbranch = "main"
)
54 changes: 54 additions & 0 deletions docs/src/BifProblem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Bifurcation Problem


## Constant delays (DDE)

Consider the system of delay differential equations with constant delays (DDEs)

$$\frac{\mathrm{d}}{\mathrm{d} t} x(t)=\mathbf F\left(x(t), x\left(t-\tau_1\right), \ldots, x\left(t-\tau_m\right); p\right)$$

where the delays $\tau_i>0$ are constant and $p$ is a set of parameters. In order to specify this, we need to provide the vector field and the delays. The delays are provided using a delay function which must return an `AbstractVecor`

```julia
function mydelays(pars)
[1, pars.tau1]
end
```

where `pars` are some user defined variables. The vector field is then specified as follows

```julia
function myF(x, xd, pars)
[
x[1] + xd[2][1]^2,
x[2] + xd[3][2]^2,
]
end
```

where `xd` is a vector holding `[x(t-d[1]), x(t-d[2])]` where `d = mydelays(pars)`. Some simple examples can be found in the tutorials.

The structure [`ConstantDDEBifProblem`](@ref) encapsulates the bifurcation problem.


## State-dependent delays (SD-DDE)

Consider the system of delay differential equations with state-dependent delays.

$$\frac{\mathrm{d}}{\mathrm{d} t} x(t)=\mathbf F\left(x(t), x\left(t-\tau_1(x(t))\right), \ldots, x\left(t-\tau_m(x(t))\right); p\right)$$


where the delays $\tau_i>0$ are functions of $x(t)$ and $p$ is a set of parameters. The only difference with the previous case is the specification of the delay function which now depends on `x`

```julia
function mydelays(x, pars)
[
1 + x[1]^2,
2 + x[2]^2
]
end
```

The structure [`SDDDEBifProblem`](@ref) encapsulates the bifurcation problem.

> A more elaborate problem would be to allow $\tau_i$ to depend on the history of $x(\theta+t)$ for $\theta\in[-\tau_{max},0]$ and not just on the current value of $x(t)$. This is not implemented yet.
Loading

0 comments on commit 588865a

Please sign in to comment.