diff --git a/doc/texinfo/gmsh.texi b/doc/texinfo/gmsh.texi index d8419b3c5435bbf51912d9fd5c53c55e37c7a750..9c4059b52d7cd48b90ddaa35da69af8a33954a19 100644 --- a/doc/texinfo/gmsh.texi +++ b/doc/texinfo/gmsh.texi @@ -237,6 +237,7 @@ Tutorial * t12.geo:: * t13.geo:: * t14.geo:: +* t15.geo:: Options @@ -2690,8 +2691,11 @@ Here is a list of all other mesh commands currently available: @ftable @code @item Point | Line @{ @var{expression-list} @} In Surface @{ @var{expression} @}; Embed the point(s) or line(s) in the given surface. The surface mesh -will conform to the mesh of the point(s) or lines(s). Note that embedded -lines only work with the MeshAdapt 2-D algorithm. +will conform to the mesh of the point(s) or lines(s). + +@item Surface @{ @var{expression-list} @} In Volume @{ @var{expression} @}; +Embed the surface in the given volume. The volume mesh will conform to +the mesh of the surface. @item Periodic Line @{ @var{expression-list} @} = @{ @var{expression-list} @}; Force mesh of lines on the left-hand side (slaves) to match the mesh of @@ -4277,6 +4281,7 @@ system}. Screencasts that show how to use the GUI are available on * t12.geo:: * t13.geo:: * t14.geo:: +* t15.geo:: @end menu @c ------------------------------------------------------------------------- @@ -4400,11 +4405,20 @@ system}. Screencasts that show how to use the GUI are available on @c t14.geo @c ------------------------------------------------------------------------- -@node t14.geo, , t13.geo, Tutorial +@node t14.geo, t15.geo, t13.geo, Tutorial @section @file{t14.geo} @verbatiminclude ../../tutorial/t14.geo +@c ------------------------------------------------------------------------- +@c t15.geo +@c ------------------------------------------------------------------------- + +@node t15.geo, , t14.geo, Tutorial +@section @file{t15.geo} + +@verbatiminclude ../../tutorial/t15.geo + @c ========================================================================= @c Options @c ========================================================================= diff --git a/tutorial/t15.geo b/tutorial/t15.geo new file mode 100644 index 0000000000000000000000000000000000000000..0503fad7cebd6bcfcf30ed851907e77e649c09ac --- /dev/null +++ b/tutorial/t15.geo @@ -0,0 +1,46 @@ +/********************************************************************* + * + * Gmsh tutorial 15 + * + * Embedded points, lines and surfaces + * + *********************************************************************/ + +// We start one again by including the first tutorial: +Include "t1.geo"; + +// We define a new point +Point(5) = {0.02, 0.02, 0, lc/10}; + +// One can force this point to be included ("embedded") in the 2D mesh, using +// the "Point In Surface" command: +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}; +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: +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}; +l = newl; +Line(l) = {p, p+1}; +Line(l+1) = {p+1, p+2}; +Line(l+2) = {p+2, p+3}; +Line(l+3) = {p+3, p}; +ll = newll; +Line Loop(ll) = {l:l+3}; +s = news; +Plane Surface(s) = {ll}; + +Surface{s} In Volume{1};