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.
LiveLink "selection.set"
Posted 14 ott 2010, 21:36 GMT-4 LiveLink for MATLAB Version 4.3a 5 Replies
Please login with a confirmed email address before reporting spam
I'm having what I believe to be a pretty straightforward problem getting the selection.set function to work properly. I am learning LiveLink by building up a model step by step, exporting to an m file at every step and keeping the parts of the script I need. For some reason, playing back any commands which require me to set a selection do not work (even if I did not modify them at all after export). For example:
model.physics('es').selection.set([1]);
Here is the error I get in matlab (where the illegal input vector is, I believe, the key part):
??? Java exception occurred:
Exception:
java.lang.IllegalArgumentException: Illegal input vector
(rethrown as com.comsol.util.exceptions.FlException)
Messages:
Illegal input vector
Stack trace:
at com.comsol.model.impl.SelectionImpl.a(Unknown Source)
at com.comsol.model.impl.SelectionImpl$b.a(Unknown Source)
at com.comsol.model.impl.SelectionImpl$b.execute(Unknown Source)
at com.comsol.model.clientserver.ClientManagerImpl$d.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Error in ==> scratch_10142010 at 111
model.physics('es').selection.set([1 2 3]);
As a side note, how does Comsol number the domains that are created from the various geometry operations? If I were writing this code 'blind' how would I know how to select domains, boundaries, etc..
Thanks, Mike
Hello Michael Norton
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.