libprima / prima

PRIMA is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell's derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA. PRIMA means Reference Implementation for Powell's methods with Modernization and Amelioration, P for Powell.
http://libprima.net
BSD 3-Clause "New" or "Revised" License
304 stars 40 forks source link

Add ftarget #63

Closed jschueller closed 1 year ago

zaikunzhang commented 1 year ago

Hi @jschueller Thank you so much for your very impressively prompt action!

zaikunzhang commented 1 year ago

Hi @jschueller ,

What is the meaning of the value attribute? When to use it and when not? I did not know it before. See the following for example.

real(C_DOUBLE), intent(in) :: xl(n)                                                                                                  
real(C_DOUBLE), intent(in), value :: ftarget                                                                                          

Thanks.

Zaikun

jschueller commented 1 year ago

the argument is passed by value instead of by reference (pointer)

zaikunzhang commented 1 year ago

the argument is passed by value instead of by reference (pointer)

It seems that we can only apply it to “scalars”, not arrays?

jschueller commented 1 year ago

yes

zaikunzhang commented 1 year ago

Great. Everything looks fine. I made a few small changes regarding the workflow files. Would you mind synchronizing them before we merge the PR? Thank you very much.

jschueller commented 1 year ago

done