Skip to content

Commit 1432eb6

Browse files
Remove BoundaryValueDiffEqAscher blanket reexports
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
1 parent 219b502 commit 1432eb6

6 files changed

Lines changed: 50 additions & 304 deletions

File tree

lib/BoundaryValueDiffEqAscher/Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
1212
FastClosures = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a"
1313
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
1414
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
15-
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
1615
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
1716
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
1817

@@ -29,7 +28,6 @@ ForwardDiff = "0.10.38, 1"
2928
LinearAlgebra = "1.10"
3029
Random = "1.10"
3130
RecursiveArrayTools = "3.27.0, 4"
32-
Reexport = "1.2"
3331
SciMLBase = "3.30"
3432
SciMLTesting = "2.4"
3533
Setfield = "1.1.1"

lib/BoundaryValueDiffEqAscher/src/BoundaryValueDiffEqAscher.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module BoundaryValueDiffEqAscher
22

3-
using ADTypes: ADTypes, AutoSparse, AutoForwardDiff
3+
using ADTypes: ADTypes, AutoSparse
44
using AlmostBlockDiagonals: AlmostBlockDiagonals, IntermediateAlmostBlockDiagonal
55

66
using BoundaryValueDiffEqCore: BoundaryValueDiffEqCore,
@@ -20,15 +20,12 @@ using DifferentiationInterface: DifferentiationInterface, Constant
2020
using FastClosures: @closure
2121
using ForwardDiff: ForwardDiff
2222
using LinearAlgebra: LinearAlgebra, I, norm, rank
23-
using Reexport: @reexport
2423
using SciMLBase: SciMLBase, BVProblem, ReturnCode, StandardBVProblem,
2524
TwoPointBVProblem, isinplace, solve
2625
using Setfield: @set!
2726

2827
const DI = DifferentiationInterface
2928

30-
@reexport using ADTypes, BoundaryValueDiffEqCore, SciMLBase
31-
3229
include("types.jl")
3330
include("utils.jl")
3431
include("algorithms.jl")

lib/BoundaryValueDiffEqAscher/src/algorithms.jl

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,46 @@ for stage in (1, 2, 3, 4, 5, 6, 7)
55

66
@eval begin
77
"""
8-
$($alg)(; nlsolve = NewtonRaphson(), max_num_subintervals = 3000)
8+
$($alg)(; nlsolve = nothing, optimize = nothing, zeta = Float64[],
9+
jac_alg = BVPJacobianAlgorithm(), max_num_subintervals = 3000)
910
10-
$($stage)th stage Gauss Legendre collocation methods with adaptivity adapted from Ascher's implementation.
11+
$($stage)-stage Gauss-Legendre collocation method with Ascher error-control
12+
adaptivity and mesh refinement for boundary-value problems, including problems
13+
with algebraic constraints.
14+
15+
## Fields
16+
17+
- `nlsolve`: Nonlinear solver used for the collocation system. `nothing`
18+
selects the package default.
19+
- `optimize`: Optimization solver used by the mesh-refinement machinery.
20+
`nothing` selects the package default.
21+
- `zeta`: Side-condition locations for problems that require them. The default
22+
empty vector is appropriate when no side conditions are present.
23+
- `jac_alg`: `BVPJacobianAlgorithm` that selects the Jacobian construction
24+
strategy for the collocation system.
25+
- `max_num_subintervals`: Maximum number of mesh subintervals permitted while
26+
refining the solution.
1127
1228
## Keyword Arguments
1329
14-
- `nlsolve`: Internal Nonlinear solver. Any solver which conforms to the SciML
15-
`NonlinearProblem` interface can be used. Note that any autodiff argument for
16-
the solver will be ignored and a custom jacobian algorithm will be used.
17-
- `optimize`: Internal Optimization solver. Any solver which conforms to the SciML
18-
`OptimizationProblem` interface can be used. Note that any autodiff argument for
19-
the solver will be ignored and a custom jacobian algorithm will be used.
20-
- `max_num_subintervals`: Number of maximal subintervals, default as 3000.
21-
- `zeta`: side condition points, should always be provided.
30+
- `nlsolve = nothing`: Internal nonlinear solver. Any solver implementing the
31+
SciML `NonlinearProblem` interface may be used. Its autodifferentiation
32+
setting is ignored because this solver uses `jac_alg`.
33+
- `optimize = nothing`: Internal optimization solver. Any solver implementing
34+
the SciML `OptimizationProblem` interface may be used. Its
35+
autodifferentiation setting is ignored because this solver uses `jac_alg`.
36+
- `zeta = Float64[]`: Side-condition locations. Supply the points required by
37+
the problem; leave empty when the problem has no side conditions.
38+
- `jac_alg = BVPJacobianAlgorithm()`: Jacobian construction strategy. For
39+
type stability, provide ForwardDiff chunk sizes in the AD types selected by
40+
this value.
41+
- `max_num_subintervals = 3000`: Maximum number of mesh subintervals.
2242
23-
!!! note
43+
## Example
2444
25-
For type-stability, the chunksizes for ForwardDiff ADTypes in
26-
`BVPJacobianAlgorithm` must be provided.
45+
```julia
46+
alg = $($alg)(zeta = [0.0, 0.5, 1.0])
47+
```
2748
2849
## References
2950

lib/BoundaryValueDiffEqAscher/test/Core/ascher_basic_tests.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
using BoundaryValueDiffEqAscher
22
using Test
33

4+
@testset "Public API" begin
5+
@test Set(names(BoundaryValueDiffEqAscher)) == Set(
6+
(
7+
:Ascher1,
8+
:Ascher2,
9+
:Ascher3,
10+
:Ascher4,
11+
:Ascher5,
12+
:Ascher6,
13+
:Ascher7,
14+
:BoundaryValueDiffEqAscher,
15+
)
16+
)
17+
end
18+
419
# Standard test BVDAE problem from the URI M. ASCHER and RAYMOND J. SPITERI paper
520
@testset "Test Ascher solver on example problem 1" begin
621
using BoundaryValueDiffEqAscher, SciMLBase

lib/BoundaryValueDiffEqAscher/test/qa/qa.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ using SciMLTesting
22
using BoundaryValueDiffEqAscher
33
using Test
44

5-
const DOCS_SRC = normpath(joinpath(@__DIR__, "..", "..", "..", "..", "docs", "src"))
6-
include(joinpath(@__DIR__, "..", "..", "..", "..", "test", "qa", "reexports.jl"))
7-
85
run_qa(
96
BoundaryValueDiffEqAscher;
107
ei_kwargs = (;
@@ -15,9 +12,4 @@ run_qa(
1512
# no public replacement.
1613
all_qualified_accesses_are_public = (; ignore = (:Dual, :jacobian!)),
1714
),
18-
reexports_allow = ASCHER_REEXPORTS,
19-
api_docs_kwargs = (;
20-
docs_src = DOCS_SRC, ignore = ASCHER_REEXPORTS,
21-
rendered_ignore = ASCHER_REEXPORTS,
22-
),
2315
)

0 commit comments

Comments
 (0)