[Gmsh] BooleanUnion and then PhysicalVolume of the components

Salazar De Troya, Miguel salazardetro1 at llnl.gov
Fri Dec 20 18:59:01 CET 2019


I want to get the union of two boxes that have two of their faces tangential. After the union, I want to assign a physical tag to each of the original volumes, how could I do that? After the union, I’ve left with just one Volume (obvious) This if what I’ve got:

SetFactory("OpenCASCADE");
Mesh.CharacteristicLengthMin = 0.04;
Mesh.CharacteristicLengthMax = 0.04;
vol0 = newv;
Box(vol0) = {0.0, 0.0, 0.0, 1.2, 1.5, 1.5};
vol4 = newv;
Box(vol4) = {1.2, 0.26, 0.0, 0.2, 0.2, 0.2};
bo1[] = BooleanUnion{ Volume{vol0}; Delete; } { Volume{vol4}; Delete;};//+
Physical Volume(1) = {vol0};
Physical Volume(2) = {vol4};

Thanks
Miguel


Miguel A. Salazar de Troya
Postdoctoral Researcher, Lawrence Livermore National Laboratory
B141
Rm: 1085-5
Ph: 1(925) 422-6411
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20191220/3308dfc3/attachment.html>


More information about the gmsh mailing list