Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Value type of the control variable in the Optimization interface through LiveLink for Matlab
Posted 15 apr 2014, 12:30 GMT-4 Interfacing, LiveLink for MATLAB, Optimization, Parameters, Variables, & Functions Version 4.3 0 Replies
Please login with a confirmed email address before reporting spam
I'm working with the optimization interface through LiveLink for Matlab. I would like to know how to specify the value type of the control variable.
The dependent variables in my problem are complex; and in the L2 norm of the misfit function I use the abs value of them. The control variable is real.
In the Optimization Module User's Guide/ Theory for the sensitivity interface/Issues to consider Regarding the Objective Function there is some comment on complex-valued objective functions: 'Sensitivity analysis can be applied only when the objective function is a real-valued differentiable function of the control variables.' ; I suppose this also applies when using the optimization interface; and they recommend to treat the real and imaginary part separately if this is not the case (the objective function is not real-valued differentiable).
Following these issues, I split the real and imaginary parts:
model.sol('sol1').feature('st1').set('splitcomplex', 'on');
and I also specify the complex character of the dependent variables,
model.physics('pde1_1').prop('ShapeProperty').set('valueType', 1, 'complex');
But then a complex character is also applied to the control variable.
If I use the same command to specify the real character of the control variable: model.physics('opt1').feature('cvar1').set('valueType', 1, 'real'); the Livelink for Matlab does not recognize it. Is there some command to specify the value type of the control variable?
Thank you.
Hello Savitri Galiana
Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.
If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.