Hello Steven, thank you very much for your answer. A couple of questions: -Does the magnitude of the gradient has to be correct or what is important is just the direction?(my sensitivity gives just the direction..) -At the moment my sensitivity(gradient) is evaluated on every mesh points and thus there is some sort of "interpolation" to project it on my control points (which are linked to the shape parametrization). Thus for sure in this projection process there is some "fitting error" and for sure there is also some noise coming from the CFD calculations. Do you think this is enough to cause the methods to fail?
If i choose by myself the step h (for example fixed) and change the control points at every iteration with h*grad i do manage to reduce my objective function smoothly. I just wanted to sue the Nlopt algorithms because they should be able to choose an optimal step and also take care of constraints. Am I missing something? Thank you very much again and sorry for all the questions, best regards, Matteo On Nov 17, 2010, at 2:28 AM, Steven G. Johnson wrote: > > On Nov 16, 2010, at 5:11 AM, Matteo Lombardi wrote: >> The gradient is obtained via the resolution of the direct and Adjoint flow >> field and the evaluation of the "sensitivity" (i.e. gradient) field. >> I have checked it, the gradient is correct (at least qualitatively). > > I would check the gradient quantitatively. Compare it to a brute-force > finite-difference approximation, and make sure it is accurate to several > decimal places. > > It is really easy to get gradient computations wrong, and incorrect gradients > will often cause gradient-based methods to fail to converge. > > Also make sure you are solving your CFD problem accurately; if you are using > some iterative method with a low tolerance for your solver, you may have a > lot of numerical noise in your objective, and gradient-based methods are very > intolerant of noise (or any other non-smoothness) in the objective. > > I don't see any other reason why gradient-based methods would on your sort of > problem. > > Steven > > _______________________________________________ > NLopt-discuss mailing list > [email protected] > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss _______________________________________________ NLopt-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss
