Skip to content

Commit c9a4db2

Browse files
committed
Uses arg names instead of underscore because it breaks (unsure why not caught by tests). Also renamed the rate-of-strain tensor function to S.
1 parent 35c1b23 commit c9a4db2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Flow.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ upperBoundary!(r,u,Φ,ν,i,j,N,::Val{true}) = @loop r[I-δ(j,I),i] -= Φ[CIj(j,I
6464
6565
Adds a space-time acceleration field g(i,x,t) and velocity field U(i,x,t) such that `rᵢ += gᵢ(i,x,t)+dUᵢ(i,x,t)/dt` at time `t=sum(dt)` to vector field `r`.
6666
"""
67-
accelerate!(_,_,::Nothing,::Union{Nothing,Tuple}) = nothing
67+
accelerate!(r,t,::Nothing,::Union{Nothing,Tuple}) = nothing
6868
accelerate!(r,t,f) = for i 1:last(size(r))
6969
@loop r[I,i] += f(i,loc(i,I,eltype(r)),t) over I CartesianIndices(Base.front(size(r)))
7070
end
@@ -181,5 +181,5 @@ end
181181
User defined function using `udf::Function` to operate on `flow::Flow` during the predictor and corrector step, in sync with time `t`.
182182
Keyword arguments must be passed to `sim_step!` for them to be carried over the actual function call.
183183
"""
184-
udf!(_,::Nothing,_) = nothing
185-
udf!(flow::Flow,force!::Function,t; kwargs...) = force!(flow,t; kwargs...)
184+
udf!(flow,::Nothing,t; kwargs...) = nothing
185+
udf!(flow,force!::Function,t; kwargs...) = force!(flow,t; kwargs...)

src/Metrics.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ function pressure_force(p,df,body,t=0,T=promote_type(Float64,eltype(p)))
100100
end
101101

102102
"""
103-
∇²u(I::CartesianIndex,u)
103+
S(I::CartesianIndex,u)
104104
105105
Rate-of-strain tensor.
106106
"""
107-
∇²u(I::CartesianIndex{2},u) = @SMatrix [(i,j,I,u)+(j,i,I,u) for i 1:2, j 1:2]
108-
∇²u(I::CartesianIndex{3},u) = @SMatrix [(i,j,I,u)+(j,i,I,u) for i 1:3, j 1:3]
107+
S(I::CartesianIndex{2},u) = @SMatrix [0.5*((i,j,I,u)+(j,i,I,u)) for i 1:2, j 1:2]
108+
S(I::CartesianIndex{3},u) = @SMatrix [0.5*((i,j,I,u)+(j,i,I,u)) for i 1:3, j 1:3]
109109
"""
110110
viscous_force(sim::Simulation)
111111

0 commit comments

Comments
 (0)