Thanks for the help, now it is running nicely! On Monday, 28 October 2019 15:05:19 UTC+1, Bruno Turcksin wrote: > > There is a small bug in the lambda: > > Le lun. 28 oct. 2019 à 09:36, Juan Carlos Araujo Cabarcas > <ju4...@gmail.com <javascript:>> a écrit : > > auto my_lambda = [&polar](Vector<double> a, Vector<double>b) { > > return polar.objective_fun(a,b); > > }; //polar.Callback (a,b);}; > > You want the vector to be passed by reference not by value, otherwise > the result cannot be updated. So it should be: > auto my_lambda = [&polar](const Vector<double> &a, Vector<double> &b) { > return polar.objective_fun(a,b); > }; > > Bruno >
-- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/110bfff8-6341-42df-a010-1c1a86e50435%40googlegroups.com.