?? ref.html
字號:
face. The property name is the last argument (a string). The
face is specified by the two middle arguments (integers). The first
integer is the face's dimension, and the second is the index of
the particular face of that dimension (numbered consecutively starting
with 0).
The value assigned
to that property is return, or the empty string if there is none.
In the Tcl calling format, the brep should be in list form
(i.e., converted to a list by
<a href="#gm_obj2list"><code>gm_obj2list</code></a>).
<h3>
<a name="gmmake_circ"></a><a name="gmmake_cyl"></a><a name="gmmake_torus"></a>
gmmake_circ, gmmake_cyl, gmmake_torus
(Matlab and Tcl)</h3>
<blockquote>
Matlab:
<blockquote>
<strong>
<em>brep</em> = gmmake_cyl(<em>numsubdiv</em>);<br>
<em>brep</em> = gmmake_torus(<em>innerrad, outerrad, numsubdiv</em>);<br>
<em>brep</em> = gmmake_circ(<em>numsubdiv</em>);<br>
</strong>
</blockquote>
Tcl:
<blockquote>
<strong>
gmset <em>brep</em> [gmmake_cyl <em>numsubdiv</em>]<br>
gmset <em>brep</em> [gmmake_torus <em>innerrad outerrad numsubdiv</em>]<br>
gmset <em>brep</em> [gmmake_circ <em>numsubdiv</em>]<br>
</strong>
</blockquote>
</blockquote>
These routines construct three standard geometric shapes.
The first makes a cylinder of height 2, radius 1, centered at the
origin, with the z-axis as its axis of symmetry. The argument
<em>numsubdiv</em> (in all three routines) indicates the number
of Bezier patches to use in the approximation. The cylinder
routine uses degree-(3,1) quadrilateral patches on the cylinder side
and degree-3 triangular patches on the ends. If you need a cylinder
with a different height, width, center or orientation, you can apply
a transformation using <a href="#gmapply"><code>gmapply</code></a>.
<p>
The second routine makes a torus out of degree-(2,2) quadrilateral
patches. The torus is centered at the origin and is symmetric about
the z-axis. The first argument is the inner radius (of the hole) and
the second argument is the outer radius. Thus, the tube-diameter is
the difference between these radii.
<p>
The third routine makes a unit circle approximation
out of cubic bezier curves.
<p>
Other interesting geometric shapes (a sphere; platonic solids) have
been precomputed and stored in the $QMG_ROOT/data directory.
<h3><a name="gmmouse">gmmouse</a> (Matlab and Tcl)</h3>
<blockquote>
Matlab:
<strong>
<em>brep</em>=gmmouse;
</strong><br>
Tcl/Tk:
<strong>
gmset <em>brep</em> [gmmouse]
<br>
</blockquote>
This routine puts up a window on the screen in which the user
can click points with the mouse to create a 2D brep. The user
can also create Bezier curves by selecting control points. A
set of radio-buttons at the bottom of the window indicate
what the next mouse click represents (either the start of a
new loop, the start of a topological edge, the start of a
Bezier curve, or an interior control point of a curve).
<h3><a name="gmpolygon">gmpolygon</a> (Matlab and Tcl) </h3>
<blockquote>
Matlab:
<strong>
<em>brep</em>=gmpolygon(<em>nside</em>);
</strong><br>
Tcl/Tk:
<strong>
gmset <em>brep</em> [gmpolygon <em>nside</em>]
</strong>
<br>
</blockquote>
This routine creates a brep equal to a 2D regular n-gon. The
argument is the number of sides.
<h3><a name="gm_polytri">gm_polytri</a> (C++) </h3>
<blockquote>
Matlab:
<strong>
<em>brep</em>=gm_polytri(<em>vertices, edges {, tol}</em>)
</strong><br>
Tcl/Tk:
<strong>
gmset <em>brep</em> [gm_polytri <em> vertices edges { tol }</em>]
</strong>
<br>
</blockquote>
This routine computes the constrained Delaunay triangulation
of a polygon. It uses an O(<em>n</em><sup>2</sup> log <em>n</em>) algorithm that
seems to be very robust (but not optimally efficient). The
first argument is a list of node coordinates of the polygon.
This argument is
a matrix with one coordinate per row. The number of columns
in the matrix is either two or three. In Matlab, this argument
must be a <a href="geom.html#zba">zba.</a>
The second argument is the list of edges of the polygon. It
is a matrix of integers with two columns. Each row represents
an edge in the matrix, and the two entries are integer zero-based
indices into the node array. The last optional argument is a
tolerance. The tolerance is relevant only in 3D and indicates
the allowable deviation from coplanarity of the vertices.
<p>
The return variable is a matrix of integers with three columns.
Each row of this matrix is one triangle of the triangulation.
Each triangle is represented by three integers, which are indices of
the three nodes of that triangle.
<h3><a name="gmsummary">gmsummary</a> (Tcl only) </h3>
<blockquote>
Tcl/Tk: <strong>
gmsummary <em>obj</em>
</strong>
</blockquote>
This routine prints out a summary of the object, which is either
a brep or simplicial complex.
<h2><a name="mgfe">Mesh generation and finite element analysis </a></h2>
<h3><a name="gmboundary">gmboundary</a> (C++) </h3>
<blockquote>
Matlab:
<strong>
<em>newmesh</em> = gmboundary(<em>mesh</em>);<br>
</strong>
Tcl/Tk:
<strong>
gmset <em>newmesh</em> [gmboundary <em>mesh</em>]<br>
</strong>
</blockquote>
This routine computes the boundary of a mesh. For instance, if the
input mesh is a tetrahedral mesh in 3D, then the output of this
routine would be triangular mesh embedded in 3D that triangulates
the boundary faces of the original brep. The global vertex numbersare preserved.
<h3><a name="gmchecktri">gmchecktri</a> (C++) </h3>
<blockquote>
Matlab:
<strong>
<em>worstasp</em> = gmchecktri(<em>brep, mesh {, checko {, tol}}</em>);
<br>
</strong>
Tcl/Tk:
<strong>
gmset <em>worstasp</em> [gmchecktri <em>brep mesh {checko { tol}}</em>]
<br>
</strong>
</blockquote>
This routine checks that a mesh is valid for a brep. It generates
a small printout with information about the mesh, such as the
worst aspect ratio and the longest side length.
The optional third argument tells the routine whether to check
<a href="geom.html#orientation">orientation</a> of mesh elements.
Allowable values are 0 (indicating that orientation
should not be checked), 1 (indicating that elements should
be checked for right-hand orientation)
or 2 (indicating that
elements should be checked for left-hand orientation). The default
is 1. The optional fourth argument is a relative tolerance for the
allowable
distance between the real coordinates
of mesh nodes that lie on boundaries and the real coordinates
as computed from the parametric coordinates of that node.
<p>
The return value is the worst <a href="geom.html#aspect_ratio"> aspect
ratio</a> among all elements,
or -1 if there is an error in the mesh.
<h3><a name="gmdouble">gmdouble</a> (C++) </h3>
<blockquote>
Matlab:
<strong>
<em>newbrep</em> = gmdouble(<em>brep, facelist</em>);<br>
</strong>
or:
<strong>
[<em>newbrep, newmesh</em>] = gmdouble(<em>brep, facelist, mesh</em>);<br>
</strong>
Tcl/Tk:
<strong>
gmset <em>newbrep</em> [gmdouble <em>brep, facelist</em>]<br>
</strong>
or:
<strong>
gmset {<em>newbrep newmesh</em>} [gmdouble <em>brep
facelist mesh</em>];<br>
</strong>
</blockquote>
This routine doubles an internal boundary face (i.e., replaces
it with two faces with different names). In the second calling
format, it also doubles the nodes of a mesh that lie on the
doubled face. For more information, see the <a href="fe.html#double">
section</a> on this topic of the finite element documentation.
<h3><a name="gmfem">gmfem (Matlab only)</a></h3>
<blockquote>
Matlab:
<strong>
<em>u</em> =
gmfem(<em>brep, scomplex {, conductivity {, source {, userdata}}}</em>);
</strong>
</blockquote>
This routine solves a boundary value problem of the form
<blockquote>
div (<em>c</em>·grad <em>u</em>) = −<em>f</em> on <em>D</em> <br>
<em>u</em> = <em>g</em> on <em>B1</em> <br>
<em>c·du/dn</em> = <em>h</em> on <em>B2</em> <br>
</blockquote>
It uses a piecewise linear finite element method. See
the <a href="fe.html">finite element documentation</a>
for information on how this function works.
<h3><a name="gm_mcompo">gm_mcompo (C++)</a></h3>
<blockquote>
Matlab:
<strong>
<em>compnum</em> = gm_mcompo(<em>mesh</em>);<br>
</strong>
Tcl:
<strong>
gmset <em>compnum</em> [gm_mcompo <em>mesh</em>]<br>
</strong>
</blockquote>
This routine finds connected components of a mesh. It labels
the nodes according to the component containing them. Thus,
the return value is an integer array (a <a href="geom.html#zba">zba</a>
in Matlab) with one entry per node of the mesh; the entry is the node's
component number. Components are numbered starting with 0.
<h3><a name="gmmeshgen">gmmeshgen (Matlab and Tcl)</a></h3>
<blockquote>
Matlab:
<strong>
<em>mesh</em> = gmmeshgen(<em>brep</em>,<em>opt</em><sub>1</sub>,
<em>val</em><sub>1</sub>,
…, <em>opt</em><sub><em>n</em></sub>,
<em>val</em><sub><em>n</em></sub>);<br>
</strong>
Tcl:
<strong>
gmset <em>mesh</em> [gmmeshgen <em>brep</em> <em>opt</em><sub>1</sub>
<em>val</em><sub>1</sub>
… <em>opt</em><sub><em>n</em></sub> <em>val</em><sub><em>n</em></sub>]
<br>
</strong>
</blockquote>
This is the main mesh generator in QMG. Please see the
<a href="meshgen.html">mesh generation documentation</a>.
This routine is a Matlab/Tcl front end to a C++ routine
<code>gm_meshgen</code>.
<h3><a name="gmmeshsize">gmmeshsize (C++)</a></h3>
<blockquote>
Matlab:<strong>[<em>numnodes,numelts</em>] = gmmeshsize(<em>mesh</em>);<br></strong>Tcl:
<strong>
gmset {<em>numnodes numelts</em>} [gmmeshsize <em>mesh</em>]
<br>
</strong>
</blockquote>
This routine returns the number of nodes and number of elements
in a mesh. </code>
</pre>
<h2><a name="graphics">Graphics</a>
</h2>
<h3><a name="gmplot">gmplot (Matlab only)</a>
</h3>
<blockquote>
Matlab:
<strong>
gmplot(<em>mesh, soln {, solnrange {,cmap}}</em>)
</strong>
</blockquote>
<p>
This routine is described in the <a href="graphics.html#gmplot">graphics
documentation page</a>.
<h3><a name="gmrndcolor">gmrndcolor (Matlab and Tcl)</a>
</h3>
<blockquote>
Matlab:
<strong>
<em>newbrep</em> = gmrndcolor(<em>brep{, dimtocolor}}</em>)
</strong>
<br>
Tcl:
<strong>
gmset <em>newbrep</em> [gmrndcolor <em> brep {dimtocolor}</em>]
</strong>
<br>
</blockquote>
<p>
This routine is described in the
<a href="graphics.html#gmrndcolor">graphics
documentation page</a>.
<h3><a name="gmshowcolor">gmshowcolor (Matlab and Tcl)</a>
</h3>
<blockquote>
Matlab:
<strong>
gmshowcolor(<em>brep{, dimtoshow}}</em>)
</strong>
<br>
Tcl:
<strong>
gmshowcolor <em>brep {dimtoshow}</em>
</strong>
<br>
</blockquote>
This routine displays the colors assigned to brep faces. It makes
a chart with one row per face. The row indicates the face's color
(shown graphically and numerically) and the face's name. The
routine shows all faces of dimension <em>dimtoshow</em> in
numerical order. The <em>dimtoshow</em>
argument is optional and defaults to
1 less than the embedded dimension of the brep, or the intrinsic
dimension, whichever is smaller.
<h3><a name="gmviz">gmviz (Matlab and Tcl)</a></h3>
<blockquote>
Matlab:
<strong>
gmviz(<em>obj {, dimlist {, colorlist}}</em>)
</strong>
<br>
or
<strong>
gmviz({<em>mesh,brep</em>}<em> {, dimlist {, colorlist}}</em>)<br>
</strong>
Tcl:
<strong>
gmviz <em>obj { dimlist { colorlist}}</em>
</strong>
<br>
or
<strong>
gmviz [list <em>mesh brep</em>]<em> { dimlist { colorlist}}</em>
</strong>
</blockquote>
This routine plots breps or meshes. In the first calling format,
<em>obj</em> is a brep or mesh. In the second calling format,
the first argument is a mesh-brep pair, where the mesh must have
been generated for the brep. The <em>dimlist</em> argument lists
the dimensions of the object to plot. The <em>colorlist</em> argument
is the colors to use. The list of colors is in correspondence with
the list of dimensions. The colors in Matlab may be specified
as a <em>k</em>×4 matrix, where <em>k</em> is the number
of dimensions to plot. In this case, each row of the matrix is
a color 4-tuple of the form <a href="graphics.html#color">(<em>r,g,b,a</em>)</a>.
The colors may also be a list of <em>k</em> one-character color codes
like 'r' or 'c'.
<p>
In Tcl/Tk, the optional third argument is either a list of X11 colors
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -