Skip to content

Commit

Permalink
fix shear heating
Browse files Browse the repository at this point in the history
  • Loading branch information
albert-de-montserrat committed Feb 16, 2024
1 parent 886ab7e commit 122a707
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/thermal_diffusion/DiffusionPT.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## GeoParams

# include("Rheology.jl")
include("../rheology/GeoParams.jl")

@inline get_phase(x::PhaseRatio) = x.center
@inline get_phase(x) = x
Expand Down
4 changes: 2 additions & 2 deletions src/thermal_diffusion/Shearheating.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@parallel_indices (I...) function compute_shear_heating!(
shear_heating, τ::NTuple{N,T}, τ_old::NTuple{N,T}, ε::NTuple{N,T}, rheology, dt
) where {N,T}
_Gdt = inv(get_G(rheology) * dt)
_Gdt = inv(get_shear_modulus(rheology) * dt)
τij, τij_o, εij = cache_tensors(τ, τ_old, ε, I...)
εij_el = @. 0.5 * ((τij - τij_o) * _Gdt)
shear_heating[I...] = compute_shearheating(rheology, τij, εij, εij_el)
Expand All @@ -18,7 +18,7 @@ end
dt,
) where {N,T}
phase = @inbounds phase_ratios[I...]
_Gdt = inv(fn_ratio(get_G, rheology, phase) * dt)
_Gdt = inv(fn_ratio(get_shear_modulus, rheology, phase) * dt)
τij, τij_o, εij = cache_tensors(τ, τ_old, ε, I...)
εij_el = @. 0.5 * ((τij - τij_o) * _Gdt)
shear_heating[I...] = compute_shearheating(rheology, phase, τij, εij, εij_el)
Expand Down

0 comments on commit 122a707

Please sign in to comment.