gm_sizecontrol_interior.m

来自「算断裂的」· M 代码 · 共 37 行

M
37
字号
function sizeval = gm_sizecontrol_interior(realpoint, fspec, sizefunc)%% gm_sizecontrol_interior: called by gm_meshgen to control interior element size%% sz = gm_sizecontrol_interior(realpoint, fspec, sizefunc)%% This routine is invoked by the mesh generators to%% determine the mesh size function.  Argument proc is the%% size control function.  See the documentation for more%% information.proc = gm_strim(sizefunc);if proc(1) ~= '('  error('size control procedure must start with a parenthesis')endif proc(length(proc)) ~= ')'  error('Unbalanced parentheses in size control procedure');endproc(1) = ' ';proc(length(proc)) = ' ';proc = gm_strim(proc);[first, rest] = strtok(proc);first = gm_strim(first);rest = gm_strim(rest);%% The next test could be commented out because "const" is%% caught by the mesh generators, so gmsize_control should%% never be reached in that case.if strcmpi(first, 'const')  sizeval = str2num(rest);elseif strcmpi(first, 'formula') | strcmpi(first, 'vecformula')  formula = gm_percentsub(rest, 'realpoint(', '+1)');  sizeval = eval(formula);else  error('Unknown sizecontrol keyword');end

⌨️ 快捷键说明

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