[Gmsh] BooleanUnion and then PhysicalVolume of the components

Christophe Geuzaine cgeuzaine at uliege.be
Sat Dec 21 06:44:01 CET 2019



> On 20 Dec 2019, at 18:59, Salazar De Troya, Miguel <salazardetro1 at llnl.gov> wrote:
> 
> 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? 

Replace BooleanUnion with BooleanFragments.

Christophe

> 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
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine






More information about the gmsh mailing list