Skip to content

Commit bbd4946

Browse files
Merge pull request #351 from SciML/immutable
Use the ImmutableODEProblem from SciMLBase
2 parents 64b9ac0 + c8692e2 commit bbd4946

File tree

4 files changed

+2
-133
lines changed

4 files changed

+2
-133
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ MuladdMacro = "0.2"
5252
Parameters = "0.12"
5353
RecursiveArrayTools = "2, 3"
5454
Requires = "1.0"
55-
SciMLBase = "2.86.1"
55+
SciMLBase = "2.92"
5656
Setfield = "1"
5757
SimpleDiffEq = "1"
5858
StaticArrays = "1"

src/DiffEqGPU.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ using ForwardDiff
2323
import StaticArrays: StaticVecOrMat, @_inline_meta
2424
# import LinearAlgebra: \
2525
import StaticArrays: LU, StaticLUMatrix, arithmetic_closure
26+
import SciMLBase: ImmutableODEProblem
2627

2728
abstract type EnsembleArrayAlgorithm <: SciMLBase.EnsembleAlgorithm end
2829
abstract type EnsembleKernelAlgorithm <: SciMLBase.EnsembleAlgorithm end
@@ -37,7 +38,6 @@ include("ensemblegpuarray/kernels.jl")
3738
include("ensemblegpuarray/problem_generation.jl")
3839
include("ensemblegpuarray/lowerlevel_solve.jl")
3940

40-
include("ensemblegpukernel/problems/ode_problems.jl")
4141
include("ensemblegpukernel/callbacks.jl")
4242
include("ensemblegpukernel/lowerlevel_solve.jl")
4343
include("ensemblegpukernel/gpukernel_algorithms.jl")

src/ensemblegpukernel/integrators/nonstiff/types.jl

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
## Fixed TimeStep Integrator
22

3-
function Adapt.adapt_structure(to, prob::Union{ODEProblem{<:Any, <:Any, iip}, ImmutableODEProblem{<:Any, <:Any, iip}}) where {iip}
4-
ImmutableODEProblem{iip, true}(adapt(to, prob.f),
5-
adapt(to, prob.u0),
6-
adapt(to, prob.tspan),
7-
adapt(to, prob.p);
8-
adapt(to, prob.kwargs)...)
9-
end
10-
11-
function Adapt.adapt_structure(to, f::ODEFunction{iip}) where {iip}
12-
if f.mass_matrix !== I && f.initialization_data !== nothing
13-
error("Adaptation to GPU failed: DAEs of ModelingToolkit currently not supported.")
14-
end
15-
ODEFunction{iip, SciMLBase.FullSpecialize}(f.f, jac = f.jac, mass_matrix = f.mass_matrix,
16-
initializeprobmap = f.initializeprobmap,
17-
initializeprobpmap = f.initializeprobpmap,
18-
update_initializeprob! = f.update_initializeprob!,
19-
initialization_data = nothing, initializeprob = nothing)
20-
end
21-
223
mutable struct GPUTsit5Integrator{IIP, S, T, ST, P, F, TS, CB, AlgType} <:
234
DiffEqBase.AbstractODEIntegrator{AlgType, IIP, S, T}
245
alg::AlgType

src/ensemblegpukernel/problems/ode_problems.jl

Lines changed: 0 additions & 112 deletions
This file was deleted.

0 commit comments

Comments
 (0)