Example 2: addmesh / amr
The objective is to join two meshes to create a third using the addmesh / amr command.
Two cubes, one smaller than the other, each having a different grid resolution are combined. The amr option finds the intersection and refines one mesh to interface with the boundary of the other mesh using adaptive mesh refinement.
Input
Output Images
+———————–+———————–+———————–+
[mesh [mesh [](image/addmesh_amr/
1](image/addmesh_amr/ 2](image/addmesh_amr/ addmesh_amr3.gif”[com
addmesh_amr1.gif”[![] addmesh_amr2.gif”[![] bined
(image/addmesh_amr/ad (image/addmesh_amr/ad (view
dmesh_amr1_tn.gif”{wi dmesh_amr2_tn.gif”{wi 1)](image/addmesh_amr
dth=”” dth=”” /addmesh_amr3.gif”![]
“”](image/a “”](image/a (image/addmesh_amr/ad
ddmesh_amr/addmesh_am ddmesh_amr/addmesh_am dmesh_amr3_tn.gif”{wi
r1.gif” r2.gif” dth=””
“”
+———————–+———————–+———————–+
[](image/addmesh_amr/ [](image/addmesh_amr/
addmesh_amr4.gif”[com addmesh_amr5.gif”com
bined bined
(view (view
2)](image/addmesh_amr
/addmesh_amr4.gif”[![ /addmesh_amr5.gif”[![
](image/addmesh_amr/a ](image/addmesh_amr/a
ddmesh_amr4_tn.gif”{w ddmesh_amr5_tn.gif”{w
idth=”” idth=””
“”](image/a “”](image/a
ddmesh_amr/addmesh_am ddmesh_amr/addmesh_am
r4.gif” r5.gif”
+———————–+———————–+———————–+