📄 utildemo.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><html><head> <title>Description of utildemo</title> <meta name="keywords" content="utildemo"> <meta name="description" content="UTILDEMO shows how to load initial mesh from a saved .mat file and how to"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="generator" content="m2html © 2003 Guillaume Flandin"> <meta name="robots" content="index, follow"> <link type="text/css" rel="stylesheet" href="../../m2html.css"></head><body><a name="_top"></a><!-- # AFEM@matlab --><!-- menu.html 1_Example --><h1>utildemo</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2><div class="box"><strong>UTILDEMO shows how to load initial mesh from a saved .mat file and how to</strong></div><h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2><div class="box"><strong>function utildemo </strong></div><h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2><div class="fragment"><pre class="comment"> UTILDEMO shows how to load initial mesh from a saved .mat file and how to use the utilities included in the package for debug purpose</pre></div><!-- crossreference --><h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>This function calls:<ul style="list-style-image:url(../../matlabicon.gif)"><li><a href="../../AFEM@matlab/6_Tool/findedge.html" class="code" title="function findedge(node,edge,i)">findedge</a> FINDEDGE highlights the i-th edge</li><li><a href="../../AFEM@matlab/6_Tool/findelem.html" class="code" title="function findelem(node,elem,i)">findelem</a> FINDELEM highlights the i-th element</li><li><a href="../../AFEM@matlab/6_Tool/findnode.html" class="code" title="function findnode(node,i)">findnode</a> FINDNODE highlights the i-th node</li><li><a href="../../AFEM@matlab/6_Tool/plotelem.html" class="code" title="function plotelem(node,elem)">plotelem</a> PLOTELEM shows the index of each element on the current mesh plot</li><li><a href="../../AFEM@matlab/6_Tool/plotnode.html" class="code" title="function plotnode(node)">plotnode</a> PLOTNODE shows the index of each node on the mesh plot</li><li><a href="../../AFEM@matlab/6_Tool/showmesh.html" class="code" title="function showmesh(node,elem)">showmesh</a> SHOWMESH plots the current mesh determined by node and elem</li><li><a href="../../AFEM@matlab/6_Tool/toolkit.html" class="code" title="function varargout = toolkit(varargin)">toolkit</a> TOOLKIT M-file for toolkit.fig</li></ul>This function is called by:<ul style="list-style-image:url(../../matlabicon.gif)"><li><a href="demo.html" class="code" title="function varargout = demo(varargin)">demo</a> DEMO M-file for demo.fig</li></ul><!-- crossreference --><h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2><div class="fragment"><pre><a name="_sub0" href="#_subfunctions" class="code">function utildemo</a><span class="comment">% UTILDEMO shows how to load initial mesh from a saved .mat file and how to</span><span class="comment">% use the utilities included in the package for debug purpose</span><span class="comment">%</span><span class="comment">% C. Zhang 10-13-2006</span>clear all; figure(1); set(gcf,<span class="string">'Units'</span>,<span class="string">'normal'</span>); set(gcf,<span class="string">'Position'</span>,[0.1,0.1,0.8,0.8]);<span class="comment">%--------------------------------------------------------------------------</span><span class="comment">% Load the initial mesh generated before hand</span><span class="comment">%--------------------------------------------------------------------------</span>load femesh.mat; <span class="comment">%--------------------------------------------------------------------------</span><span class="comment">% Show current mesh</span><span class="comment">%--------------------------------------------------------------------------</span>hold off; <a href="../../AFEM@matlab/6_Tool/showmesh.html" class="code" title="function showmesh(node,elem)">showmesh</a>(node, elem); hold on;title(<span class="string">'showmesh(node, elem)'</span>, <span class="string">'FontSize'</span>,14);pause<span class="comment">%--------------------------------------------------------------------------</span><span class="comment">% Plot node indices</span><span class="comment">%--------------------------------------------------------------------------</span>hold off; <a href="../../AFEM@matlab/6_Tool/showmesh.html" class="code" title="function showmesh(node,elem)">showmesh</a>(node, elem); hold on;<a href="../../AFEM@matlab/6_Tool/plotnode.html" class="code" title="function plotnode(node)">plotnode</a>(node); title(<span class="string">'plotnode(node)'</span>, <span class="string">'FontSize'</span>, 14);pause<span class="comment">%--------------------------------------------------------------------------</span><span class="comment">% Plot element indices</span><span class="comment">%--------------------------------------------------------------------------</span>hold off; <a href="../../AFEM@matlab/6_Tool/showmesh.html" class="code" title="function showmesh(node,elem)">showmesh</a>(node, elem); hold on;<a href="../../AFEM@matlab/6_Tool/plotelem.html" class="code" title="function plotelem(node,elem)">plotelem</a>(node,elem); title(<span class="string">'plotelem(node,elem)'</span>, <span class="string">'FontSize'</span>, 14);pause<span class="comment">%--------------------------------------------------------------------------</span><span class="comment">% Plot edeg indices</span><span class="comment">%--------------------------------------------------------------------------</span>hold off; <a href="../../AFEM@matlab/6_Tool/showmesh.html" class="code" title="function showmesh(node,elem)">showmesh</a>(node, elem); hold on;edge = [elem(:,[1,2]); elem(:,[1,3]); elem(:,[2,3])];edge = unique(sort(edge,2),<span class="string">'rows'</span>);<a href="../../AFEM@matlab/6_Tool/plotelem.html" class="code" title="function plotelem(node,elem)">plotelem</a>(node,edge); title(<span class="string">'plotedge(node,edge)'</span>, <span class="string">'FontSize'</span>, 14);pause<span class="comment">%--------------------------------------------------------------------------</span><span class="comment">% Find a node</span><span class="comment">%--------------------------------------------------------------------------</span>hold off; <a href="../../AFEM@matlab/6_Tool/showmesh.html" class="code" title="function showmesh(node,elem)">showmesh</a>(node, elem); hold on;<a href="../../AFEM@matlab/6_Tool/findnode.html" class="code" title="function findnode(node,i)">findnode</a>(node, 10); <a href="../../AFEM@matlab/6_Tool/findnode.html" class="code" title="function findnode(node,i)">findnode</a>(node, 21); <a href="../../AFEM@matlab/6_Tool/findnode.html" class="code" title="function findnode(node,i)">findnode</a>(node, 19); title(<span class="string">'findnode(node, i)'</span>, <span class="string">'FontSize'</span>, 14);pause<span class="comment">%--------------------------------------------------------------------------</span><span class="comment">% Find an element</span><span class="comment">%--------------------------------------------------------------------------</span>hold off; <a href="../../AFEM@matlab/6_Tool/showmesh.html" class="code" title="function showmesh(node,elem)">showmesh</a>(node, elem); hold on;<a href="../../AFEM@matlab/6_Tool/findelem.html" class="code" title="function findelem(node,elem,i)">findelem</a>(node, elem, 8); <a href="../../AFEM@matlab/6_Tool/findelem.html" class="code" title="function findelem(node,elem,i)">findelem</a>(node, elem, 2); <a href="../../AFEM@matlab/6_Tool/findelem.html" class="code" title="function findelem(node,elem,i)">findelem</a>(node, elem, 18); title(<span class="string">'findelem(node, elem, i)'</span>, <span class="string">'FontSize'</span>, 14);pause<span class="comment">%--------------------------------------------------------------------------</span><span class="comment">% Find an edge</span><span class="comment">%--------------------------------------------------------------------------</span>hold off; <a href="../../AFEM@matlab/6_Tool/showmesh.html" class="code" title="function showmesh(node,elem)">showmesh</a>(node, elem); hold on;<a href="../../AFEM@matlab/6_Tool/findedge.html" class="code" title="function findedge(node,edge,i)">findedge</a>(node, elem, 6); <a href="../../AFEM@matlab/6_Tool/findedge.html" class="code" title="function findedge(node,edge,i)">findedge</a>(node, elem, 16); <a href="../../AFEM@matlab/6_Tool/findedge.html" class="code" title="function findedge(node,edge,i)">findedge</a>(node, elem, 30);title(<span class="string">'findedge(node, edge, i)'</span>, <span class="string">'FontSize'</span>, 14);pause<span class="comment">%--------------------------------------------------------------------------</span><span class="comment">% Find an edge</span><span class="comment">%--------------------------------------------------------------------------</span>close(1); <a href="../../AFEM@matlab/6_Tool/toolkit.html" class="code" title="function varargout = toolkit(varargin)">toolkit</a>(node,elem);<span class="comment">%--------------------------------------------------------------------------</span><span class="comment">% End of function UTILDEMO</span><span class="comment">%--------------------------------------------------------------------------</span></pre></div><hr><address>Generated on Fri 17-Nov-2006 11:02:53 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" target="_parent">m2html</a></strong> © 2003</address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -