Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
albert-de-montserrat committed May 3, 2024
1 parent ae5b77f commit bc20c75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/stokes/Stokes2D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ function _solve!(

# compute buoyancy forces and viscosity
compute_ρg!(ρg[end], phase_ratios, rheology, args)
compute_viscosity!(stokes, phase_ratios, args, rheology, cutoff_visc)
compute_viscosity!(stokes, phase_ratios, args, rheology, viscosity_cutoff)

while iter < 2 || (err > ϵ && iter iterMax)
wtime0 += @elapsed begin
Expand Down Expand Up @@ -508,7 +508,7 @@ function _solve!(

# compute buoyancy forces and viscosity
compute_ρg!(ρg[end], phase_ratios, rheology, args)
compute_viscosity!(stokes, phase_ratios, args, rheology, cutoff_visc)
compute_viscosity!(stokes, phase_ratios, args, rheology, viscosity_cutoff)

while iter iterMax
iterMin < iter && err < ϵ && break
Expand Down
9 changes: 5 additions & 4 deletions src/stokes/Stokes3D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ function _solve!(
nout=500,
b_width=(4, 4, 4),
viscosity_relaxation=1e-2,
viscosity_cutoff = (-Inf, Inf),
verbose=true,
kwargs...,
) where {T}
Expand Down Expand Up @@ -204,7 +205,7 @@ function _solve!(

# compute buoyancy forces and viscosity
compute_ρg!(ρg[end], phase_ratios, rheology, args)
compute_viscosity!(stokes, phase_ratios, args, rheology, cutoff_visc)
compute_viscosity!(stokes, phase_ratios, args, rheology, viscosity_cutoff)

# solver loop
wtime0 = 0.0
Expand Down Expand Up @@ -232,7 +233,7 @@ function _solve!(
# Update buoyancy
update_ρg!(ρg[3], rheology, args)

compute_viscosity!(
update_viscosity!(
stokes,
phase_ratios,
args,
Expand Down Expand Up @@ -388,7 +389,7 @@ function _solve!(

# compute buoyancy forces and viscosity
compute_ρg!(ρg[end], phase_ratios, rheology, args)
compute_viscosity!(stokes, phase_ratios, args, rheology, cutoff_visc)
compute_viscosity!(stokes, phase_ratios, args, rheology, viscosity_cutoff)

while iter < 2 || (err > ϵ && iter iterMax)
wtime0 += @elapsed begin
Expand Down Expand Up @@ -419,7 +420,7 @@ function _solve!(
update_ρg!(ρg[end], phase_ratios, rheology, args)

# Update viscosity
compute_viscosity!(
update_viscosity!(
stokes,
phase_ratios,
args,
Expand Down

0 comments on commit bc20c75

Please sign in to comment.