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.

error message when define interpolating function in matlab (other function types work, in comsol it works as well)

Please login with a confirmed email address before reporting spam

Hello everybody,

whenever I define an interpolation function in matlab with

model.func.create('int1', 'Interpolation');

I get an error message (see below) - but if I write instead "model.func.create('ana1','Analytic');" or the same with 'MATLAB', the problem does not occur. Using the COMSOL interface directly, it works fine (it is just the exported model from comsol that I try to solve via the skript instead).

Does anyone have the same problem? This weird problems popping up drive me crazy :(

All best :)
Sabine

Error using com.comsol.model.impl.SolverSequenceImpl/run
Java exception occurred:
Exception:
com.comsol.util.exceptions.FlException: No current feature assigned
Messages:
No current feature assigned

Stack trace:
at com.comsol.model.impl.SolverSequenceImpl.m(Unknown Source)
at com.comsol.model.impl.SolverSequenceImpl.current(Unknown Source)
at com.comsol.model.impl.SolverSequenceImpl.i(Unknown Source)
at com.comsol.model.impl.SolverSequenceImpl.run(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.comsol.clientserver.impl.JobImpl.run(Unknown Source)
at com.comsol.server.internal.b.a(Unknown Source)
at com.comsol.server.internal.b.a(Unknown Source)
at com.comsol.server.internal.b$h.a(Unknown Source)
at com.comsol.server.internal.b$h.a(Unknown Source)
at com.comsol.server.internal.b$h$a.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)

at com.comsol.model.clientserver.ClientManagerImpl.a(Unknown Source)
at com.comsol.model.clientserver.ClientManagerImpl.runServerJob(Unknown Source)
at com.comsol.model.impl.SolverSequenceImpl$a.a(Unknown Source)
at com.comsol.model.impl.SolverSequenceImpl$a.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)
Caused by: Exception:
com.comsol.util.exceptions.FlException: No current feature assigned
Messages:
No current feature assigned

at com.comsol.model.impl.SolverSequenceImpl.m(Unknown Source)
at com.comsol.model.impl.SolverSequenceImpl.current(Unknown Source)
at com.comsol.model.impl.SolverSequenceImpl.i(Unknown Source)
at com.comsol.model.impl.SolverSequenceImpl.run(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.comsol.clientserver.impl.JobImpl.run(Unknown Source)
at com.comsol.server.internal.b.a(Unknown Source)
at com.comsol.server.internal.b.a(Unknown Source)
at com.comsol.server.internal.b$h.a(Unknown Source)
at com.comsol.server.internal.b$h.a(Unknown Source)
at com.comsol.server.internal.b$h$a.run(Unknown Source)
... 3 more

2 Replies Last Post 31 lug 2014, 14:01 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 gen 2013, 12:47 GMT-5
ok, problem is solved -- when I tell matlab/comsol what to interpolate

(i.e.
model.func('int1').name('Interpolation surface var0');
model.func('int1').set('nargs', '2');
model.func('int1').set('funcs', {'funcsurfcp0' '1'; 'funcsurfcn0' '2'; 'funcsurfU0' '3'});
model.func('int1').set('source', 'file');
model.func('int1').set('filename', '/users/me/datasurfacevar0.txt');
model.func('int1').set('defvars', true);
model.func('int1').set('nargs', '2');
)

BEFORE I run the solver, it works. (Or first run the solver and then create the function, of course.)
I keep this post in case someone else comes across this error message..
happy modelling :p
sabine
ok, problem is solved -- when I tell matlab/comsol what to interpolate (i.e. model.func('int1').name('Interpolation surface var0'); model.func('int1').set('nargs', '2'); model.func('int1').set('funcs', {'funcsurfcp0' '1'; 'funcsurfcn0' '2'; 'funcsurfU0' '3'}); model.func('int1').set('source', 'file'); model.func('int1').set('filename', '/users/me/datasurfacevar0.txt'); model.func('int1').set('defvars', true); model.func('int1').set('nargs', '2'); ) BEFORE I run the solver, it works. (Or first run the solver and then create the function, of course.) I keep this post in case someone else comes across this error message.. happy modelling :p sabine

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31 lug 2014, 14:01 GMT-4
Thank you for posting this!
Thank you for posting this!

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.