From 21a3e981feeeadd6c3c6c6c9d52e735fa19297cf Mon Sep 17 00:00:00 2001
From: Shidong Jiang <shidong.jiang@njit.edu>
Date: Sat, 16 May 2015 21:45:36 -0400
Subject: [PATCH] Multiple mesh example

---
 examples/multiple-meshes.py | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 examples/multiple-meshes.py

diff --git a/examples/multiple-meshes.py b/examples/multiple-meshes.py
new file mode 100644
index 0000000..84918e1
--- /dev/null
+++ b/examples/multiple-meshes.py
@@ -0,0 +1,26 @@
+from __future__ import division
+
+import numpy as np  # noqa
+
+
+order = 4
+
+
+def main():
+    from meshmode.mesh.generation import (  # noqa
+            make_curve_mesh, starfish)
+    mesh1 = make_curve_mesh(starfish, np.linspace(0, 1, 20), 4)
+
+    from meshmode.mesh.processing import affine_map, merge_disjoint_meshes
+    mesh2 = affine_map(mesh1, b=np.array([2, 3]))
+
+    mesh = merge_disjoint_meshes((mesh1, mesh2))
+
+    from meshmode.mesh.visualization import draw_2d_mesh
+    draw_2d_mesh(mesh, set_bounding_box=True)
+
+    import matplotlib.pyplot as pt
+    pt.show()
+
+if __name__ == "__main__":
+    main()
-- 
GitLab