Skip to content

Commit

Permalink
fix residual calculation for oop
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Dec 2, 2018
1 parent 8d80926 commit b86aae7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/misc_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Calculate element-wise residuals
```
"""
@inline @muladd function calculate_residuals(ũ, u₀, u₁, α, ρ, internalnorm)
ũ /+ max(internalnorm(u₀), internalnorm(u₁)) * ρ)
ũ ./+ max.(internalnorm.(u₀), internalnorm.(u₁)) * ρ)
end

@inline @muladd function calculate_residuals::Array{T}, u₀::Array{T}, u₁::Array{T}, α::T2,
Expand All @@ -110,7 +110,7 @@ Calculate element-wise residuals
```
"""
@inline @muladd function calculate_residuals(u₀, u₁, α, ρ, internalnorm)
(u₁ - u₀) /+ max(internalnorm(u₀), internalnorm(u₁)) * ρ)
(u₁ - u₀) ./+ max.(internalnorm.(u₀), internalnorm.(u₁)) * ρ)
end

@inline @muladd function calculate_residuals(u₀::Array{T}, u₁::Array{T}, α::T2,
Expand Down

0 comments on commit b86aae7

Please sign in to comment.