找回密码
 注册
Simdroid-非首页
查看: 74|回复: 0

[15.分享让我牛B] Error catching when using the matlab-comsol interface

[复制链接]
发表于 2009-6-11 08:28:33 | 显示全部楼层 |阅读模式 来自 黑龙江哈尔滨

Hi,

Thanks John, that works perfectly!

R/Tony

--- In [email=COMSOL_Users%40yahoogroups.com]COMSOL_Users@yahoogroups.com[/email], John Paul Bir Singh <jpb_singh@...> wrote:
>
> You can simply use the error catching methods of matlab. Look for "try" and "catch" statements in matlab help.
>
> -john
>
>
>
>
> ________________________________
> From: "sagnea@..." <sagnea@...>
> To: [email=COMSOL_Users%40yahoogroups.com]COMSOL_Users@yahoogroups.com[/email]
> Sent: Thursday, June 4, 2009 11:48:00 AM
> Subject: [COMSOL_Users] Error catching when using the matlab-comsol interface
>
>
>
>
>
> Hi,
>
> I'm running a matlab script that modifies the geometry under analysis. Periodically, the 'meshinit' function fails with, "Internal error advancing front mesher." It's probably due to the geometry having a relatively high aspect ratio, but I'm not really sure (I'm using the AC/DC module in 2D axisymmetric mode, for what it's worth).
>
> I can avoid the problem by setting the argument 'methodsub' to 'tri'. This forces the mesher to use the older triangle mode rather than advancing front. However, I would prefer to use the advancing front mode for cases where it does not have a problem meshing the geometry. Unfortunately, when the mesher does fail, it kicks me back to the matlab prompt.
>
> Does anyone know how to trap errors using the Comsol matlab functions? I didn't find anything in the reference guide regarding this. I just want to catch the error and then invoke meshinit in 'tri' mode for that one case and continue...not stall.
>
> R/Tony
>
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-5-8 22:20 , Processed in 0.031420 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表