matlab计算有限元程序 (2)
matlab用于计算有限单元法的程序示例
function [T,esterrs0,d0]=LocalRefine1(T,TList,hFrac,esterrs0,esterrs,d0,d)
% [T1,esterrs1,d1]=LocalRefine1(T,TList,hFrac,esterrs,d0,d)
%
% This function performs a local refinement of the mesh
% T, refining each triangle whose index belongs to TList.
% Each T_i, i=TList(j), is refined until it is partitioned
% into subtriangles whose diameters are all less than
% hFrac(j) times the diameter of T_i (0<hFrac(j)<=1).
%
% If hFrac is omitted, then hFrac(j) is taken to be 1 for
% each j.
%
% Certain data vectors are also updated for use with
% local error estimation and adaptive refinement.
% Input vectors are:
% esterrs: (Nt by 1) The estimated errors on each
% triangle in the mesh T.
% d0: (Nt by 1) The diameters of the supertriangles
% of the triangles in the mesh T.
% d: (Nt by 1) The diameters of the triangles in T.
%
% Output vectors:
% esterrs1: (Nt1 by 1) The estimated errors from the
% supertriangles of the triangles
% in the output mesh T1.
% d1: (Nt1 by 1) The diameters of the supertriangles
% of the triangles in the mesh T1.
%
% The inputs esterrs, d0, and d are optional; if they are
% not provided, then the outputs esterrs1, d1 are empty.
%
% For a description of the mesh data structure, see
% "help Mesh1".
%
% The algorithm is the recursive newest node bisection.
% This routine is part of the MATLAB Fem code that
% accompanies "Understanding and Implementing the Finite
% Element Method" by Mark S. Gockenbach (copyright SIAM 2006).
if nargin<3 | isempty(hFrac)
hFrac=ones(size(TList));
end
if nargin<6
d0=[];
esterrs=[];
end
% Automatically define bases if necessary.
% Notice that DefineBases uses a heuristic
% algorithm that is not guaranteed to produce
% an acceptable assignment of bases.
if ~isfield(T,'Bases')
T=DefineBases(T);
end
% Get the number of triangles and set the limit:
Nt=size(T.Elements,1);
NtMax=8*Nt;
done=0;
while ~done
% Refine the mesh:
diams=getDiameters(T,TList);
[T,params]=LocalRefine1a(T,TList);
Nt1=size(T.Elements,1);
% If requested, assign the old estimated errors
% and the diameters of the parent triangles to
% each triangle in the new mesh:
if nargin==7 && nargout>=2
% Identify the triangles that resulted from a bisection:
j=find(params.SubTriangles(params.SuperTriangle,2)~=0);
% The old error estimate for the subdivided triangles
% must be updated:
esterrs0=esterrs0(params.SuperTriangle);
esterrs=esterrs(params.SuperTriangle);
esterrs0(j)=esterrs(p
arams.SuperTriangle(j));
d0=d0(params.SuperTriangle);
d=d(params.SuperTriangle);
d0(j)=d(params.SuperTriangle(j));
end
% Stop if the ma
你可能喜欢
- MATLAB有限元
- 有限元分析
- 高三政治复习
- matlab实例教程
- 结构力学大作业
- matlab程序
- 考研英语单词
- matlab教程
- 3结点三角形单元有限元程序MATLAB语言7页
- MATLAB在有限元分析方法中的应用PPT38页
- 《有限元基础教程》_【MATLAB算例】3.3.7(2)__三梁平面框架结构的有限元分析(Beam2D2Node)4页
- 渐开线圆柱齿轮MATLAB建模及其有限元网格的自动划分_郑旖5页
- MATLAB在线性四面体有限元分析中的应用6页
- 有限元平面矩形单元MATLAB程序设计84页
- 双腔颚式破碎机机架三维模型的设计及有限元分析3页
- 基于ANSYS的钢板弹簧的非线性有限元分析2页
- 填埋式柔性液体管道的三维有限元分析案例研究外文翻译15页
- 车用发动机连杆有限元分析及结构设计3页
- LCK6890G城市客车车身结构有限元分析4页
- HFF6137K86型客车骨架静动态有限元分析3页
- 2012届高三政治二轮复习演练能力提升(含答案)(11)3页
- 高三政治复习_哲学常识原理、方法7页
- 学高三政治二轮复习专题八 发展中国特色社会主义文化6页
- 2012高三政治第二轮复习计划7页
- 高三政治复习方略3页
- 高三政治一轮复习教学思路6页
- matlab_简明实例教程72页
- matlab实例教程19页
- matlab实用实例教程72页
- matlab_简明实例教程72页
- matlab_简明实例教程72页
- matlab_简明实例教程72页
- 《结构力学II》大作业31页
- 结构力学大作业五类静定结构在同跨同荷载作用下的内力图8页
- 哈工大结构力学大作业2.14页
- 哈工大结构力学大作业(力学求解器)14页
- 结构力学大作业20页
- 结构力学大作业13页
- 数值分析中常用的matlab程序5页
- matlab程序12页
- matlab实用程序百例140页
- matlab 程序9页
- 第2.4节matlab 程序设计入门10页
- matlab程序设计入门30页
- 考研英语单词2页
- 历年考研英语常考多义单词40页
- 考研英语单词127页
- 巧计单词-考研英语8页
- 考研英语单词25页
- 考研英语每年都出现的单词14页


