swp1.m
来自「有限元法计算平板受集中载荷的程序」· M 代码 · 共 61 行
M
61 行
function [point1,weight1]=swp1(ngl)
%-------------------------------------------------------------------
% 目的:
% 求一维高斯积分点坐标和权系数
% 变量:
% ngl - 积分点数
% point1 - 积分点坐标
% weight1 - 权系数
%-------------------------------------------------------------------
% 初始化
point1=zeros(ngl,1);
weight1=zeros(ngl,1);
% 找出相应的积分点和权系数
if ngl==1
point1(1)=0.0;
weight1(1)=2.0;
elseif ngl==2 % 两点积分准则
point1(1)=-0.577350269189626;
point1(2)=-point1(1);
weight1(1)=1.0;
weight1(2)=weight1(1);
elseif ngl==3 % 三点积分准则
point1(1)=-0.774596669241483;
point1(2)=0.0;
point1(3)=-point1(1);
weight1(1)=0.555555555555556;
weight1(2)=0.888888888888889;
weight1(3)=weight1(1);
elseif ngl==4 % 四点积分准则
point1(1)=-0.861136311594053;
point1(2)=-0.339981043584856;
point1(3)=-point1(2);
point1(4)=-point1(1);
weight1(1)=0.347854845137454;
weight1(2)=0.652145154862546;
weight1(3)=weight1(2);
weight1(4)=weight1(1);
else %五点积分准则
point1(1)=-0.906179845938664;
point1(2)=-0.538469310105683;
point1(3)=0.0;
point1(4)=-point1(2);
point1(5)=-point1(1);
weight1(1)=0.236926885056189;
weight1(2)=0.478628670499366;
weight1(3)=0.568888888888889;
weight1(4)=weight1(2);
weight1(5)=weight1(1);
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?