Skip to content

Commit

Permalink
bugfix CST
Browse files Browse the repository at this point in the history
  • Loading branch information
carlodev committed Sep 27, 2024
1 parent 565e1b0 commit dbd035c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/OptimizationCST.jl
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ function increase_resolution_airfoil(filename::String, N::Int64; dz = 0.0, w0 =

split_idx = 4

ub = vcat(zeros(Int64, count(w0.<0)), ones(Int64,count(w0.>0)))
lb = ub .- 1
params = ( split_idx, xl,xu,dz,y0)
prob = Optimization.OptimizationProblem(error_function, w0, params, lb = [-1,-1,-1,0,0,0,0,0,0], ub = [0,0,0,1,1,1,1,1,1])
prob = Optimization.OptimizationProblem(error_function, w0, params, lb =lb, ub = ub)
sol = solve(prob, BBO_adaptive_de_rand_1_bin_radiuslimited(), maxiters = maxiters, maxtime = maxtime)
sol = collect(sol)
wl, wu = compute_wlwu(sol, split_idx)
Expand All @@ -142,4 +144,4 @@ function increase_resolution_airfoil(filename::String, N::Int64; dz = 0.0, w0 =
write_csv_cst(x,y,filename)

return x,y,wl,wu
end
end

0 comments on commit dbd035c

Please sign in to comment.