From 348fbaaea6f4c4f18153e862df8a4314df893adb Mon Sep 17 00:00:00 2001 From: Z J Wegert <60646897+zjwegert@users.noreply.github.com> Date: Sat, 16 Nov 2024 15:46:33 +1100 Subject: [PATCH] testing --- scripts/Embedded/Examples/2d_thermal.jl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/Embedded/Examples/2d_thermal.jl b/scripts/Embedded/Examples/2d_thermal.jl index cbb112f..929fd38 100644 --- a/scripts/Embedded/Examples/2d_thermal.jl +++ b/scripts/Embedded/Examples/2d_thermal.jl @@ -4,15 +4,15 @@ using GridapEmbedded, GridapEmbedded.LevelSetCutters using GridapTopOpt: StateParamIntegrandWithMeasure -path="./results/UnfittedFEM_thermal_compliance_ALM/" +path="./results/UnfittedFEM_thermal_compliance_ALM/" # _n100 rm(path,force=true,recursive=true) mkpath(path) -n = 51 +n = 51 #100 order = 1 γ = 0.1 max_steps = floor(Int,order*n/5) vf = 0.4 -α_coeff = 3#4max_steps*γ +α_coeff = 3 # 4max_steps*γ iter_mod = 1 _model = CartesianDiscreteModel((0,1,0,1),(n,n)) @@ -104,10 +104,8 @@ converged(m) = GridapTopOpt.default_al_converged( L_tol = 0.01*h_refine, C_tol = 0.01 ) -has_oscillations(m,os_it) = GridapTopOpt.default_has_oscillations(m,os_it;itlength=50, - itstart=100) optimiser = AugmentedLagrangian(pcfs,ls_evo,vel_ext,φh;debug=true, - γ,verbose=true,constraint_names=[:Vol],converged)#,has_oscillations,reinit_mod=5) + γ,verbose=true,constraint_names=[:Vol],converged,reinit_mod=5) # reinit_mod = 1 is fine for (it,uh,φh,state) in optimiser x_φ = get_free_dof_values(φh) idx = findall(isapprox(0.0;atol=10^-10),x_φ)