89 lines
5.1 KiB
Matlab
89 lines
5.1 KiB
Matlab
function [xt,yt,zt,pt,nbrPoints]=Get3DGuassPoints(type,order)
|
|
%type 网格类型 1为四面体 2为三棱柱
|
|
if type==1
|
|
if order<=1
|
|
xt = 0.25;
|
|
yt = 0.25;
|
|
zt = 0.25;
|
|
pt = 0.166666666667;
|
|
nbrPoints=1;
|
|
elseif order<=2
|
|
xt = [0.25,0.166666666667,0.166666666667,0.166666666667,0.5];
|
|
yt = [0.25,0.166666666667,0.166666666667,0.5,0.166666666667];
|
|
zt = [0.25,0.166666666667,0.5,0.166666666667,0.166666666667];
|
|
pt = [-0.133333333333,0.075,0.075,0.075,0.075];
|
|
nbrPoints=5;
|
|
else
|
|
xt=[0.25,0.0919710780526,0.0919710780526,0.0919710780526,0.724086765841,0.319793627829,...
|
|
0.319793627829,0.319793627829,0.0406191165118,0.0563508326895,0.0563508326895,...
|
|
0.44364916731,0.0563508326895,0.44364916731,0.44364916731];
|
|
yt=[0.25,0.0919710780526,0.0919710780526,0.724086765841,0.0919710780526,0.319793627829,...
|
|
0.319793627829,0.0406191165118,0.319793627829,0.0563508326895,0.44364916731,...
|
|
0.0563508326895,0.44364916731,0.0563508326895,0.44364916731];
|
|
zt=[0.25,0.0919710780526,0.724086765841,0.0919710780526,0.0919710780526,0.319793627829,...
|
|
0.0406191165118,0.319793627829,0.319793627829,0.44364916731,0.0563508326895,...
|
|
0.0563508326895,0.44364916731,0.44364916731,0.0563508326895];
|
|
pt=[0.0197530864198, 0.0119895139632, 0.0119895139632, 0.0119895139632,...
|
|
0.0119895139632, 0.011511367871, 0.011511367871, 0.011511367871,...
|
|
0.011511367871, 0.00881834215168, 0.00881834215168, 0.00881834215168,...
|
|
0.00881834215168, 0.00881834215168, 0.00881834215168];
|
|
nbrPoints=15;
|
|
end
|
|
elseif type==2
|
|
if order<=1
|
|
xt=[0.166666666666666, 0.666666666666666,...
|
|
0.166666666666666, 0.166666666666666,...
|
|
0.666666666666666, 0.166666666666666];
|
|
yt=[0.166666666666666, 0.166666666666666,...
|
|
0.666666666666666, 0.166666666666666,...
|
|
0.166666666666666, 0.666666666666666];
|
|
zt=[-0.577350269189, -0.577350269189, -0.577350269189,...
|
|
0.577350269189, 0.577350269189, 0.577350269189];
|
|
pt=[0.166666666666666, 0.166666666666666,...
|
|
0.166666666666666, 0.166666666666666,...
|
|
0.166666666666666, 0.166666666666666];
|
|
nbrPoints=6;
|
|
elseif order<=2
|
|
xt=[0.166666666666666, 0.666666666666666, 0.166666666666666,...
|
|
0.166666666666666, 0.666666666666666, 0.166666666666666,...
|
|
0.166666666666666, 0.666666666666666, 0.166666666666666];
|
|
yt=[0.166666666666666, 0.166666666666666, 0.666666666666666,...
|
|
0.166666666666666, 0.166666666666666, 0.666666666666666,...
|
|
0.166666666666666, 0.166666666666666, 0.666666666666666];
|
|
zt=[-0.774596669241483, -0.774596669241483, -0.774596669241483, 0., 0., 0.,...
|
|
0.774596669241483, 0.774596669241483, 0.774596669241483];
|
|
pt=[0.0925925925929, 0.0925925925929, 0.0925925925929,...
|
|
0.1481481481481, 0.1481481481481, 0.1481481481481,...
|
|
0.0925925925929, 0.0925925925929, 0.0925925925929];
|
|
nbrPoints=9;
|
|
else
|
|
xt=[0.333333333333333, 0.470142064105115, 0.05971587179, 0.470142064105115,...
|
|
0.101286507323456, 0.79742698535, 0.101286507323456, 0.333333333333333,...
|
|
0.470142064105115, 0.05971587179, 0.470142064105115, 0.101286507323456,...
|
|
0.79742698535, 0.101286507323456, 0.333333333333333, 0.470142064105115,...
|
|
0.05971587179, 0.470142064105115, 0.101286507323456, 0.79742698535,...
|
|
0.101286507323456];
|
|
yt=[0.333333333333333, 0.470142064105115, 0.470142064105115, 0.05971587179,...
|
|
0.101286507323456, 0.101286507323456, 0.79742698535, 0.333333333333333,...
|
|
0.470142064105115, 0.470142064105115, 0.05971587179, 0.101286507323456,...
|
|
0.101286507323456, 0.79742698535, 0.333333333333333, 0.470142064105115,...
|
|
0.470142064105115, 0.05971587179, 0.101286507323456, 0.101286507323456,...
|
|
0.79742698535];
|
|
zt=[-0.774596669241483,-0.774596669241483,-0.774596669241483,-0.774596669241483,...
|
|
-0.774596669241483,-0.774596669241483,-0.774596669241483,0., 0.,0.,0.,...
|
|
0.,0.,0.,0.774596669241483,0.774596669241483,0.774596669241483,...
|
|
0.774596669241483,0.774596669241483,0.774596669241483,0.774596669241483];
|
|
pt=[0.625000000000000E-01, 0.367761535523628E-01, 0.367761535523628E-01,...
|
|
0.367761535523628E-01, 0.349831057068964E-01, 0.349831057068964E-01,...
|
|
0.349831057068964E-01, 0.100000000000000E+00, 0.588418456837804E-01,...
|
|
0.588418456837804E-01, 0.588418456837804E-01, 0.559729691310342E-01,...
|
|
0.559729691310342E-01, 0.559729691310342E-01, 0.625000000000000E-01,...
|
|
0.367761535523628E-01, 0.367761535523628E-01, 0.367761535523628E-01,...
|
|
0.349831057068964E-01, 0.349831057068964E-01, 0.349831057068964E-01];
|
|
nbrPoints=21;
|
|
end
|
|
else
|
|
disp("三维高斯积分获取错误");
|
|
end
|
|
|
|
end |