[Gmsh] compute volume and color physical
Christophe Geuzaine
cgeuzaine at ulg.ac.be
Mon Oct 1 10:34:42 CEST 2007
GUITON Martin wrote:
> Dear gmsh contributors,
>
> First, I wonder if there is a possibility with gmsh to compute the total
> surface of 2D meshes physical groups (volume for 3D) or the total
> surface of a mesh ? This is because I need to compute the total surface
> of a deformed configuration.
Hi Martin - Yes:
1) save the mesh as a post-processing view (File->Save as->Mesh statistics)
2) open the the view and integrate 1 using Plugin(Integrate)
If you want to compute the surface/volume of a deformed configuration,
apply Plugin(Warp) before step (2).
>
> My second problem is to merge several meshes with a different color for
> each of them. Actually I tried to use the physical number with for the
> first mesh :
>
> $ELM
> 7679
> 1 15 201 3 1 2
> 2 15 200 52 1 8
> 3 15 203 53 1 9
> 4 15 202 72 1 12
> 5 1 800 2 2 1 15
> 6 1 800 2 2 15 16
> 7 1 800 2 2 16 17
> 8 1 800 2 2 17 18
> 9 1 800 2 2 18 19
> etc..
>
> and for the second one:
> $ELM
> 7679
> 1 1 500 47 2 15 1
> 2 1 500 47 2 16 15
> 3 1 500 47 2 17 16
> 4 1 500 47 2 18 17
> 5 1 500 47 2 19 18
> etc..
>
> It is possible to select with visibility the 2 physical groups 500 and
> 800 which are as I want. Unfortunately, if I use the option COLOR for
> PHYSICAL_GROUPS, the two groups are affected by the same color (that of
> ZERO). To complicate, I tried also the following format for the second
> mesh and it works fine (but I would like to be able to work with a
> different group number than 2).
>
> $ELM
> 7679
> 1 1 2 500 2 15 1
> 2 1 2 500 2 16 15
> 3 1 2 500 2 17 16
> 4 1 2 500 2 18 17
> 5 1 2 500 2 19 18
> 6 1 2 500 2 20 19
>
> Thank you very much for you help.
>
The color of entities is determined by choosing one color out of twenty,
using the remainder of the integer division by 20 to select it.
Maybe we should add something to assign colors "by hand" to physical
entities (you can already do this for elementary entities using the
"Color" syntax in the .geo file)...
Ch.
> Martin GUITON
>
> Research Scientist
> IFP-Geologie 1-4 Avenue Bois Preau
> 92852 Rueil-Malmaison FRANCE
> tel: +33 (1) 47 52 63 69
>
> __________________________
>
> Ce message (et toutes ses pièces jointes éventuelles) est confidentiel et établi à l'intention exclusive de ses destinataires. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'IFP décline toute responsabilité au titre de ce message.
>
> This message and any attachments (the message) are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. IFP should not be liable for this message.
>
> Visitez notre site Web / Visit our web site : http://www.ifp.fr
> __________________________
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
--
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine