Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

fix tolerances #1

Merged
merged 2 commits into from
Nov 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: CI
on:
pull_request:
branches:
- master
- main
push:
branches:
- master
- main
jobs:
test:
runs-on: ubuntu-latest
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/Documentation.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/Downstream.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: IntegrationTest
on:
push:
branches: [master]
branches: [main]
tags: [v*]
pull_request:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: format-check
on:
push:
branches:
- 'master'
- 'main'
- 'release-'
tags: '*'
pull_request:
Expand Down
8 changes: 4 additions & 4 deletions src/raphson.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ struct SimpleNewtonRaphson{CS, AD, FDT} <: AbstractNewtonAlgorithm{CS, AD, FDT}
end

function SciMLBase.solve(prob::NonlinearProblem,
alg::SimpleNewtonRaphson, args...; xatol = nothing,
xrtol = nothing,
alg::SimpleNewtonRaphson, args...; abstol = nothing,
reltol = nothing,
maxiters = 1000, kwargs...)
f = Base.Fix2(prob.f, prob.p)
x = float(prob.u0)
Expand All @@ -19,8 +19,8 @@ function SciMLBase.solve(prob::NonlinearProblem,
error("SimpleNewtonRaphson currently only supports out-of-place nonlinear problems")
end

atol = xatol !== nothing ? xatol : oneunit(eltype(T)) * (eps(one(eltype(T))))^(4 // 5)
rtol = xrtol !== nothing ? xrtol : eps(one(eltype(T)))^(4 // 5)
atol = abstol !== nothing ? abstol : oneunit(eltype(T)) * (eps(one(eltype(T))))^(4 // 5)
rtol = reltol !== nothing ? reltol : eps(one(eltype(T)))^(4 // 5)

if typeof(x) <: Number
xo = oftype(one(eltype(x)), Inf)
Expand Down