[Gmsh] listing elements according to which physical volume they belong to

G. D. McBain gdmcbain at protonmail.com
Mon Nov 26 06:43:56 CET 2018

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Le lundi, novembre 26, 2018 12:43 PM, Abiti Adili <aadili1 at lsu.edu> a écrit :

> Hello,
> I have a geometry.geo file that creates a box with two small balls in it. I used omnibus.geo file that utilize the geometry.geo. Using this file, I created a 3D mesh over the box(as well as the two balls in it). I need to be able to have a mesh( created over the box) so that the gmsh file lists the tetrahedral elements according which physical volume( ball1, ball2, or the complement of them in the box) they belong to.
> The files I currently have are not quite generating what I wanted, it is only listing the elements belong to the complement. I would greatly appreciate if someone can take a look at them and point out the mistakes I made.

The last lines of geometry.geo have:

    Volume(1) = {2};
    Volume(2) = {3};
    Volume(3) = {1, 2};

The last should read

    Volume(3) = {1, 2, 3};

if the second sphere is also to internally bound it.

More information about the gmsh mailing list