Rory Clune <clune@...> writes: > > > You could separate your geometry definition and CFD analysis from the objective and constraint functions. Put them in a separate function, which takes a design vector x as an argument. Your objective and constraint functions can then call this function when necessary > > > > > Each time NLopt calls one of your objective or constraint functions with a design vector x as an argument, check whether x has changed since the last time you ran a CFD analysis (you'll need to store the past value of x somewhere). If x hasn't changed, then you only need to post-process the existing CFD results, which you have stored either in memory or on disk. If x has changed since the last time, then you need to rebuild the geometry and rerun the analysis > > > Even better (depending on problem size, CFD analysis time, etc.), you could record the values of all your functions for all encountered values of x, preventing any duplicate geometry definitions and CFD runs. > >
Thank you, I'll try that. Much simpler and cleverer than what I was thinking about. Cheers, _______________________________________________ NLopt-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss
