Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all articles
Browse latest Browse all 26527

try/catch in matlab for COMSOL

$
0
0
I am doing a parametric sweep in COMSOL with the geometry. The problem is, it is a large parameter space and a few combinations which would be unreasonable to check give an error. It is a stationary solver and what I need is something in COMSOL matlab code to tell me if there is inverted geometry or too many iterations such that I can skip that set of parametric values. I get the error:

For example, can I have COMSOL output the iterations as it solves such that if it hits a certain amount, I can quickly tell if I need to skip that set of parameters. This is inside a huge FOR loop as I need to sweep over a very large parametric space.

"??? Java exception occurred:
Exception:
com.comsol.util.exceptions.FlException: Failed to
find a solution for the initial parameter
(rethrown as
com.comsol.util.exceptions.FlException)
(rethrown as
com.comsol.util.exceptions.FlException)
Messages:
The following feature has encountered a problem

The following feature has encountered a problem

Failed to find a solution for the initial
parameter

Maximum number of Newton iterations reached

Returned solution is not converged
- Feature: Stationary Solver 1 (sol1/s1)
- Error: Failed to find a solution for the
initial parameter."

Viewing all articles
Browse latest Browse all 26527

Trending Articles