-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLHS.m
29 lines (26 loc) · 796 Bytes
/
LHS.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function G = LHS(C,ne,np,p,Verts,Xe,he)
% Function calculant le premier terme de la projection: G = B*D
%
% SYNOPSIS: G = LHS(C,ne,np,p,Verts,Xe,he);
% INPUT : C : la matrice des deformations .ne : nbre de noeuds
% np : nbre de monomes .p : base de monomes
% Verts: coordonees (x,y) de l element E
% Xe : le centroide .he : diametre
% OUTPUT : G : la matrice
% AUTEUR : Diallo Amadou, 28/09/2020
D = dof(ne,np,p,Verts);
B = RHS_P(C,ne,np,p,Verts,he);
G = B*D;
V = zeros(2*ne,2*np);
for k = 1:ne
Vtx = Verts(k,:); %
for i = 1:2
for j = 1:2*np
V(2*k-2+i,j) = p{i,j}(Vtx(1),Vtx(2));
end
end
end
for i = 1:3
G(i,:) = sum(V(:,i).*V)/ne;
end
end