From e0617b8373e2d0b271d44caf151fc6582f44eb75 Mon Sep 17 00:00:00 2001 From: albert-de-montserrat Date: Wed, 15 Nov 2023 14:36:22 +0100 Subject: [PATCH] format --- src/MiniKernels.jl | 14 +++++++------- src/rheology/Viscosity.jl | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/MiniKernels.jl b/src/MiniKernels.jl index 01c0aea2..edadf25d 100644 --- a/src/MiniKernels.jl +++ b/src/MiniKernels.jl @@ -45,13 +45,13 @@ end return (-A[i + 1, j + 1, k] + A[i + 1, j + 1, k + 1]) * _dz end # averages -@inline _av(A::T, i, j, k) where {T<:T3} = 0.125 * mysum(A, i:(i + 1), j:(j + 1), k:(k + 1)) -@inline _av_x(A::T, i, j, k) where {T<:T3} = 0.5 * (A[i, j, k] + A[i + 1, j, k]) -@inline _av_y(A::T, i, j, k) where {T<:T3} = 0.5 * (A[i, j, k] + A[i, j + 1, k]) -@inline _av_z(A::T, i, j, k) where {T<:T3} = 0.5 * (A[i, j, k] + A[i, j, k + 1]) -@inline _av_xy(A::T, i, j, k) where {T<:T3} = 0.25 * mysum(A, i:(i + 1), j:(j + 1), k:k) -@inline _av_xz(A::T, i, j, k) where {T<:T3} = 0.25 * mysum(A, i:(i + 1), j:j, k:(k + 1)) -@inline _av_yz(A::T, i, j, k) where {T<:T3} = 0.25 * mysum(A, i:i, j:(j + 1), k:(k + 1)) +@inline _av(A::T, i, j, k) where {T<:T3} = 0.125 * mysum(A, i:(i + 1), j:(j + 1), k:(k + 1)) +@inline _av_x(A::T, i, j, k) where {T<:T3} = 0.5 * (A[i, j, k] + A[i + 1, j, k]) +@inline _av_y(A::T, i, j, k) where {T<:T3} = 0.5 * (A[i, j, k] + A[i, j + 1, k]) +@inline _av_z(A::T, i, j, k) where {T<:T3} = 0.5 * (A[i, j, k] + A[i, j, k + 1]) +@inline _av_xy(A::T, i, j, k) where {T<:T3} = 0.25 * mysum(A, i:(i + 1), j:(j + 1), k:k) +@inline _av_xz(A::T, i, j, k) where {T<:T3} = 0.25 * mysum(A, i:(i + 1), j:j, k:(k + 1)) +@inline _av_yz(A::T, i, j, k) where {T<:T3} = 0.25 * mysum(A, i:i, j:(j + 1), k:(k + 1)) @inline _av_xyi(A::T, i, j, k) where {T<:T3} = 0.25 * mysum(A, (i - 1):i, (j - 1):j, k:k) @inline _av_xzi(A::T, i, j, k) where {T<:T3} = 0.25 * mysum(A, (i - 1):i, j:j, (k - 1):k) @inline _av_yzi(A::T, i, j, k) where {T<:T3} = 0.25 * mysum(A, i:i, (j - 1):j, (k - 1):k) diff --git a/src/rheology/Viscosity.jl b/src/rheology/Viscosity.jl index 8cc47b24..3d9c42af 100644 --- a/src/rheology/Viscosity.jl +++ b/src/rheology/Viscosity.jl @@ -146,7 +146,7 @@ end # we need strain rate not to be zero, otherwise we get NaNs εII_0 = allzero(εij_normal...) * 1e-18 - + # # argument fields at local index args_ijk = local_viscosity_args(args, I...)