Skip to content

Commit

Permalink
Make the equations more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielVandH committed Jul 21, 2023
1 parent e84dc6e commit 9597781
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "EpithelialDynamics1D"
uuid = "ace8a2d7-7779-48a6-a8a4-cf6831a7e55b"
authors = ["Daniel VandenHeuvel <danj.vandenheuvel@gmail.com>"]
version = "1.7.0"
version = "1.7.1"

[deps]
CommonSolve = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2"
Expand Down
16 changes: 8 additions & 8 deletions src/equations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ function cell_odes!(dr, r, prob, t)
p = prob.force_law_parameters
for i in (firstindex(dr)+1):(lastindex(dr)-1)
δᵢ₋₁ = r[i] - r[i-1]
δᵢ = r[i+1] - r[i]
Fᵢ₋₁ = F(δᵢ₋₁, p)
Fᵢ = F(δᵢ, p)
dr[i] = η⁻¹ * (Fᵢ₋₁ - Fᵢ)
δᵢ₊₁ = r[i] - r[i+1]
Fᵢ₋₁ = F(abs(δᵢ₋₁), p) * sign(δᵢ₋₁)
Fᵢ₊₁ = F(abs(δᵢ₊₁), p) * sign(δᵢ₊₁)
dr[i] = η⁻¹ * (Fᵢ₋₁ + Fᵢ₊₁)
end
if !fix_left
δ₁ = r[begin+1] - r[begin]
F₁ = F(δ₁, p)
dr[begin] = -η⁻¹ * F₁
δ₁ = r[begin] - r[begin+1]
F₁ = F(abs(δ₁), p) * sign(δ₁)
dr[begin] = η⁻¹ * F₁
else
dr[begin] = zero(dr[begin])
end
if !fix_right
δₙ₋₁ = r[end] - r[end-1]
Fₙ₋₁ = F(δₙ₋₁, p)
Fₙ₋₁ = F(abs(δₙ₋₁), p) * sign(δₙ₋₁)
dr[end] = η⁻¹ * Fₙ₋₁
else
dr[end] = zero(dr[end])
Expand Down

0 comments on commit 9597781

Please sign in to comment.