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

surface in volume

parent 0e69a21e
No related branches found
No related tags found
No related merge requests found
...@@ -237,6 +237,7 @@ Tutorial ...@@ -237,6 +237,7 @@ Tutorial
* t12.geo:: * t12.geo::
* t13.geo:: * t13.geo::
* t14.geo:: * t14.geo::
* t15.geo::
Options Options
...@@ -2690,8 +2691,11 @@ Here is a list of all other mesh commands currently available: ...@@ -2690,8 +2691,11 @@ Here is a list of all other mesh commands currently available:
@ftable @code @ftable @code
@item Point | Line @{ @var{expression-list} @} In Surface @{ @var{expression} @}; @item Point | Line @{ @var{expression-list} @} In Surface @{ @var{expression} @};
Embed the point(s) or line(s) in the given surface. The surface mesh 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 will conform to the mesh of the point(s) or lines(s).
lines only work with the MeshAdapt 2-D algorithm.
@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} @}; @item Periodic Line @{ @var{expression-list} @} = @{ @var{expression-list} @};
Force mesh of lines on the left-hand side (slaves) to match the mesh of 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 ...@@ -4277,6 +4281,7 @@ system}. Screencasts that show how to use the GUI are available on
* t12.geo:: * t12.geo::
* t13.geo:: * t13.geo::
* t14.geo:: * t14.geo::
* t15.geo::
@end menu @end menu
@c ------------------------------------------------------------------------- @c -------------------------------------------------------------------------
...@@ -4400,11 +4405,20 @@ system}. Screencasts that show how to use the GUI are available on ...@@ -4400,11 +4405,20 @@ system}. Screencasts that show how to use the GUI are available on
@c t14.geo @c t14.geo
@c ------------------------------------------------------------------------- @c -------------------------------------------------------------------------
@node t14.geo, , t13.geo, Tutorial @node t14.geo, t15.geo, t13.geo, Tutorial
@section @file{t14.geo} @section @file{t14.geo}
@verbatiminclude ../../tutorial/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 =========================================================================
@c Options @c Options
@c ========================================================================= @c =========================================================================
......
/*********************************************************************
*
* 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};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment