Quantcast COMSOL Script Error Text - Physics Forums Library

PDA

View Full Version : COMSOL Script Error


py_engineer
Nov14-08, 03:32 PM
Hi,

Is there anyone who can help me with COMSOL Script?

Is there anything wrong with this statement:

flclear fem

g6=rect2(1.0E-6,11.0E-6,'base','corner','pos',[0,0]);

clear s
s.objs={g6};
s.name={'CO1'};
s.tags={'g6'};

fem.draw=struct('s',s);
fem.geom=geomcsg(fem);

fem.mesh=meshinit(fem,'hauto',5);

---------------------

However, when I run this, I get this f..#@>*^& null pointer Java error! :(

Error: java.lang.NullPointerException
at com.femlab.server.MlProgressDlg.runAndWait(Unknown Source)

Error in built-in function javaMethod.
meshinitaux 67 MeshRun.smartRunner(report, loopTime);
meshinit 351 varargout = meshinitaux(fem,'meshinit',varargin{:});
comsol_DLPH_basefile 116 fem.mesh=meshinit(fem.geom,'hauto',5)
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
at com.femlab.jline.ConsoleReader.readBinding(Unknown Source)
at com.femlab.jline.ConsoleReader.readLine(Unknown Source)
at com.femlab.jline.ConsoleReader.readLine(Unknown Source)
at com.femlab.script.Terminal.a(Unknown Source)
at com.femlab.script.Terminal.b(Unknown Source)
at com.femlab.script.Terminal.main(Unknown Source)

--------------------------

Any help would be greatly appreciated!

Thanks!

PerennialII
Nov15-08, 12:55 PM
....got a geometry and a mesh out of it so perhaps there is an error "somewhere else"?

py_engineer
Nov17-08, 12:17 PM
Ok, I got it, that wasn't too difficult, but it took me so long!

So I was trying to run COMSOL in the background. But 'comsol script filename' tries to open a progress window, and this makes the simulation crash since I was running this on a remote server with no graphics capability.. To avoid that, you just do 'comsol batch filename'..

PerennialII
Nov18-08, 02:58 AM
An error keep repeating myself very often :blushing: .