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.

How to keep Matlab function going on after non-convergence?

Please login with a confirmed email address before reporting spam

I'm using Matlab to run a series of automated simulations. Each simulation has a slightly different geometry (there is no topological change). Some of these simulations don't converge, which is fine. The problem is that when one of them don't converge the function stops and all following simulations are not executed.

I want the Matlab function to continue, even if one of the simulations stops. For example: let's say I have the simulations A, B, C and D to run. I create a Matlab function that runs all of them, one at a time in the alphabetical order. But if B doesn't converge the function stops, C and D are not calculated. I want it to just save B as it is (with the error) and go on to simulate C and D.

Does someone know how to avoid the Matlab function to stop when the model doesn't reach convergence?

0 Replies Last Post Dec 15, 2011, 7:49 a.m. EST
COMSOL Moderator

Hello Marcelo Ito Parada

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.