Skip to content
Snippets Groups Projects
Commit 210ffef5 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

embedded lines and points in volume

parent 2daef80f
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@
Include "t1.geo";
// We define a new point
Point(5) = {0.02, 0.02, 0, lc/10};
Point(5) = {0.02, 0.02, 0, lc};
// One can force this point to be included ("embedded") in the 2D mesh, using
// the "Point In Surface" command:
......@@ -18,21 +18,19 @@ Point{5} In Surface{6};
// In the same way, one can force a curve to be embedded in the 2D mesh using
// the "Line in Surface" command:
Point(6) = {0.02, 0.12, 0, lc/5};
Point(7) = {0.04, 0.18, 0, lc/5};
Point(6) = {0.02, 0.12, 0, lc};
Point(7) = {0.04, 0.18, 0, lc};
Line(5) = {6, 7};
Line{5} In Surface{6};
// Finally, one can also embed a surface in a volume using the "Surface In
// Volume" command:
// One can also embed a surface in a volume using the "Surface In Volume"
// command:
Extrude {0, 0, 0.1}{ Surface {6}; }
p = newp;
Point(p) = {0.02, 0.12, 0.05, lc/5};
Point(p+1) = {0.04, 0.12, 0.05, lc/5};
Point(p+2) = {0.04, 0.18, 0.05, lc/5};
Point(p+3) = {0.02, 0.18, 0.05, lc/5};
Point(p) = {0.02, 0.12, 0.05, lc};
Point(p+1) = {0.04, 0.12, 0.05, lc};
Point(p+2) = {0.04, 0.18, 0.05, lc};
Point(p+3) = {0.02, 0.18, 0.05, lc};
l = newl;
Line(l) = {p, p+1};
Line(l+1) = {p+1, p+2};
......@@ -42,5 +40,17 @@ ll = newll;
Line Loop(ll) = {l:l+3};
s = news;
Plane Surface(s) = {ll};
Surface{s} In Volume{1};
// Finally, one can also embed a point or a line in a volume using the
// "Line/Point In Volume" command:
p = newp;
Point(p) = {0.025, 0.15, 0.025, lc};
l = newl;
Line(l) = {7, 22};
Line{l} In Volume {1};
Point(p+1) = {0.07, 0.15, 0.025, lc/3};
Point{p+1} In Volume {1};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment