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

📄 divide.m

📁 C++编译指导
💻 M
字号:
function  mesh = divide(mesh,t,p)
% DIVIDE divide triangle t into two triangels 
%
% USAGE
%   [mesh,eta] = divide(mesh,eta,t,p)
%
% INPUT
%   mesh:  current mesh
%    eta:  error indicator for each triangle
%      t:  triangle to be divided
%      p:  vertices of triangle t and new vertex
%            p(1),p(2),p(3) are vertices of t
%            p(4) new vertex which is opposite to p(1)
%
% OUTPUT
%   mesh:  new mesh

%

%--------------------------------------------------------------------------
% Add one element
%--------------------------------------------------------------------------
new = size(mesh.elem,1) + 1; % append new element to the end of elem array
mesh.elem(t,:)   = [p(4),p(1),p(2)]; % t is always a left child
mesh.elem(new,:) = [p(4),p(3),p(1)]; % new is a right child
% the newest vertex p(4) is the first vertex in each triangle
%--------------------------------------------------------------------------
% End of function DIVIDE
%--------------------------------------------------------------------------

⌨️ 快捷键说明

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