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

*** empty log message ***

parent 1ef7a439
Branches
Tags
No related merge requests found
......@@ -23,7 +23,7 @@
<H1>README 1/10</H1>
[<A HREF="#top">top</A>][prev][<A HREF="#file2">next</A>]
<PRE>
$Id: tutorial.html,v 1.21 2001-08-31 07:08:47 geuzaine Exp $
$Id: tutorial.html,v 1.22 2001-09-01 09:19:43 geuzaine Exp $
Here are the examples in the Gmsh tutorial. These examples are
commented (both C and C++-style comments can be used in Gmsh input
......@@ -250,8 +250,8 @@ Physical Surface(100) = {6} ;
*
* Gmsh tutorial 2
*
* Includes, Geometrical transformations, Elementary entities
* (Volumes), Physical entities (Volumes)
* Includes, Geometrical transformations, Extruded geometries,
* Elementary entities (Volumes), Physical entities (Volumes)
*
*********************************************************************/</FONT></I>
......@@ -464,7 +464,7 @@ Lc2 = 0.003 ;
</FONT></I><I><FONT COLOR="#B22222">// Grouping is done, as usual, with parentheses.
</FONT></I><I><FONT COLOR="#B22222">//
</FONT></I><I><FONT COLOR="#B22222">// In addition to these operators, all C mathematical functions can
</FONT></I><I><FONT COLOR="#B22222">// also be used (note the first capital letter):
</FONT></I><I><FONT COLOR="#B22222">// also be used (note the first capital letter), i.e.
</FONT></I><I><FONT COLOR="#B22222">//
</FONT></I><I><FONT COLOR="#B22222">// Exp(x)
</FONT></I><I><FONT COLOR="#B22222">// Log(x)
......@@ -484,11 +484,11 @@ Lc2 = 0.003 ;
</FONT></I><I><FONT COLOR="#B22222">// Floor(x)
</FONT></I><I><FONT COLOR="#B22222">// Ceil(x)
</FONT></I><I><FONT COLOR="#B22222">// Fmod(x,y)
</FONT></I><I><FONT COLOR="#B22222">// Hypot(x,y)
</FONT></I>
<I><FONT COLOR="#B22222">// An additional function 'Rand(x)' generates a random number in [0,x]
</FONT></I><I><FONT COLOR="#B22222">//
</FONT></I><I><FONT COLOR="#B22222">// Rand(x)
</FONT></I><I><FONT COLOR="#B22222">// as well as a series of other functions:
</FONT></I><I><FONT COLOR="#B22222">//
</FONT></I><I><FONT COLOR="#B22222">// Hypot(x,y) computes Sqrt(x^2+y^2)
</FONT></I><I><FONT COLOR="#B22222">// Rand(x) generates a random number in [0,x]
</FONT></I><I><FONT COLOR="#B22222">//
</FONT></I><I><FONT COLOR="#B22222">// The only predefined constant in Gmsh is Pi.
</FONT></I>
......@@ -583,8 +583,9 @@ lcar3 = .075;
<I><FONT COLOR="#B22222">// In order to change these lengths globally (without changing the
</FONT></I><I><FONT COLOR="#B22222">// file), a global scaling factor for all characteristic lengths can
</FONT></I><I><FONT COLOR="#B22222">// be specified on the command line with the option '-clscale'. For
</FONT></I><I><FONT COLOR="#B22222">// example, with:
</FONT></I><I><FONT COLOR="#B22222">// be specified on the command line with the option '-clscale' (or
</FONT></I><I><FONT COLOR="#B22222">// with the option Mesh.CharacteristicLengthFactor). For example,
</FONT></I><I><FONT COLOR="#B22222">// with:
</FONT></I><I><FONT COLOR="#B22222">//
</FONT></I><I><FONT COLOR="#B22222">// &gt; gmsh t5 -clscale 1
</FONT></I><I><FONT COLOR="#B22222">//
......@@ -671,6 +672,11 @@ Function CheeseHole
l7 = newreg; Line Loop(l7) = {c2,c7,c12}; Ruled Surface(newreg) = {l7};
l8 = newreg; Line Loop(l8) = {-c6,-c9,c2}; Ruled Surface(newreg) = {l8};
<I><FONT COLOR="#B22222">// Warning: surface meshes are generated by projecting a 2D mesh in
</FONT></I><I><FONT COLOR="#B22222">// the mean plane of the surface. This gives nice results only if the
</FONT></I><I><FONT COLOR="#B22222">// surface curvature is small enough. Otherwise you will have to cut
</FONT></I><I><FONT COLOR="#B22222">// the surface in pieces.
</FONT></I>
<I><FONT COLOR="#B22222">// Arrays of variables can be manipulated in the same way as classical
</FONT></I><I><FONT COLOR="#B22222">// variables. Warning: accessing an uninitialized element in an array
</FONT></I><I><FONT COLOR="#B22222">// will produce an unpredictable result. Note that whole arrays can
......@@ -1170,18 +1176,14 @@ EndFor
</FONT></I>
Include &quot;view3.pos&quot; ;
<I><FONT COLOR="#B22222">// Plugins can be controlled as other options in Gmsh. For example,
</FONT></I><I><FONT COLOR="#B22222">// the CutMap plugin extracts an isovalue surface from a 3D scalar
</FONT></I><I><FONT COLOR="#B22222">// view. The plugin can either be called from the graphical interface
</FONT></I><I><FONT COLOR="#B22222">// (right click on the view button, then Plugins-&gt;CutMap), or from
</FONT></I><I><FONT COLOR="#B22222">// the command file, as is shown below.
</FONT></I>
<I><FONT COLOR="#B22222">// This sets the optional parameter A of the CutMap plugin to the
</FONT></I><I><FONT COLOR="#B22222">// value 0.67 (see the About in the graphical interface for the
</FONT></I><I><FONT COLOR="#B22222">// documentation of each plugin), and runs the plugin:
<I><FONT COLOR="#B22222">// Plugins can be controlled in the same way as other options in
</FONT></I><I><FONT COLOR="#B22222">// Gmsh. For example, the CutMap plugin (which extracts an isovalue
</FONT></I><I><FONT COLOR="#B22222">// surface from a 3D scalar view) can either be called from the
</FONT></I><I><FONT COLOR="#B22222">// graphical interface (right click on the view button, then
</FONT></I><I><FONT COLOR="#B22222">// Plugins-&gt;CutMap), or from the command file:
</FONT></I>
Plugin(CutMap).A = 0.67 ;
Plugin(CutMap).iView = 0 ; <I><FONT COLOR="#B22222">//select View[0] as the working view
Plugin(CutMap).A = 0.67 ; <I><FONT COLOR="#B22222">// iso-value level
</FONT></I>Plugin(CutMap).iView = 0 ; <I><FONT COLOR="#B22222">// source view is View[0]
</FONT></I>Plugin(CutMap).Run ;
<I><FONT COLOR="#B22222">// The following runs the CutPlane plugin:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment