Skip to content

Commit 70c44ee

Browse files
Effective viscosity bug (#133)
* Effective viscosity bug Fixes the bug in `compute_elastoviscosity_εII` reported in #132 * Fix viscosity tests
1 parent 89e63cd commit 70c44ee

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Viscosity/Viscosity.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,6 @@ end
178178
Base.@_inline_meta
179179
η = 0.0
180180
Base.@nexprs $N i -> !isplastic(v[i]) &&+= inv(fn(v[i], II, args)))
181-
return η
181+
return inv(η)
182182
end
183-
end
183+
end

test/test_Viscosity.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ using Test, GeoParams
1717
@test η0 ==
1818
compute_viscosity_εII(rheology, εII, args) ==
1919
compute_viscosity_τII(rheology, τII, args)
20-
@test 1(1 / η0 + 1 / el.G.val / dt) ==
20+
@test 1/(1 / η0 + 1 / el.G.val / dt) ==
2121
compute_elastoviscosity_εII(rheology, εII, args) ==
2222
compute_elastoviscosity_τII(rheology, τII, args)
2323

@@ -61,7 +61,7 @@ using Test, GeoParams
6161
@test η ==
6262
compute_viscosity_τII(rheology, τII, args) ==
6363
compute_viscosity_εII(rheology, εII, args)
64-
@test 1(1 / η + 1 / el.G.val / dt) ==
64+
@test 1/(1 / η + 1 / el.G.val / dt) ==
6565
compute_elastoviscosity_εII(rheology, εII, args) ==
6666
compute_elastoviscosity_τII(rheology, τII, args)
6767
end

0 commit comments

Comments
 (0)