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 get the solver error messages programmatically ?

Please login with a confirmed email address before reporting spam

Hello,

Does someone know if there is any way to know programmaticaly if the simulation was successful or not ?

The idea would be to obtain a boolean variable like 'wasSuccessful" from the functions 'femtime' and 'femstatic', or better, a structure/string with the error code, so that I can decide to run or not postprocessing functions.

Thanks
Ronan

2 Replies Last Post 2 feb 2011, 09:17 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 23 feb 2010, 15:24 GMT-5

Hello,

Does someone know if there is any way to know programmaticaly if the simulation was successful or not ?

The idea would be to obtain a boolean variable like 'wasSuccessful" from the functions 'femtime' and 'femstatic', or better, a structure/string with the error code, so that I can decide to run or not postprocessing functions.

Thanks
Ronan


I found the way to know if the simulation was complete, in the Reference Guide (p. 133, function 'femlin'). We have to use the property 'Out'. It would be something like this:

[fem.sol, stop] = femtime(fem, 'Out', {'sol','stop'})
where 'sol' is the standard value.

But I still don't know how to get the error message...
[QUOTE] Hello, Does someone know if there is any way to know programmaticaly if the simulation was successful or not ? The idea would be to obtain a boolean variable like 'wasSuccessful" from the functions 'femtime' and 'femstatic', or better, a structure/string with the error code, so that I can decide to run or not postprocessing functions. Thanks Ronan [/QUOTE] I found the way to know if the simulation was complete, in the Reference Guide (p. 133, function 'femlin'). We have to use the property 'Out'. It would be something like this: [fem.sol, stop] = femtime(fem, 'Out', {'sol','stop'}) where 'sol' is the standard value. But I still don't know how to get the error message...

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2 feb 2011, 09:17 GMT-5
lastwarn and lasterr are MATLAB variables containing this information.
lastwarn and lasterr are MATLAB variables containing this information.

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.