Skip to content

Commit

Permalink
Fix some typos
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Seiler <[email protected]>
  • Loading branch information
goggle committed Mar 27, 2023
1 parent cd2f814 commit 43193a6
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- This repository follows the [SciMLStyle](https://github.com/SciML/SciMLStyle) and the SciML [ColPrac](https://github.com/SciML/ColPrac).
- Please run `using JuliaFormatter, OrdinaryDiffEq; format(joinpath(dirname(pathof(OrdinaryDiffEq)), ".."))` before commiting.
- 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/

2 changes: 1 addition & 1 deletion src/caches/linear_nonlinear_caches.jl
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ function alg_cache_exprb(alg::OrdinaryDiffEqAdaptiveExponentialAlgorithm, u,
::Type{uEltypeNoUnits}, uprev, f, t, p, du1, tmp, dz,
plist) where {uEltypeNoUnits}
if f isa SplitFunction
error("Algorithm $alg cannnot be used for split problems. Consider reformat to a regular `ODEProblem`")
error("Algorithm $alg cannot be used for split problems. Consider reformat to a regular `ODEProblem`")
end
n = length(u)
T = eltype(u)
Expand Down
2 changes: 1 addition & 1 deletion src/derivative_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ function build_J_W(alg, u, uprev, p, t, dt, f::F, ::Type{uEltypeNoUnits},
!LinearSolve.needs_concrete_A(alg.linsolve))
# If the user has chosen GMRES but no sparse Jacobian, assume that the dense
# Jacobian is a bad idea and create a fully matrix-free solver. This can
# be overriden with concrete_jac.
# be overridden with concrete_jac.

_f = islin ? (isode ? f.f : f.f1.f) : f
jacvec = SparseDiffTools.JacVec(UJacobianWrapper(_f, t, p), copy(u),
Expand Down
6 changes: 3 additions & 3 deletions src/derivative_wrappers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const FIRST_AUTODIFF_TGRAD_MESSAGE = """
3. Defining analytical Jacobians and time gradients. More details can be
found at https://docs.sciml.ai/DiffEqDocs/stable/types/ode_types/#SciMLBase.ODEFunction
Note 1: this failure occured inside of the time gradient function. These
Note 1: this failure occurred inside of the time gradient function. These
time gradients are only required by Rosenbrock methods (`Rosenbrock23`,
`Rodas4`, etc.) are are done by automatic differentiation w.r.t. the
argument `t`. If your function is compatible with automatic differentiation
Expand Down Expand Up @@ -79,7 +79,7 @@ function derivative!(df::AbstractArray{<:Number}, f,
x::Union{Number, AbstractArray{<:Number}}, fx::AbstractArray{<:Number},
integrator, grad_config)
alg = unwrap_alg(integrator, true)
tmp = length(x) # We calculate derivtive for all elements in gradient
tmp = length(x) # We calculate derivative for all elements in gradient
if alg_autodiff(alg)
T = if standardtag(alg)
typeof(ForwardDiff.Tag(OrdinaryDiffEqTag(), eltype(df)))
Expand Down Expand Up @@ -120,7 +120,7 @@ end
function derivative(f, x::Union{Number, AbstractArray{<:Number}},
integrator)
local d
tmp = length(x) # We calculate derivtive for all elements in gradient
tmp = length(x) # We calculate derivative for all elements in gradient
alg = unwrap_alg(integrator, true)
if alg_autodiff(alg)
integrator.stats.nf += 1
Expand Down
2 changes: 1 addition & 1 deletion src/generic_rosenbrock.jl
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ end
Ros4dummyTableau()
Generate a dummy tableau for ROS4 methods. It can be considered as performing elementwise OR to the masks
of those sepecific tableaus: `Ros4dummyTableau()==_masktab(RosShamp4Tableau()) OR _masktab(Veldd4Tableau()) OR ...`
of those specific tableaus: `Ros4dummyTableau()==_masktab(RosShamp4Tableau()) OR _masktab(Veldd4Tableau()) OR ...`
ROS4 methods have the property of a4j==a3j so a is a 3*3 matrix instead of a 4*4 matrix and c is a 1*3 vector instead of a 1*4 vector.
"""
function Ros4dummyTableau()#create a tabmask for all ROS4 methods where false->0,true->non-0
Expand Down
2 changes: 1 addition & 1 deletion src/integrators/integrator_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ function handle_tstop!(integrator)
end

function reset_fsal!(integrator)
# Under these condtions, these algorithms are not FSAL anymore
# Under these conditions, these algorithms are not FSAL anymore
integrator.stats.nf += 1

if integrator.sol.prob isa DAEProblem
Expand Down
24 changes: 12 additions & 12 deletions src/perform_step/extrapolation_perform_step.jl
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ function perform_step!(integrator, cache::ImplicitEulerExtrapolationCache,
integrator.opts.abstol, integrator.opts.reltol,
integrator.opts.internalnorm, t)
integrator.EEst = integrator.opts.internalnorm(cache.res, t)
cache.n_curr = i # Update chache's n_curr for stepsize_controller_internal!
cache.n_curr = i # Update cache's n_curr for stepsize_controller_internal!
stepsize_controller_internal!(integrator, alg) # Update cache.Q
end

Expand Down Expand Up @@ -648,7 +648,7 @@ function perform_step!(integrator, cache::ImplicitEulerExtrapolationConstantCach
integrator.opts.reltol, integrator.opts.internalnorm,
t)
integrator.EEst = integrator.opts.internalnorm(res, t)
cache.n_curr = i # Update chache's n_curr for stepsize_controller_internal!
cache.n_curr = i # Update cache's n_curr for stepsize_controller_internal!
stepsize_controller_internal!(integrator, alg) # Update cache.Q
end

Expand Down Expand Up @@ -864,7 +864,7 @@ function perform_step!(integrator, cache::ExtrapolationMidpointDeuflhardCache,
integrator.opts.abstol, integrator.opts.reltol,
integrator.opts.internalnorm, t)
integrator.EEst = integrator.opts.internalnorm(cache.res, t)
cache.n_curr = i # Update chache's n_curr for stepsize_controller_internal!
cache.n_curr = i # Update cache's n_curr for stepsize_controller_internal!
stepsize_controller_internal!(integrator, alg) # Update cache.Q
end

Expand Down Expand Up @@ -1066,7 +1066,7 @@ function perform_step!(integrator, cache::ExtrapolationMidpointDeuflhardConstant
integrator.opts.reltol, integrator.opts.internalnorm,
t)
integrator.EEst = integrator.opts.internalnorm(res, t)
cache.n_curr = i # Update chache's n_curr for stepsize_controller_internal!
cache.n_curr = i # Update cache's n_curr for stepsize_controller_internal!
stepsize_controller_internal!(integrator, alg) # Update cache.Q
end

Expand Down Expand Up @@ -1439,7 +1439,7 @@ function perform_step!(integrator, cache::ImplicitDeuflhardExtrapolationCache,
integrator.opts.abstol, integrator.opts.reltol,
integrator.opts.internalnorm, t)
integrator.EEst = integrator.opts.internalnorm(cache.res, t)
cache.n_curr = i # Update chache's n_curr for stepsize_controller_internal!
cache.n_curr = i # Update cache's n_curr for stepsize_controller_internal!
stepsize_controller_internal!(integrator, alg) # Update cache.Q
end

Expand Down Expand Up @@ -1719,7 +1719,7 @@ function perform_step!(integrator, cache::ImplicitDeuflhardExtrapolationConstant
integrator.opts.reltol, integrator.opts.internalnorm,
t)
integrator.EEst = integrator.opts.internalnorm(res, t)
cache.n_curr = i # Update chache's n_curr for stepsize_controller_internal!
cache.n_curr = i # Update cache's n_curr for stepsize_controller_internal!
stepsize_controller_internal!(integrator, alg) # Update cache.Q
end

Expand Down Expand Up @@ -1937,7 +1937,7 @@ function perform_step!(integrator, cache::ExtrapolationMidpointHairerWannerCache
integrator.opts.abstol, integrator.opts.reltol,
integrator.opts.internalnorm, t)
integrator.EEst = integrator.opts.internalnorm(cache.res, t)
cache.n_curr = i # Update chache's n_curr for stepsize_controller_internal!
cache.n_curr = i # Update cache's n_curr for stepsize_controller_internal!
stepsize_controller_internal!(integrator, alg) # Update cache.Q
end

Expand Down Expand Up @@ -2140,7 +2140,7 @@ function perform_step!(integrator, cache::ExtrapolationMidpointHairerWannerConst
integrator.opts.reltol, integrator.opts.internalnorm,
t)
integrator.EEst = integrator.opts.internalnorm(res, t)
cache.n_curr = i # Update chache's n_curr for stepsize_controller_internal!
cache.n_curr = i # Update cache's n_curr for stepsize_controller_internal!
stepsize_controller_internal!(integrator, alg) # Update cache.Q
end

Expand Down Expand Up @@ -2407,7 +2407,7 @@ function perform_step!(integrator, cache::ImplicitHairerWannerExtrapolationConst
integrator.opts.reltol, integrator.opts.internalnorm,
t)
integrator.EEst = integrator.opts.internalnorm(res, t)
cache.n_curr = i # Update chache's n_curr for stepsize_controller_internal!
cache.n_curr = i # Update cache's n_curr for stepsize_controller_internal!
stepsize_controller_internal!(integrator, alg) # Update cache.Q
end

Expand Down Expand Up @@ -2792,7 +2792,7 @@ function perform_step!(integrator, cache::ImplicitHairerWannerExtrapolationCache
integrator.opts.abstol, integrator.opts.reltol,
integrator.opts.internalnorm, t)
integrator.EEst = integrator.opts.internalnorm(cache.res, t)
cache.n_curr = i # Update chache's n_curr for stepsize_controller_internal!
cache.n_curr = i # Update cache's n_curr for stepsize_controller_internal!
stepsize_controller_internal!(integrator, alg) # Update cache.Q
end

Expand Down Expand Up @@ -3102,7 +3102,7 @@ function perform_step!(integrator,
integrator.opts.reltol, integrator.opts.internalnorm,
t)
integrator.EEst = integrator.opts.internalnorm(res, t)
cache.n_curr = i # Update chache's n_curr for stepsize_controller_internal!
cache.n_curr = i # Update cache's n_curr for stepsize_controller_internal!
stepsize_controller_internal!(integrator, alg) # Update cache.Q
end

Expand Down Expand Up @@ -3500,7 +3500,7 @@ function perform_step!(integrator, cache::ImplicitEulerBarycentricExtrapolationC
integrator.opts.abstol, integrator.opts.reltol,
integrator.opts.internalnorm, t)
integrator.EEst = integrator.opts.internalnorm(cache.res, t)
cache.n_curr = i # Update chache's n_curr for stepsize_controller_internal!
cache.n_curr = i # Update cache's n_curr for stepsize_controller_internal!
stepsize_controller_internal!(integrator, alg) # Update cache.Q
end

Expand Down
2 changes: 1 addition & 1 deletion src/perform_step/rkn_perform_step.jl
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ end
if integrator.iter < 2 && !integrator.u_modified
perform_step!(integrator, Nystrom4VelocityIndependentConstantCache())
k = integrator.fsallast
k1cache = ArrayParition((k.x[1], f.f1(duprev, uprev, p, t + c1 * dt)))
k1cache = ArrayPartition((k.x[1], f.f1(duprev, uprev, p, t + c1 * dt)))
kdu = uprev + dt * (c1 * duprev + dt * a21 * k1cache.x[1])
k₂.x[1] = f.f1(duprev, kdu, p, t + c1 * dt)
integrator.stats.nf += 2
Expand Down
4 changes: 2 additions & 2 deletions src/tableaus/sdirk_tableaus.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Coefficient on y₁-y₀:
6θ*(1-θ)/dt - (- (6 + 4.5sqrt(2))) # - (6 + 4.5sqrt(2)) given by Shampine
# Write only in terms of z primatives
# Write only in terms of z primitives
y₀ = uprev
y₁ = uprev + γ*z₁ + γ*z₂
y₁-y₀ = γ*z₁ + γ*z₂
Expand Down Expand Up @@ -337,7 +337,7 @@ Coefficient on z₂:
Coefficient on y₁-y₀:
(6θ*(1-θ)/dt)
# Write only in terms of z primatives
# Write only in terms of z primitives
y₁ = uprev + a21*z₁ + γ*z₂
y₀ = uprev + γ*z₁
y₁-y₀ = (a21-γ)*z₁ + γ*z₂
Expand Down
2 changes: 1 addition & 1 deletion src/tableaus/verner_tableaus.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3262,7 +3262,7 @@ function Vern9InterpolationCoefficients(T)
end

"""
From Verner's Webiste
From Verner's Website
"""
struct Vern9Tableau{T, T2}
c1::T2
Expand Down
2 changes: 1 addition & 1 deletion test/algconvergence/adams_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ for i in 1:2
for i in 1:3
step!(integrator)
end
# in perform_step, after swaping array using pointer, ϕstar_nm1 points to ϕstar_n
# in perform_step, after swapping array using pointer, ϕstar_nm1 points to ϕstar_n
@test integrator.cache.ϕstar_nm1 == fixed_step_ϕstar(integrator.sol.k)
step!(integrator)
@test integrator.cache.ϕstar_nm1 == fixed_step_ϕstar(integrator.sol.k)
Expand Down
2 changes: 1 addition & 1 deletion test/algconvergence/ode_firk_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ for iip in (true, false)
@test length(solve(remake(vanstiff, p = 1e10), RadauIIA5())) < 190
end

##Tests fot RadauIIA3
##Tests for RadauIIA3
for prob in [prob_ode_linear, prob_ode_2Dlinear]
dts = 1 ./ 2 .^ (8:-1:1)
sim = test_convergence(dts, prob, RadauIIA3())
Expand Down
4 changes: 2 additions & 2 deletions test/algconvergence/rkc_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ end
#default ROCK2
sim = test_convergence(dts, prob, ROCK2())
@test sim.𝒪est[:l∞]2 atol=testTol
#testing ROCK2 for different minimum stages to insure that the constatns are right
#testing ROCK2 for different minimum stages to insure that the constants are right
sim = test_convergence(dts, prob, ROCK2(min_stages = 5))
@test sim.𝒪est[:l∞]2 atol=testTol
sim = test_convergence(dts, prob, ROCK2(min_stages = 10))
Expand All @@ -70,7 +70,7 @@ end
println("ROCK4")
sim = test_convergence(dts, prob, ROCK4())
@test sim.𝒪est[:l∞]4 atol=testTol
#testing ROCK4 for different minimum stages to insure that the constatns are right
#testing ROCK4 for different minimum stages to insure that the constants are right
sim = test_convergence(dts, prob, ROCK4(min_stages = 6))
@test sim.𝒪est[:l∞]4 atol=testTol
sim = test_convergence(dts, prob, ROCK4(min_stages = 10))
Expand Down
2 changes: 1 addition & 1 deletion test/algconvergence/split_methods_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ testTol = 0.2

Random.seed!(100)

# Test that the infrustructure works
# Test that the infrastructure works

f1 = (u, p, t) -> 2u
f2 = (u, p, t) -> 2u
Expand Down
2 changes: 1 addition & 1 deletion test/algconvergence/symplectic_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Test, LinearAlgebra
using OrdinaryDiffEq, DiffEqBase

# algoritm, dq(p) != p, convergence order
# algorithm, dq(p) != p, convergence order
const ALGOS = ((SymplecticEuler, true, 1),
(VelocityVerlet, false, 2),
(VerletLeapfrog, true, 2),
Expand Down
2 changes: 1 addition & 1 deletion test/interface/jacobian_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function rober(du, u, p, t)
k₁, k₂, k₃, check = p
if check && eltype(u) <: ForwardDiff.Dual && ForwardDiff.npartials(u[1]) != chunksize
@show ForwardDiff.npartials(u[1]), chunksize
error("chunk_size is not as specifed")
error("chunk_size is not as specified")
end

du[1] = -k₁ * y₁ + k₃ * y₂ * y₃
Expand Down
2 changes: 1 addition & 1 deletion test/interface/units_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ end

@testset "Without ArrayPartition" begin
# coordinate: u = [position, momentum]
# parameters: p = [mass, force constanst]
# parameters: p = [mass, force constant]
function f_harmonic!(du, u, p, t)
du[1] = u[2] / p[1]
du[2] = -p[2] * u[1]
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ end
@time @safetestset "save_idxs Tests" begin include("interface/ode_saveidxs_tests.jl") end
@time @safetestset "Scalar Handling Tests" begin include("interface/scalar_handling_tests.jl") end
@time @safetestset "Static Array Tests" begin include("interface/static_array_tests.jl") end
@time @safetestset "u_modifed Tests" begin include("interface/umodified_test.jl") end
@time @safetestset "u_modified Tests" begin include("interface/umodified_test.jl") end
@time @safetestset "Composite Algorithm Tests" begin include("interface/composite_algorithm_test.jl") end
@time @safetestset "Complex Tests" begin include("interface/complex_tests.jl") end
@time @safetestset "Ndim Complex Tests" begin include("interface/ode_ndim_complex_tests.jl") end
Expand Down

0 comments on commit 43193a6

Please sign in to comment.