Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

COMSOL Script Error

  1. Nov 14, 2008 #1

    Is there anyone who can help me with COMSOL Script?

    Is there anything wrong with this statement:

    flclear fem


    clear s




    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!

  2. jcsd
  3. Nov 15, 2008 #2


    User Avatar
    Science Advisor
    Gold Member

    ....got a geometry and a mesh out of it so perhaps there is an error "somewhere else"?
  4. Nov 17, 2008 #3
    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'..
  5. Nov 18, 2008 #4


    User Avatar
    Science Advisor
    Gold Member

    An error keep repeating myself very often :blushing: .
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: COMSOL Script Error
  1. COMSOL Help (Replies: 1)

  2. Modelling with Comsol (Replies: 2)

  3. Comsol grant? (Replies: 3)