From 886ab7eb812f21f7d19e2adf8dc488006fb5236a Mon Sep 17 00:00:00 2001 From: Albert de Montserrat <58044444+albert-de-montserrat@users.noreply.github.com> Date: Wed, 14 Feb 2024 22:59:03 +0100 Subject: [PATCH] initialize viscosity with ones to avoid NaNs (#105) --- miniapps/benchmarks/stokes2D/shear_heating/Shearheating2D.jl | 2 +- miniapps/benchmarks/stokes3D/shear_heating/Shearheating3D.jl | 2 +- miniapps/convection/Particles2D/Layered_convection2D.jl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/miniapps/benchmarks/stokes2D/shear_heating/Shearheating2D.jl b/miniapps/benchmarks/stokes2D/shear_heating/Shearheating2D.jl index 7e81bd14..40221576 100644 --- a/miniapps/benchmarks/stokes2D/shear_heating/Shearheating2D.jl +++ b/miniapps/benchmarks/stokes2D/shear_heating/Shearheating2D.jl @@ -119,7 +119,7 @@ function main2D(igg; ar=8, ny=16, nx=ny*8, figdir="figs2D", save_vtk =false) @parallel init_P!(stokes.P, ρg[2], xci[2]) # Rheology - η = @zeros(ni...) + η = @ones(ni...) args = (; T = thermal.Tc, P = stokes.P, dt = Inf) @parallel (@idx ni) compute_viscosity!( η, 1.0, phase_ratios.center, @strain(stokes)..., args, rheology, (-Inf, Inf) diff --git a/miniapps/benchmarks/stokes3D/shear_heating/Shearheating3D.jl b/miniapps/benchmarks/stokes3D/shear_heating/Shearheating3D.jl index 16b5e0e3..b11461cc 100644 --- a/miniapps/benchmarks/stokes3D/shear_heating/Shearheating3D.jl +++ b/miniapps/benchmarks/stokes3D/shear_heating/Shearheating3D.jl @@ -107,7 +107,7 @@ function main3D(igg; ar=8, ny=16, nx=ny*8, figdir="figs3D", save_vtk =false) @parallel init_P!(stokes.P, ρg[3], xci[3]) # Rheology - η = @zeros(ni...) + η = @ones(ni...) args = (; T = thermal.Tc, P = stokes.P, dt = Inf) @parallel (@idx ni) compute_viscosity!( η, 1.0, phase_ratios.center, @strain(stokes)..., args, rheology, (-Inf, Inf) diff --git a/miniapps/convection/Particles2D/Layered_convection2D.jl b/miniapps/convection/Particles2D/Layered_convection2D.jl index 28d383e3..861fba23 100644 --- a/miniapps/convection/Particles2D/Layered_convection2D.jl +++ b/miniapps/convection/Particles2D/Layered_convection2D.jl @@ -160,7 +160,7 @@ function main2D(igg; ar=8, ny=16, nx=ny*8, figdir="figs2D", save_vtk =false) @parallel init_P!(stokes.P, ρg[2], xci[2]) end # Rheology - η = @zeros(ni...) + η = @ones(ni...) args = (; T = thermal.Tc, P = stokes.P, dt = Inf) @parallel (@idx ni) compute_viscosity!( η, 1.0, phase_ratios.center, @strain(stokes)..., args, rheology, (1e16, 1e24)