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

📄 test7.di

📁 算断裂的
💻 DI
字号:
17:26:56.0 27-Aug-1999-- >> %% QMG 2.0 test 7: a circle with two elliptic holes and a slit.17:26:56.1 27-Aug-1999-- >> global interactive17:26:56.1 27-Aug-1999-- >> %% Make an approximation to a circle using 6 Bezier cubic arcs.17:26:56.1 27-Aug-1999-- >> numseg = 6;17:26:56.1 27-Aug-1999-- >> [verts, scrap] = gm_circ_approx(0, 2*pi, numseg);17:26:56.1 27-Aug-1999-- >> [numvert,scrap] = size(verts);17:26:56.1 27-Aug-1999-- >> verts = verts(1:3*numseg,:);17:26:56.1 27-Aug-1999-- >> codes = kron(ones(numseg,1),[2;3;3]);17:26:56.2 27-Aug-1999-- >> codes(1) = 0;17:26:56.2 27-Aug-1999-- >> c0 = gm_cpoly(verts,codes);17:26:56.2 27-Aug-1999-- >> %% Make two elliptic holes.17:26:56.2 27-Aug-1999-- >> hole1 = gmapply([.2, 0, 0; 0,.1,-.5], c0);17:26:56.2 27-Aug-1999-- >> c = gmcavity(c0,hole1);17:26:56.3 27-Aug-1999-- >> hole2 = gmapply([.2, 0, 0; 0, .1, .5], c0);17:26:56.3 27-Aug-1999-- >> c = gmcavity(c,hole2);17:26:56.5 27-Aug-1999-- >> %% Make a slit by modifying the brep directly.17:26:56.5 27-Aug-1999-- >> %% Insert two new control points at (-.6,-.1) and (.6,.1).17:26:56.5 27-Aug-1999-- >> [scrap,numcp] = size(c{4});17:26:56.5 27-Aug-1999-- >> c{4}(:,numcp:numcp+1) = [.6,-.6;.1,-.1];17:26:56.5 27-Aug-1999-- >> %% Insert two new vertices at these points.17:26:56.5 27-Aug-1999-- >> [scrap,numv] = size(c{5});17:26:56.5 27-Aug-1999-- >> c{5}(:,numv:numv+1) = {'newv1','newv2' {}, {} {}, {} {}, {} {'vertex';[];numcp},{'vertex';[];numcp+1}};17:26:56.5 27-Aug-1999-- >> %% Insert a new edge connecting those vertices.17:26:56.5 27-Aug-1999-- >> [scrap,nume] = size(c{6});17:26:56.5 27-Aug-1999-- >> c{6}(:,nume) = {'newe1' {} {'newv1','newv2'} {} {'bezier_curve';1;[numcp,numcp+1]}};17:26:56.6 27-Aug-1999-- >> %% Insert the new edge as a repeated boundary of the region.17:26:56.6 27-Aug-1999-- >> oldbsize = length(c{7}{2,0}); 17:26:56.6 27-Aug-1999-- >> c{7}{2,0}{oldbsize} = 'newe1';17:26:56.6 27-Aug-1999-- >> c{7}{2,0}{oldbsize+1} = 'newe1';17:26:56.6 27-Aug-1999-- >> c_color = gmrndcolor(c);17:26:56.7 27-Aug-1999-- >> if length(interactive) > 0  gmviz(c_color), gmshowcolor(c_color)end17:26:56.7 27-Aug-1999-- >> %% generate a mesh.  Elements of size about .2.17:26:56.7 27-Aug-1999-- >> show = 0;17:26:56.7 27-Aug-1999-- >> if length(interactive) > 0  show = 1;end17:26:56.7 27-Aug-1999-- >> m = gmmeshgen(c_color,'size','(const .2)', 'show', show);17:26:57.4 27-Aug-1999-- >> %% Display the mesh17:26:57.4 27-Aug-1999-- >> if length(interactive) > 0  gmviz(m)end17:26:57.4 27-Aug-1999-- >> [c_color2, m2] = gmdouble(c_color, {'*'}, m);17:26:57.5 27-Aug-1999-- >> %% Check the mesh.17:26:57.5 27-Aug-1999-- >> asp = gmchecktri(c_color2,m2);Maximum aspect ratio =        19.1017 achieved insimplex #656 of topological entity mregion (2:0) which has vertices 52 366 382 Maximum global side length =  0.206452Minimum global altitude =     0.00212975Number of nodes = 403 number of elements = 69417:26:57.6 27-Aug-1999-- >> %% Default neumann BC du/dn=0 on all faces except the two17:26:57.6 27-Aug-1999-- >> %% holes that get Dirichlet conditions.17:26:57.6 27-Aug-1999-- >> for j = 0 : nume  if length(findstr('cav1',double(c_color2{6}{0,j})))    [npv,scrap] = size(c_color2{6}(1,j));    c_color2{6}{1,j}(:,npv) = {'bc'; '(d (const 1))'};  end  if length(findstr('cav2',double(c_color2{6}{0,j})))    [npv,scrap] = size(c_color2{6}(1,j));    c_color2{6}{1,j}(:,npv) = {'bc'; '(d (const 2))'};  endend17:26:57.7 27-Aug-1999-- >> u = gmfem(c_color2, m2);Conductivity on face mregion is (const 1.0)Source on face mregion is (const 0.0)facet e19 btype = n bfunc = (const 0.0)facet e19_cav1 btype = d bfunc = (const 1)facet e19_cav2 btype = d bfunc = (const 2)facet newe1_$copy0 btype = n bfunc = (const 0.0)facet newe1_$copy1 btype = n bfunc = (const 0.0)Assembled K is 353-by-353 and contains 1927 nonzero entries87062 flops to solve linear system17:26:59.4 27-Aug-1999-- >> if length(interactive) > 0  gmplot(m2, u)end17:26:59.4 27-Aug-1999-- >> global aspprod17:26:59.4 27-Aug-1999-- >> global meshsizesum17:26:59.4 27-Aug-1999-- >> [scrap,numvtx] = size(m2{4});17:26:59.4 27-Aug-1999-- >> if length(aspprod) > 0  aspprod = aspprod * asp;  meshsizesum = meshsizesum + numvtx;end17:26:59.4 27-Aug-1999-- >> % ------------------------------------------------------------------17:26:59.4 27-Aug-1999-- >> % Copyright (c) 1999 by Cornell University.  All rights reserved17:26:59.4 27-Aug-1999-- >> % See the accompanying file 'Copyright' for authorship information,17:26:59.4 27-Aug-1999-- >> % the terms of the license governing this software, and disclaimers17:26:59.4 27-Aug-1999-- >> % concerning this software.17:26:59.5 27-Aug-1999-- >> % ------------------------------------------------------------------17:26:59.5 27-Aug-1999-- >> % This file is part of the QMG software.  17:26:59.5 27-Aug-1999-- >> % Version 2.0 of QMG, release date RELDATE.17:26:59.5 27-Aug-1999-- >> % ------------------------------------------------------------------17:26:59.5 27-Aug-1999-- >> 

⌨️ 快捷键说明

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