?? test1.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 + -