Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Aug 22, 2017
2 parents 405917f + dc5a6f3 commit 70ae024
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@

This is a library of callbacks for extending the solvers of DifferentialEquations.jl.

Currently only one callback is implemented.

## Usage


Expand Down
3 changes: 2 additions & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
julia 0.6.0-pre
julia 0.6.0
DiffEqBase 0.6.0
NLsolve
ForwardDiff 0.5.0
DiffBase
OrdinaryDiffEq
2 changes: 1 addition & 1 deletion src/autoabstol.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type AutoAbstolAffect{T}
mutable struct AutoAbstolAffect{T}
curmax::T
end
# Now make `affect!` for this:
Expand Down
8 changes: 4 additions & 4 deletions src/manifold.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Base.@pure function determine_chunksize(u,CS)
end
end

function autodiff_setup{CS}(f!, initial_x,chunk_size::Type{Val{CS}})
function autodiff_setup(f!, initial_x,chunk_size::Type{Val{CS}}) where CS

permf! = (fx, x) -> f!(reshape(x,size(initial_x)...), fx)

Expand All @@ -33,10 +33,10 @@ function non_autodiff_setup(f!, initial_x)
DifferentiableMultivariateFunction((x,resid)->f!(reshape(x,size(initial_x)...), resid))
end

immutable NLSOLVEJL_SETUP{CS,AD} end
struct NLSOLVEJL_SETUP{CS,AD} end
Base.@pure NLSOLVEJL_SETUP(;chunk_size=0,autodiff=true) = NLSOLVEJL_SETUP{chunk_size,autodiff}()
(p::NLSOLVEJL_SETUP)(f, u0; kwargs...) = (res=NLsolve.nlsolve(f, u0; kwargs...); res.zero)
function (p::NLSOLVEJL_SETUP{CS,AD}){CS,AD}(::Type{Val{:init}},f,u0_prototype)
function (p::NLSOLVEJL_SETUP{CS,AD})(::Type{Val{:init}},f,u0_prototype) where {CS,AD}
if AD
return non_autodiff_setup(f,u0_prototype)
else
Expand All @@ -45,7 +45,7 @@ function (p::NLSOLVEJL_SETUP{CS,AD}){CS,AD}(::Type{Val{:init}},f,u0_prototype)
end

get_chunksize(x) = 0
get_chunksize{CS,AD}(x::NLSOLVEJL_SETUP{CS,AD}) = CS
get_chunksize(x::NLSOLVEJL_SETUP{CS,AD}) where {CS,AD} = CS

#########################

Expand Down
1 change: 0 additions & 1 deletion test/REQUIRE
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
OrdinaryDiffEq
DiffEqProblemLibrary

0 comments on commit 70ae024

Please sign in to comment.