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 2011年2月2日 GMT-5 09:17

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年2月23日 GMT-5 15:24

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 2011年2月2日 GMT-5 09:17
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.