[Gmsh] telling whether physical entities are defined in a .msh file

OSHIMA Takuya oshima at eng.niigata-u.ac.jp
Tue Feb 27 01:00:18 CET 2007


Hi Christophe,

Thanks so much for a really helpful answer, I'll go that way.

Takuya OSHIMA

From: Christophe Geuzaine <cgeuzaine at ulg.ac.be>
Subject: Re: [Gmsh] telling whether physical entities are defined in a .msh file
Date: Mon, 26 Feb 2007 11:00:12 +0100

> > No, Gmsh2 writes all the elementary entities "as is" with physical
> > entity numbers all set to 0 (zero) if no physical entity is defined,
> > as is written in the Section 4.1 of the Reference manual. Thus as far
> > as my knowledge goes, I think we can't tell by only looking into the
> > final .msh file whether
> > 
> > Case 1: the physical entity numbers are intentionally set to all 0 (by
> >   such as "Physical Surface (0) = {...};"), or
> > Case 2: no physical entity is defined from the first.
> 
> 
> Hi - It's safe to assume that "Case 1" never happens (and even if it
> does, the end result is the same as if no Physicals are defined).
> 
> So looking at physicals numbers in the .msh file and decising that there 
> are no physicals if all the ids are 0 looks fine to me.
> 
> Christophe