Actual source code: example2.edp
1
2
3
4
5
6
7
8
10 mesh sq = square(10, 10);
11 plot(sq, wait = true);
12 sq = square(10, 100, [x, 10 * y]);
13 plot(sq, wait = true);
15 include "cube.idp"
16 mesh3 cb = cube(10, 10, 10);
17 plot(cb, wait = true);
18 medit("Cube", cb);
20 load "gmsh"
21
22 sq = gmshload("square.msh");
23 plot(sq, wait = true);
24 cout << labels(sq) << endl;
26
27 cb = readmesh3("cube.mesh");
28 plot(cb, wait = true);
29 cout << labels(cb) << endl;
31 cb = trunc(cb, true, split = 2);
32 plot(cb, wait = true);
33 cb = trunc(cb, x < 0.0);
34 plot(cb, wait = true);