[Gmsh] Embedded Mesh

Christophe Geuzaine cgeuzaine at uliege.be
Thu Oct 11 14:10:46 CEST 2018



> On 10 Oct 2018, at 21:12, Jensen, Aaron J. <Aaron.J.Jensen at leidos.com> wrote:
> 
> Hello,
>  
> I would like to merge an existing mesh into a geometry and then mesh the unmeshed region using gmsh (something like a boundary mesh around a pre-existing mesh generated externally by another program).  Ideally, this would result in a mesh that was partially created in gmsh and partially created externally to gmsh.  Ultimately, I would like to do this in both 2D and 3D but am starting with the following in 2D:
>  
>  
>  
> Merge "square";
>  
> SetFactory("OpenCASCADE");
>  
> Surface Loop(1) = {1};
> //sExternal = news;
> //Rectangle(sExternal) = {0, 0, 0.0, 0.5, 0.5};
>  
> s1 = news;
> Rectangle(s1) = {-0.25, -0.25, 0.0, 1.0, 1.0};
>  
> //BooleanDifference (2000) = { Surface{s1}; Delete; }{ Surface{sExternal}; };
> BooleanDifference (2000) = { Surface{s1}; Delete; }{ Surface{1}; };
>  

This cannot work: boolean operations can only be applied to CAD entities. It should not crash though - and it does not on my machine. Can you try with the latest snapshot?

You can still produce a mesh like the one you want. With the built-in engine, simply 

- load the mesh, which should contain the bounding surface mesh

- define the exterior "Surface Loop" where the interior surfaces are the bounding surfaces (discrete)

Christophe


>  
>  
> OpenCascade doesn’t recognize surface 1 and BooleanDifference causes gmsh to crash.  I assume I am doing something wrong?  Can gmsh embed an existing mesh into a gmsh geometry or CAD model?
>  
> Thanks,
> Aaron
> <square>_______________________________________________
> 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

Free software: http://gmsh.info | http://getdp.info | http://onelab.info




More information about the gmsh mailing list