⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gmmeshgen.m

📁 matlab有限元分析工具,比经较全面的一个手册,请大家下载呀
💻 M
字号:
function m = gmmeshgen(domain, varargin)%% gmmeshgen: QMG's mesh generator%% m = gmmeshgen(domain, opt1, val1, opt2, val2, ...)%% Constructs a simplicial complex m that is a mesh of brep domain.%% See the documentation for possible option-value pairs.if ~isa(domain,'zba')  error('First argument to gmmeshgen must be a zba');endglobal GM_BREP_TYPE_CODEglobal GM_SIMPCOMP_TYPE_CODEtypecode = double(domain{0});if ~strcmpi(typecode, GM_BREP_TYPE_CODE)  error('First argument to gmmeshgen must be a brep');endgdim = double(domain{1});di = double(domain{2});if (gdim ~= di | (gdim ~= 2 & gdim ~= 3))  error('Brep must be 2- or 3-dimensional and must be full dimensional');endnarg = length(varargin);if rem(narg,2) ~= 0  error('gmmeshgen must have an odd number of arguments')endnoptval = (nargin - 1) / 2;sizectl = '(const 1e308)';curvectl = '(const .5)';global GM_DEFAULT_TOL;tol = GM_DEFAULT_TOL;if di == 2  expa = [.3 .15 .05];  aspdegrade = [.5 .5 .5];elseif (di == 3)  expa = [.2 .1 .07 .01];  aspdegrade = [.5 .5 .5 .5];endshowgui = 1;logfile = 'mglog';verbosity = 1;userdata = '';orientation = 1;for j = 1 : noptval   thisopt = varargin{j * 2 - 1};  thisval = varargin{j * 2};  if ~isstr(thisopt)    error('option names must be strings');  end  thisopt = lower(thisopt);  opt_ok = 0;  f = findstr('sizecontrol', thisopt);  if length(f) > 0 & length(thisopt) <= length('sizecontrol')    if f(1) == 1      if ~isstr(thisval)        error('Size control option must be a string');      end      sizectl = thisval;      opt_ok = 1;    end  end  f = findstr('curvecontrol', thisopt);  if length(f) > 0 & length(thisopt) <= length('curvecontrol')    if f(1) == 1      if ~isstr(thisval)        error('Curve control option must be a string');      end      curvectl = thisval;      opt_ok = 1;    end  end  f = findstr('showgui', thisopt);  if length(f) > 0 & ~opt_ok & length(thisopt) <= length('showgui')    if f(1) == 1      if thisval ~= 0 & thisval ~= 1        error('Showgui value must be 0 or 1');      end      showgui = thisval;      opt_ok = 1;    end  end  f = findstr('expansion', thisopt);  if length(f) > 0 & ~opt_ok & length(thisopt) <= length('expansion')    if f(1) == 1      expa = thisval;      opt_ok = 1;    end  end  f = findstr('aspdegrade', thisopt);  if length(f) > 0 & ~opt_ok & length(thisopt) <= length('aspdegrade')    if f(1) == 1      aspdegrade = thisval;      opt_ok = 1;    end  end  f = findstr('tol', thisopt);  if length(f) > 0 & ~opt_ok & length(thisopt) <= length('tol')    if f(1) == 1      tol = thisval;      opt_ok = 1;    end  end  f = findstr('logfile', thisopt);  if length(f) > 0 & ~opt_ok & length(thisopt) <= length('logfile')    if f(1) == 1      logfile = thisval;      opt_ok = 1;    end  end  f = findstr('verbosity', thisopt) & length(thisopt) <= length('verbosity');  if length(f) > 0 & ~opt_ok    if f(1) == 1      verbosity = thisval;      opt_ok = 1;    end  end  f = findstr('userdata', thisopt) & length(thisopt) <= length('userdata');  if length(f) > 0 & ~opt_ok    if f(1) == 1      userdata = thisval;      opt_ok = 1;    end  end  f = findstr('orientation', thisopt) & length(thisopt) <= length('orientation');  if length(f) > 0 & ~opt_ok    if f(1) == 1      orientation = thisval;      opt_ok = 1;    end  end  if ~opt_ok    errstr = sprintf('Unrecognized option: %s', thisopt);    error(errstr);  endendm = gm_meshgen(domain, sizectl, curvectl, userdata, expa, aspdegrade, ...                 logfile, verbosity, showgui, tol, orientation);% ------------------------------------------------------------------% Copyright (c) 1996 by Cornell University.  All rights reserved.% See the accompanying file 'Copyright' for authorship information,% the terms of the license governing this software, and disclaimers% concerning this software.% ------------------------------------------------------------------% This file is part of the QMG software.  % Version 1.1 of QMG, release date November 15, 1996.% ------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -