-
Notifications
You must be signed in to change notification settings - Fork 0
/
BiharmonicMatrix.m
executable file
·62 lines (58 loc) · 3.58 KB
/
BiharmonicMatrix.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
function A = Argy1risMatrix1
%ARGy1RISMATRIx1 Summary1 of this function goes here
% Detailed ex1planation goes here
%This gives the Matrix that needs to be solved for the Argyris bases
%functions on the reference triangle.
% Row 1 is phi(x1,y1)
% Row 2 is phi_x(x1,y1)
% Row 3 is phi_y(x1,y1)
% Row 4 is phi_xx(x1,y1)
% Row 5 is phi_yy(x1,y1)
% Row 6 is phi_xy(x1,y1)
% Row 7 is phi(x2,y2)
% Row 8 is phi_x(x2,y2)
% Row 9 is phi_y(x2,y2)
% Row 10 is phi_xx(x2,y2)
% Row 11 is phi_yy(x2,y2)
% Row 12 is phi_xy(x2,y2)
% Row 13 is phi(x3,y3)
% Row 14 is phi_x(x3,y3)
% Row 15 is phi_y(x3,y3)
% Row 16 is phi_xx(x3,y3)
% Row 17 is phi_yy(x3,y3)
% Row 18 is phi_xy(x3,y3)
% Row 19 is dphi/dn1
% Row 20 is dphi/dn2
% Row 21 is dphi/dn3
% phi = c1 c2*x c3*x^2 c4*x^3 c5*x^4 c6*x^5 c7*y c8*y^2 c9*y^3 c10*y^4
%c11*y^5 c12*x*y c13*x*y^2 c14*x*y^3 c15*x*y^4 c16*x^2*y
%c17*x^2*y^2 c18*x^2*y^3 c19*x^3*y c20*x^3*y^2 c21*x^4*y;
[x1 y1 x2 y2 x3 y3] = [0 0 1 0 0 1];
x4 = (x2-x3)/2; x5=(x3-x1)/2; x6=(x2-x1)/2;
y4 = (y2-y3)/2; y5=(y3-y1)/2; y6=(y2-y1)/2;
A = [ 1 x1 x1^2 x1^3 x1^4 x1^5 y1 y1^2 y1^3 y1^4 y1^5 x1*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