Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Shreyas-Ekanathan committed Aug 15, 2024
2 parents 67bb0fe + ba80b06 commit 30cc947
Show file tree
Hide file tree
Showing 316 changed files with 77,625 additions and 40,599 deletions.
14 changes: 14 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ steps:
plugins:
- JuliaCI/julia#v1:
version: "1"
- staticfloat/metahook:
pre-command: |
julia --project=. -e '
using Pkg;
Pkg.develop(map(path ->Pkg.PackageSpec.(;path="$(@__DIR__)/lib/$(path)"), readdir("./lib")));
Pkg.instantiate();
'
- JuliaCI/julia-test#v1:
coverage: false # 1000x slowdown
agents:
Expand Down Expand Up @@ -33,6 +40,13 @@ steps:
GROUP: "{{matrix.group}}"
plugins:
- JuliaCI/julia#v1
- staticfloat/metahook:
pre-command: |
julia --project=. -e '
using Pkg;
Pkg.develop(map(path ->Pkg.PackageSpec.(;path="$(@__DIR__)/lib/$(path)"), readdir("./lib")));
Pkg.instantiate();
'
- JuliaCI/julia-test#v1:
coverage: false
julia_args: "--threads=auto"
Expand Down
45 changes: 40 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,39 @@ jobs:
- AlgConvergence_II
- AlgConvergence_III
- Downstream
- Symplectic
- Extrapolation
- StabilizedRK
- StabilizedIRK
- ODEInterfaceRegression
- Multithreading

- OrdinaryDiffEqAdamsBashforthMoulton
- OrdinaryDiffEqBDF
- OrdinaryDiffEqCore
- OrdinaryDiffEqDefault
- OrdinaryDiffEqDifferentiation
- OrdinaryDiffEqExplicitRK
- OrdinaryDiffEqExponentialRK
- OrdinaryDiffEqExtrapolation
- OrdinaryDiffEqFIRK
- OrdinaryDiffEqFeagin
- OrdinaryDiffEqFunctionMap
- OrdinaryDiffEqHighOrderRK
- OrdinaryDiffEqIMEXMultistep
- OrdinaryDiffEqLinear
- OrdinaryDiffEqLowOrderRK
- OrdinaryDiffEqLowStorageRK
- OrdinaryDiffEqNordsieck
- OrdinaryDiffEqPDIRK
- OrdinaryDiffEqPRK
- OrdinaryDiffEqQPRK
- OrdinaryDiffEqRKN
- OrdinaryDiffEqRosenbrock
- OrdinaryDiffEqSDIRK
- OrdinaryDiffEqSSPRK
- OrdinaryDiffEqStabilizedIRK
- OrdinaryDiffEqStabilizedRK
- OrdinaryDiffEqSymplecticRK
- OrdinaryDiffEqTsit5
- OrdinaryDiffEqVerner

version:
- '1'
steps:
Expand All @@ -45,7 +72,15 @@ jobs:
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
# Explicitly develop the libraries first before running the tests for now.
# This is necessary since the tests are likely to fail otherwise, given that all
# the libs haven't been registered yet.
- name: "Develop the libraries since they haven't been registered yet"
run: |
julia --project=. -e '
using Pkg;
Pkg.develop(map(path ->Pkg.PackageSpec.(;path="$(@__DIR__)/lib/$(path)"), readdir("./lib")));
'
- uses: julia-actions/julia-runtest@v1
env:
GROUP: ${{ matrix.group }}
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ jobs:
- uses: julia-actions/setup-julia@latest
with:
version: '1'
# Explicitly develop the libraries first before running the tests for now.
# This is necessary since the tests are likely to fail otherwise, given that all
# the libs haven't been registered yet.
- name: "Develop the libraries since they haven't been registered yet"
run: |
julia --project=. -e '
using Pkg;
Pkg.develop(map(path ->Pkg.PackageSpec.(;path="$(@__DIR__)/lib/$(path)"), readdir("./lib")));
'
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/Downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,15 @@ jobs:
with:
version: ${{ matrix.julia-version }}
arch: x64
- uses: julia-actions/julia-buildpkg@latest
# Explicitly develop the libraries first before running the tests for now.
# This is necessary since the tests are likely to fail otherwise, given that all
# the libs haven't been registered yet.
- name: "Develop the libraries since they haven't been registered yet"
run: |
julia --project=. -e '
using Pkg;
Pkg.develop(map(path ->Pkg.PackageSpec.(;path="$(@__DIR__)/lib/$(path)"), readdir("./lib")));
'
- name: Clone Downstream
uses: actions/checkout@v4
with:
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/Invalidations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ jobs:
with:
version: '1'
- uses: actions/checkout@v4
- uses: julia-actions/julia-buildpkg@v1
# Explicitly develop the libraries first before running the tests for now.
# This is necessary since the tests are likely to fail otherwise, given that all
# the libs haven't been registered yet.
- name: "Develop the libraries since they haven't been registered yet"
run: |
julia --project=. -e '
using Pkg;
Pkg.develop(map(path ->Pkg.PackageSpec.(;path="$(@__DIR__)/lib/$(path)"), readdir("./lib")));
'
- uses: julia-actions/julia-invalidations@v1
id: invs_pr

Expand Down
30 changes: 30 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,33 @@
- Please run `using JuliaFormatter, OrdinaryDiffEq; format(joinpath(dirname(pathof(OrdinaryDiffEq)), ".."))` before committing.
- Add tests for any new features.
- Additional help on contributing to the numerical solvers can be found at https://docs.sciml.ai/DiffEqDevDocs/stable/

## Developing Locally

OrdinaryDiffEq is a very large package and thus it uses a sublibrary approach to keep down
the total number of dependencies per solver. As a consequence, it requires a bit of special
handling compared to some other Julia packages. When running the full test suite, it's
recommended that one has dev'd all of the relevant packages. This can be done via:

```julia
pathtolibrary = Pkg.pkgdir(OrdinaryDiffEq)
sublibs = string.((pathtolibrary,), readdir(pathtolibrary))
Pkg.develop(map(name -> Pkg.PackageSpec.(; path = name), sublibs));
```

and then running `Pkg.test("OrdinaryDiffEq")` will run the global tests locally. Each of the
per-solver subtests, which includes convergence tests and other per-library handling,
is then ran by using a specific solver set, such as
`Pkg.test("OrdinaryDiffEqAdamsBashforthMoulton")`

## Dependency Structure

There is a tree dependency structure to the sublibraries of OrdinaryDiffEq. The core stepper
lives in OrdinaryDiffEqCore.jl. Explicit methods only require the core. Then on top of the
core is OrdinaryDiffEqDifferentiation.jl which defines the utilities used for differentiation
and Jacobian construction. This is used directly by methods like Rosenbrock and exponential
integrators, which use Jacobians but not implicit solvers. Finally there's
OrdinaryDiffEqNonlinearSolve, which is the largest set of dependencies and pulls in the
NonlinearSolve.jl stack for handling implicit equations, and is thus the core dependency
of the implicit integrators. OrdinaryDiffEqNonlinearSolve relies on OrdinaryDiffEqDifferentiation
which relies on OrdinaryDiffEqCore.
47 changes: 37 additions & 10 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
FunctionWrappersWrappers = "77dc65aa-8811-40c2-897b-53d922fa7daf"
IfElse = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
LineSearches = "d3d80556-e9d4-5f37-9878-2ab0fcc64255"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -27,6 +26,36 @@ Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
MuladdMacro = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221"
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
OrdinaryDiffEqAdamsBashforthMoulton = "89bda076-bce5-4f1c-845f-551c83cdda9a"
OrdinaryDiffEqBDF = "6ad6398a-0878-4a85-9266-38940aa047c8"
OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
OrdinaryDiffEqDefault = "50262376-6c5a-4cf5-baba-aaf4f84d72d7"
OrdinaryDiffEqDifferentiation = "4302a76b-040a-498a-8c04-15b101fed76b"
OrdinaryDiffEqExplicitRK = "9286f039-9fbf-40e8-bf65-aa933bdc4db0"
OrdinaryDiffEqExponentialRK = "e0540318-69ee-4070-8777-9e2de6de23de"
OrdinaryDiffEqExtrapolation = "becaefa8-8ca2-5cf9-886d-c06f3d2bd2c4"
OrdinaryDiffEqFIRK = "5960d6e9-dd7a-4743-88e7-cf307b64f125"
OrdinaryDiffEqFeagin = "101fe9f7-ebb6-4678-b671-3a81e7194747"
OrdinaryDiffEqFunctionMap = "d3585ca7-f5d3-4ba6-8057-292ed1abd90f"
OrdinaryDiffEqHighOrderRK = "d28bc4f8-55e1-4f49-af69-84c1a99f0f58"
OrdinaryDiffEqIMEXMultistep = "9f002381-b378-40b7-97a6-27a27c83f129"
OrdinaryDiffEqLinear = "521117fe-8c41-49f8-b3b6-30780b3f0fb5"
OrdinaryDiffEqLowOrderRK = "1344f307-1e59-4825-a18e-ace9aa3fa4c6"
OrdinaryDiffEqLowStorageRK = "b0944070-b475-4768-8dec-fb6eb410534d"
OrdinaryDiffEqNonlinearSolve = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8"
OrdinaryDiffEqNordsieck = "c9986a66-5c92-4813-8696-a7ec84c806c8"
OrdinaryDiffEqPDIRK = "5dd0a6cf-3d4b-4314-aa06-06d4e299bc89"
OrdinaryDiffEqPRK = "5b33eab2-c0f1-4480-b2c3-94bc1e80bda1"
OrdinaryDiffEqQPRK = "04162be5-8125-4266-98ed-640baecc6514"
OrdinaryDiffEqRKN = "af6ede74-add8-4cfd-b1df-9a4dbb109d7a"
OrdinaryDiffEqRosenbrock = "43230ef6-c299-4910-a778-202eb28ce4ce"
OrdinaryDiffEqSDIRK = "2d112036-d095-4a1e-ab9a-08536f3ecdbf"
OrdinaryDiffEqSSPRK = "669c94d9-1f4b-4b64-b377-1aa079aa2388"
OrdinaryDiffEqStabilizedIRK = "e3e12d00-db14-5390-b879-ac3dd2ef6296"
OrdinaryDiffEqStabilizedRK = "358294b1-0aab-51c3-aafe-ad5ab194a2ad"
OrdinaryDiffEqSymplecticRK = "fa646aed-7ef9-47eb-84c4-9443fc8cbfa8"
OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a"
OrdinaryDiffEqVerner = "79d7bb75-1356-48c1-b8c0-6832512096c2"
Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588"
PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Expand All @@ -53,25 +82,24 @@ DataStructures = "0.18"
DiffEqBase = "6.147"
DocStringExtensions = "0.9"
EnumX = "1"
ExponentialUtilities = "1.22"
ExponentialUtilities = "1"
FastBroadcast = "0.2, 0.3"
FastClosures = "0.3"
FillArrays = "1.9"
FiniteDiff = "2"
ForwardDiff = "0.10.3"
ForwardDiff = "0.10"
FunctionWrappersWrappers = "0.1"
IfElse = "0.1"
InteractiveUtils = "1.9"
LineSearches = "7"
LinearAlgebra = "1.9"
LinearSolve = "2.1.10"
LinearSolve = "2"
Logging = "1.9"
MacroTools = "0.5"
MuladdMacro = "0.2.1"
NLsolve = "4"
NonlinearSolve = "3.12.3"
NonlinearSolve = "3"
OrdinaryDiffEqCore = "1"
Polyester = "0.7"
PreallocationTools = "0.4.15"
PreallocationTools = "0.4"
PrecompileTools = "1"
Preferences = "1.3"
RecursiveArrayTools = "2.36, 3"
Expand All @@ -81,8 +109,7 @@ SciMLOperators = "0.3"
SciMLStructures = "1"
SimpleNonlinearSolve = "1"
SimpleUnPack = "1"
SparseArrays = "1.9"
SparseDiffTools = "2.3"
SparseDiffTools = "2"
Static = "0.8, 1"
StaticArrayInterface = "1.2"
StaticArrays = "1.0"
Expand Down
16 changes: 15 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,21 @@ makedocs(sitename = "OrdinaryDiffEq.jl",
authors = "Chris Rackauckas et al.",
clean = true,
doctest = false,
modules = [OrdinaryDiffEq],
modules = [OrdinaryDiffEq,
OrdinaryDiffEq.OrdinaryDiffEqExtrapolation,
OrdinaryDiffEq.OrdinaryDiffEqStabilizedRK,
OrdinaryDiffEq.OrdinaryDiffEqStabilizedIRK,
OrdinaryDiffEq.OrdinaryDiffEqLowStorageRK,
OrdinaryDiffEq.OrdinaryDiffEqSSPRK,
OrdinaryDiffEq.OrdinaryDiffEqFeagin,
OrdinaryDiffEq.OrdinaryDiffEqSymplecticRK,
OrdinaryDiffEq.OrdinaryDiffEqRKN,
OrdinaryDiffEq.OrdinaryDiffEqVerner,
OrdinaryDiffEq.OrdinaryDiffEqSDIRK,
OrdinaryDiffEq.OrdinaryDiffEqBDF,
OrdinaryDiffEq.OrdinaryDiffEqDefault,
OrdinaryDiffEq.OrdinaryDiffEqFIRK],
warnonly = [:docs_block, :missing_docs, :eval_block],
format = Documenter.HTML(analytics = "UA-90474609-3",
assets = ["assets/favicon.ico"],
canonical = "https://ordinarydiffeq.sciml.ai/stable/"),
Expand Down
24 changes: 24 additions & 0 deletions lib/OrdinaryDiffEqAdamsBashforthMoulton/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
The OrdinaryDiffEq.jl package is licensed under the MIT "Expat" License:

> Copyright (c) 2016-2020: ChrisRackauckas, Yingbo Ma, Julia Computing Inc, and
> other contributors:
>
> https://github.com/SciML/OrdinaryDiffEq.jl/graphs/contributors
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all
> copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE.
30 changes: 30 additions & 0 deletions lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name = "OrdinaryDiffEqAdamsBashforthMoulton"
uuid = "89bda076-bce5-4f1c-845f-551c83cdda9a"
authors = ["ParamThakkar123 <[email protected]>"]
version = "1.0.0"

[deps]
FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
MuladdMacro = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221"
OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
OrdinaryDiffEqLowOrderRK = "1344f307-1e59-4825-a18e-ace9aa3fa4c6"
Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"

[compat]
julia = "1.10"

[extras]
DiffEqDevTools = "f3b72e0c-5b89-59e1-b016-84e28bfd966d"
ODEProblemLibrary = "fdc4e326-1af4-4b90-96e7-779fcce2daa5"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"

[targets]
test = ["DiffEqDevTools", "ODEProblemLibrary", "Random", "SafeTestsets", "Test", "DiffEqBase"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module OrdinaryDiffEqAdamsBashforthMoulton

import OrdinaryDiffEqCore: OrdinaryDiffEqMutableCache, OrdinaryDiffEqConstantCache, @cache,
alg_cache,
initialize!, @unpack, perform_step!, alg_order, isstandard,
OrdinaryDiffEqAlgorithm,
OrdinaryDiffEqAdaptiveAlgorithm,
OrdinaryDiffEqAdamsVarOrderVarStepAlgorithm,
constvalue, calculate_residuals, calculate_residuals!,
trivial_limiter!,
full_cache
import OrdinaryDiffEqLowOrderRK: BS3ConstantCache, BS3Cache, RK4ConstantCache, RK4Cache
import RecursiveArrayTools: recursivefill!
using MuladdMacro, FastBroadcast
import Static: False
import ADTypes: AutoForwardDiff

using Reexport
@reexport using DiffEqBase

include("algorithms.jl")
include("alg_utils.jl")
include("adams_bashforth_moulton_caches.jl")
include("adams_utils.jl")
include("adams_bashforth_moulton_perform_step.jl")

export AB3, AB4, AB5, ABM32, ABM43, ABM54, VCAB3,
VCAB4, VCAB5, VCABM3, VCABM4, VCABM5, VCABM

end
Loading

0 comments on commit 30cc947

Please sign in to comment.