<html><head></head><body><div>Hi,</div><div><br></div><div>I am using the following .geo-file to generate a hexagonal unit cell in Gmsh. Unfortunately, the program always tells me that "edges from different entitites share vertices" and I should "create a finer mesh" when I am trying to mesh with quadratic elements. Refining the mesh by, e.g., splitting  does not help. Does somebody know what to do?</div><div><br></div><div>Thanks,</div><div>Philipp</div><div><br></div><div>// Gmsh project created on Fri Apr 27 14:00:00 2018</div><div>SetFactory("OpenCASCADE");</div><div>Geometry.Tolerance=1e-12;</div><div><br></div><div>// Particle Radius and Distance:</div><div>r=2;</div><div>d=5;</div><div><br></div><div>// Derived Lengths</div><div>a=d;</div><div>b=Sqrt(3)*d;</div><div>h=d/(2*Sqrt(3));</div><div>c=Sqrt(8/3)*d;</div><div><br></div><div><br></div><div>// Initial Entities:</div><div>Box(1) = {-a/2, -b/2, 0, a, b, c};</div><div>Sphere(2) = {0, 0, 0, r};</div><div>Sphere(3) = {a/2, -b/2, 0, r};</div><div>Sphere(4) = {a/2, b/2, 0, r};</div><div>Sphere(5) = {-a/2, b/2, 0, r};</div><div>Sphere(6) = {-a/2, -b/2, 0, r};</div><div>Sphere(7) = {a/2, -h, c/2, r};</div><div>Sphere(8) = {0, b/2-h, c/2, r};</div><div>Sphere(9) = {-a/2, -h, c/2, r};</div><div>Sphere(10) = {0, 0, c, r};</div><div>Sphere(11) = {a/2, -b/2, c, r};</div><div>Sphere(12) = {a/2, b/2, c, r};</div><div>Sphere(13) = {-a/2, b/2, c, r};</div><div>Sphere(14) = {-a/2, -b/2, c, r};</div><div>Sphere(15) = {0, -b/2-h, c/2, r};</div><div><br></div><div>// Boolean Operations:</div><div>nInc=14;</div><div>Inclusions[]=BooleanIntersection{ Volume{1}; }{ Volume{ 2,3,4,5,6,7,8,9,10,11,12,13,14,15}; Delete;};</div><div>Matrix[]=BooleanDifference{ Volume{ 1 }; Delete; }{ Volume{Inclusions[]}; };</div><div>Coherence;</div><div><br></div><div><br></div><div>// Identify Boundary:</div><div>Bnd[]=Abs(CombinedBoundary{ Volume{Matrix[]}; Volume{Inclusions[]}; });</div><div><br></div><div>// Physical Entities for Materials</div><div>Physical Volume("Material 1",1) = { Matrix[] };</div><div>Physical Volume("Material 2",2) = { Inclusions[] };</div><div>Physical Surface("Boundary",3) = { Bnd[] };</div><div><br></div><div>// Periodicity:</div><div>Periodic Surface 13 { 13, 50, 24, 51, 31, 52, 38, 48, 53, 54 } = 1 { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };</div><div>Periodic Surface 35 { 53, 54 } = 37 { 9, 10 };</div><div>Periodic Surface 44 { 83, 84, 51 } = 45 { 85, 86, 4 };</div><div>Periodic Surface 28 { 52, 72, 71 } = 29 { 6, 74, 73 };</div><div>Periodic Surface 25 { 68, 48, 69 } = 32 { 76, 8, 77 };</div><div>Periodic Surface 40 { 79, 81, 50 } = 48 { 88, 89, 2 };</div><div><br></div><div>Periodic Surface 6 { 29, 30, 31, 32, 22, 28, 5, 33, 34 } = 2 { 11, 12, 13, 14, 15, 16, 1, 17, 18 };</div><div>Periodic Surface 36 { 34 } = 51 { 18 };</div><div>Periodic Surface 47 { 28, 87, 86 } = 49 { 16, 90, 88 };</div><div>Periodic Surface 30 { 75, 33, 73 } = 33 { 78, 17, 76 };</div><div>Periodic Surface 26 { 70, 71, 30 } = 23 { 67, 68, 12 };</div><div>Periodic Surface 43 { 84, 82, 32 } = 39 { 79, 80, 14 };</div><div><br></div><div>Periodic Surface 4 { 3, 21, 22, 23, 24, 25, 15, 19, 26 } = 8 { 7, 35, 29, 37, 38, 39, 11, 40, 41 };</div><div>Periodic Surface 38 { 26 } = 22 { 41 };</div><div>Periodic Surface 42 { 82, 83, 23 } = 27 { 70, 72, 37 };</div><div>Periodic Surface 41 { 25, 80, 81 } = 24 { 39, 67, 69 };</div><div>Periodic Surface 50 { 89, 19, 90 } = 34 { 77, 40, 78 };</div><div>Periodic Surface 46 { 85, 87, 21 } = 31 { 74, 75, 35 };</div><div><br></div><div>// Mesh Options</div><div>Mesh.ElementOrder=2;</div><div>Mesh.Algorithm=5;</div><div><br></div><div>// Mesh Density:</div><div>curPt=newp-1;</div><div>Characteristic Length { 1:curPt } = 0.4;</div><div><br></div><div>Mesh 3;</div><div>Coherence Mesh;</div><div></div><div><span><pre><br></pre><pre><br></pre><pre><br></pre><pre>-- <br></pre><span style="font-family: monospace;">Dipl.-Ing. Philipp Metsch</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">Technische Universität Dresden</span><br style="font-family: monospace;"><span style="font-family: monospace;">Fakultät Maschinenwesen</span><br style="font-family: monospace;"><span style="font-family: monospace;">Institut für Festkörpermechanik</span><br style="font-family: monospace;"><span style="font-family: monospace;">Professur für Numerische und Experimentelle Festkörpermechanik</span><br style="font-family: monospace;"><span style="font-family: monospace;">01062 Dresden</span><br style="font-family: monospace;"><span style="font-family: monospace;">Tel.: +49 (351) 463-33284</span><br style="font-family: monospace;"><span style="font-family: monospace;">Fax: +49 (351) 463-37061</span><br style="font-family: monospace;"><span style="font-family: monospace;">E-Mail: </span><a href="mailto:Philipp.Metsch@tu-dresden.de" style="font-family: monospace;"></a><a href="mailto:Philipp.Metsch@tu-dresden.de">Philipp.Metsch@tu-dresden.de</a><br style="font-family: monospace;"></span></div></body></html>