Skip to content

Commit

Permalink
Rename extension
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Sep 20, 2023
1 parent 4889ba5 commit ff583d1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ julia = "1.6"
ODEInterface = "54ca160b-1b9f-5127-a996-1867f4bc2a2c"

[extensions]
BVPODEInterfaceExt = "ODEInterface"
BoundaryValueDiffEqODEInterfaceExt = "ODEInterface"

[extras]
DiffEqDevTools = "f3b72e0c-5b89-59e1-b016-84e28bfd966d"
Expand All @@ -54,4 +54,4 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["StaticArrays", "Random", "DiffEqDevTools", "OrdinaryDiffEq", "Test", "NonlinearSolve", "SafeTestsets"]
test = ["StaticArrays", "Random", "DiffEqDevTools", "OrdinaryDiffEq", "Test", "NonlinearSolve", "SafeTestsets", "ODEInterface"]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module BVPODEInterfaceExt
module BoundaryValueDiffEqODEInterfaceExt

using SciMLBase, BoundaryValueDiffEq, ODEInterface
import ODEInterface: OptionsODE, OPT_ATOL, OPT_RTOL, OPT_METHODCHOICE, OPT_DIAGNOSTICOUTPUT,
Expand Down Expand Up @@ -55,6 +55,7 @@ function SciMLBase.__solve(prob::BVProblem, alg::BVPM2; dt = 0.0, reltol = 1e-3,

sol, retcode, stats = bvpm2_solve(initial_guess, rhs, bc, opt)
retcode = retcode 0 ? ReturnCode.Success : ReturnCode.Failure
bvpm2_destroy(initial_guess)

x_mesh = bvpm2_get_x(sol)
return DiffEqBase.build_solution(prob, alg, x_mesh, eachcol(evalSolution(sol, x_mesh));
Expand Down
13 changes: 5 additions & 8 deletions src/nlprob.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,10 @@ function construct_sparse_banded_jac_prototype(y, M, N)
for i in eachindex(row_colorvec)
row_colorvec[i] = mod1(i, min(2M + 1, M * N) + 1)
end

y_ = similar(y, length(Is))
return sparse(adapt(parameterless_type(y), Is), adapt(parameterless_type(y), Js),
y_, M * (N - 1), M * N),
col_colorvec,
row_colorvec
return (sparse(adapt(parameterless_type(y), Is), adapt(parameterless_type(y), Js),
y_, M * (N - 1), M * N), col_colorvec, row_colorvec)
end

# Two Point Specialization
Expand Down Expand Up @@ -138,10 +137,8 @@ function construct_sparse_banded_jac_prototype(y::ArrayPartition, M, N)
end

y_ = similar(y, length(Is))
return sparse(adapt(parameterless_type(y), Is), adapt(parameterless_type(y), Js),
y_, M * N, M * N),
col_colorvec,
row_colorvec
return (sparse(adapt(parameterless_type(y), Is), adapt(parameterless_type(y), Js),
y_, M * N, M * N), col_colorvec, row_colorvec)
end

function generate_nlprob(cache::MIRKCache{iip}, y, loss_bc, loss_collocation, loss,
Expand Down

0 comments on commit ff583d1

Please sign in to comment.