Skip to content

Commit 29db0e0

Browse files
WenjieYaostevengj
andauthored
Update src/TopOptEMFocus.jl
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
1 parent d89fc5b commit 29db0e0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/TopOptEMFocus.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ function Dgdp(dgdpf; r, fem_params)
409409
return assemble_vector(l_temp, fem_params.P)
410410
end
411411

412-
# Finally, we pack up everything and rewrite it as a compact form. We also record every optimization step values.
412+
# Finally, we pack up into a single function that takes `p` and returns our objective function, and which can optionally take a `grad` vector into which the gradient (computed by Zygote by composing our rules above) can be written in-place (as required for use in the NLopt optimization package). We also optionally record the value of the objective function from every call in order to save a record of the optimization process.
413413
#
414414

415415
function gf_p(p0::Vector; r, β, η, phys_params, fem_params)

0 commit comments

Comments
 (0)