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

📄 two_circles.m

📁 有限元计算中
💻 M
字号:
% The circle circumference consists of two arcs, which are given centers
% slightly offset from the true center of the circle.  The mesh generator
% needs this to make sense of the orientation of the arcs.
h=1.8;
[fens,gcells,groups,edge_gcells,edge_groups]=targe2_mesher({...
    'curve 1 circle  Center 0 0 radius 5',...
    'curve 2 circle Center 0.5 -1.5 radius 2',...
    ['subregion 1  property 1 boundary 1 hole -2 '],...
    ['m-ctl-point constant ' num2str(h)]
    }, 1.0);
drawmesh({fens,gcells},'gcells','nodes','shrink', 0.8);
view(2)
geom = field(struct('name',['geom'], 'dim', 2, 'fens',fens));
xy=get(geom,'values');
z=xy(:,1)*0;
geom3 = field(struct ('name', ['geom3'],  'data',[xy, z]));
gv=graphic_viewer;
gv=reset (gv,[]);
for i=1:length (gcells)
    draw(gcells(i), gv, struct ('x',geom3, 'u',0*geom3,...
        'facecolor','red', 'shrink',0.9));
    draw(gcells(i), gv, struct ('x',geom, 'u',0*geom, ...
        'facecolor','none'));
end
gv=rotate (gv);


⌨️ 快捷键说明

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