Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update topology_optimization.jl #898

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/literate-gallery/topology_optimization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ end
#md nothing # hide

# Finally, we put everything together to update the density. The loop ensures the stability of the
# updated solution.
# updated solution, see [JanHacJun2019regularizedthermotopopt](@cite) equation (42) for reference.

function update_density(dh, states, mp, ρ, topology, Δh)
n_j = Int(ceil(6*mp.β/(mp.η*Δh^2))) # iterations needed for stability
Expand All @@ -287,7 +287,7 @@ function update_density(dh, states, mp, ρ, topology, Δh)

Δχ = pΨ/p_Ω + mp.β*∇²χ

χn1 = compute_χn1(χn, Δχ, ρ, mp.η, mp.χ_min)
χn1 = compute_χn1(χn, Δχ, ρ, mp.η*n_j, mp.χ_min)

if(j<n_j)
χn[:] = χn1[:]
Expand Down
Loading