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

📄 test1.m

📁 matlab有限元分析工具,比经较全面的一个手册,请大家下载呀
💻 M
字号:
%% QMG test 1%% This is an approximation to the mesh on the cover of Claes %% Johnson's book ``Numerical solutions of partial differential%% equations by the finite element method'' , Cambridge U. Press 1987.%% It has greater refinement near the origin.global interactivewedgeangle = pi / 6.0;%% Make a circular approximation with 4 Bezier curves from pi/6 to 2pi.[verts,codes] = gm_circ_approx(wedgeangle, 2*pi, 4);newverts = [0,0;verts];newcodes = [0;codes];domain = gm_cpoly(newverts, newcodes);% The size function is of the form h0*r^p+f, where p is determined% by (4.31) in Johnson, and f is determined so that the H1 error on% the innermost triangles matches the H1 error everywhere else.h0 =  0.2;gamma = pi / (2*pi - wedgeangle);f  = h0 ^ (1.0/gamma);p = 1.0 - gamma;sizectl = sprintf('(formula (%d * (%%0^2+%%1^2)^(%d/2.0) + %d))', h0, p, f);show =  0;if length(interactive) > 0  disp(sprintf('size control string = %s', sizectl));  show = 1;endmesh = gmmeshgen(domain, 'size', sizectl, 'show', show);[scrap, numvtx] = size(mesh{4});asp  = gmchecktri(domain,mesh);global aspprodglobal meshsizesumif length(aspprod) > 0  aspprod = aspprod * asp;  meshsizesum = meshsizesum + numvtx;endif length(interactive) > 0  gmviz(mesh)end% ------------------------------------------------------------------% Copyright (c) 1999 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 2.0 of QMG, release date September 3, 1999.% ------------------------------------------------------------------

⌨️ 快捷键说明

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