[Gmsh] saving the mesh for a subdomain separately

G. D. McBain gdmcbain at protonmail.com
Tue Nov 20 03:09:43 CET 2018


> (1) What needs to be done to guarantee that sphere.msh is identical(conforming) to the portion of box.msh that accounts for the sphere? Or am I missing something again in your idea to extract the sphere.msh portion directly from box.msh?

Ah, O. K., this is extra.  For this, the interface (i.e. the sphere) needs to be defined as a Physical Surface in the common file.

> (2) If I need to generate a third portion of the box.msh that accounts for the volume= cube/sphere( sphere subtracted from the cube), do I need to create cube/sphere.geo and insert geomtry.geo into it as you have shown me or it is just the volume(2) you had in your last reply, that is:
>
> Volume(1) = {1}; // the sphere
> Volume(2) = {1, 2}; // outside the sphere

Yes, that's right: the second volume is the complement of the sphere in the cube.  To see that the box.msh is hollow apply Tools/Clipping/Mesh with (A, B, C, D) = (1, 0, 0, -0.5).  See attached box-clipped.png.  (This was meshed with "gmsh -3 -clscale 0.0625 box.geo".)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: box-clipped.png
Type: image/png
Size: 61172 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20181120/4afde9c2/attachment-0001.png>


More information about the gmsh mailing list