Hi all,<div><br></div><div>I'm trying to define a 2D mesh with regions. To this end</div><div><br></div><div>=================== *snip* ===================<br></div><div><div>Function Rectangle</div><div> // Points.</div>
<div> cp1 = newp;</div><div> Point(cp1) = {xmin,ymin,z,lcar};</div><div> cp2 = newp;</div><div> Point(cp2) = {xmax,ymin,z,lcar};</div><div> cp3 = newp;</div><div> Point(cp3) = {xmax,ymax,z,lcar};</div><div> cp4 = newp;</div>
<div> Point(cp4) = {xmin,ymax,z,lcar};</div><div> </div><div> // Lines.</div><div> cl1 = newreg;</div><div> Line(cl1) = {cp1,cp2};</div><div> cl2 = newreg;</div><div> Line(cl2) = {cp2,cp3};</div><div> cl3 = newreg;</div>
<div> Line(cl3) = {cp3,cp4};</div><div> cl4 = newreg;</div><div> Line(cl4) = {cp4,cp1};</div><div><br></div><div> loop = newreg;</div><div> Line Loop(loop) = {cl1,cl2,cl3,cl4};</div><div> surf = newreg;</div><div> Plane Surface(surf) = {loop};</div>
<div><br></div><div> Physical Volume(Sprintf("rectangle %g", t)) = surf;</div><div><br></div><div>Return</div><div><br></div><div>// Build two rectangles.</div><div>lcar = 0.1;</div><div>z = 0;</div><div>ymin = -1.0;</div>
<div>ymax= 1.0;</div><div><br></div><div>t = 0;</div><div>xmin = -1.0;</div><div>xmax = 0.0;</div><div>Call Rectangle;</div><div><br></div><div>t = 1;</div><div>xmin = 0.0;</div><div>xmax = 1.0;</div><div>Call Rectangle;</div>
<div><br></div><div>Coherence;</div></div><div>=================== *snap* ===================</div><div><br></div><div>Meshing this works well, and when saving the data as MSH-file, I get</div><div><br></div><div>=================== *snip* ===================<br>
</div><div><div>$MeshFormat</div><div>2.2 0 8</div><div>$EndMeshFormat</div><div>$PhysicalNames</div><div>2</div><div>3 1 "rectangle 0"</div><div>3 2 "rectangle 1"</div><div>$EndPhysicalNames</div><div>
$Nodes</div><div>504</div><div>1 -1 -1 0</div><div>2 0 -1 0</div><div>3 0 1 0</div></div><div>[...]</div><div><div>$EndNodes</div><div>$Elements</div><div>1031</div><div>1 15 2 0 1 1</div></div><div>[...]</div><div><div>
1023 2 2 0 12 344 455 494</div>
<div>1024 2 2 0 12 355 476 464</div><div>1025 2 2 0 12 344 441 501</div><div>1026 2 2 0 12 344 494 441</div></div><div>[...]</div><div>=================== *snap* ===================<br></div><div><br></div><div>I'm wondering about the tags for the elements here. It seems that the tags are "0" and "12", one of which I would expect to correspond with a PhysicalName.</div>
<div>Can anyone enlighten me about the meaning of the tags here and how they correspond with physical volumes?</div><div><br></div><div>Cheers,</div><div>Nico</div>