-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfun.m
21 lines (21 loc) · 815 Bytes
/
fun.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function N = fun(ks,yt,zita,ndim,mnode)
% ËĽڵãËıßĞεÄĞκ¯Êı
N = zeros(mnode,1);
if ndim == 2
if mnode == 4
N = zeros(4,1);
N(1) = (1-ks)*(1-yt)/4;
N(2) = (1+ks)*(1-yt)/4;
N(3) = (1+ks)*(1+yt)/4;
N(4) = (1-ks)*(1+yt)/4;
elseif mnode == 8
N(1) = (1/4).*(1+(-1).*ks).*(1+(-1).*yt).*((-1)+(-1).*ks+(-1).*yt);
N(2) = (1/4).*(1+ks).*(1+(-1).*yt).*((-1)+ks+(-1).*yt);
N(3) = (1/4).*(1+ks).*(1+yt).*((-1)+ks+yt);
N(4) = (1/4).*(1+(-1).*ks).*(1+yt).*((-1)+(-1).*ks+yt);
N(5) = (1/2).*(1+(-1).*ks.^2).*(1+(-1).*yt);
N(6) = (1/2).*(1+ks).*(1+(-1).*yt.^2);
N(7) = (1/2).*(1+(-1).*ks.^2).*(1+yt);
N(8) = (1/2).*(1+(-1).*ks).*(1+(-1).*yt.^2);
end
end