- 积分
- 15
- 注册时间
- 2008-7-20
- 仿真币
-
- 最后登录
- 1970-1-1
|
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
> |
|