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.

Geometry union takes exceptionally long and crushes the script?

Please login with a confirmed email address before reporting spam

Hi all,

I am in 3D -> Electromagnetic Wave -> Eigenfrequency. My geometry involves union and difference operations as shown in the attached .mph file. The attached .mph file runs without error.

However, when I try to script it in MATLAB as in the attached .m file, the lines involving geometry union

model.geom('geom1').feature.create('uni1', 'Union');
model.geom('geom1').feature('uni1').selection('input').set({'cyl1' 'cyl10' 'cyl11' 'cyl12' 'cyl2' 'cyl3' 'cyl4' 'cyl5' 'cyl6' 'cyl7' ...
'cyl8' 'cyl9' 'sph1' 'sph2' 'sph3' 'sph4' 'sph5' 'sph6' 'sph7' 'sph8'});
model.geom('geom1').feature('uni1').set('intbnd', 'off');
model.geom('geom1').run('uni1');

take exceptionally long time to execute and eventually lead to the crush

Java exception occurred:
java.lang.NullPointerException
at
com.comsol.clientapi.engine.APIEngine.runMethod(Unknown Source)
at
com.comsol.clientapi.impl.GeomSequenceClient.run(Unknown Source)

Why is it error-free when in COMSOL GUI, but leads to a crush in MATLAB scripting? How may I fix it?

Thank you so much in advance!
Best regards,
Alvin


0 Replies Last Post May 22, 2014, 9:03 a.m. EDT
COMSOL Moderator

Hello Alvin Wang

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.

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.