Argy1risMatrix1
`function Argy1risMatrix1%(coordary)
%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 c2x c3x^2 c4x^3 c5x^4 c6x^5 c7y c8y^2 c9y^3 c10y^4
%c11y^5 c12xy c13xy^2 c14xy^3 c15xy^4 c16x^2y
%c17x2*y2 c18x2*y3 c19x^3y c20x3*y2 c21x^4*y;
%[x1 y1 x2 y2 x3 y3] = [0 0; 1 0; 0 1];
coordary=[0 0; 1 0; 0 1];
x1=coordary(1,1);y1=coordary(1,2);
x2=coordary(2,1);y2=coordary(2,2);
x3=coordary(3,1);y3=coordary(3,2);
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 x1y1 x1y1^2 x1y1^3 x1y1^4 x1^2y1 x12*y12 x12*y13 x1^3y1 x13*y12 x1^4y1;
% 0 1 2x1 3x1^2 4x1^3 5x1^4 0 0 0 0 0 y1 y1^2 y1^3 y1^4 2x1y1 2x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 is phi(x1,y1)
A1=[1,x1,x12,x13,x14,x15,y1,y12,y13,y14,y15,x1y1,x1y12,x1*y13,x1y14,x12y1,x12*y12,x12*y13,x13*y1,x13y12,x14y1];
% Row 2 is phi_x(x1,y1)
A2=[0,1,2x1,3x12,4*x13,5x14,0,0,0,0,0,y1,y12,y13,y14,2x1y1,2x1y12,2*x1*y13,3x12*y1,3*x12y12,4*x13y1];
% Row 3 is phi_y(x1,y1)
A3=[0,0,0,0,0,0,1,2y1,3y12,4*y13,5y14,x1,2*x1*y1,3*x1*y12,4x1y13,x12,2x12*y1,3*x12y12,x13,2x13*y1,x14];
% Row 4 is phi_xx(x1,y1)
A4=[0,0,2,6x1,12x12,20*x13,0,0,0,0,0,0,0,0,0,2y1,2y12,2*y13,6x1y1,6x1y12,12*x12*y1];
% Row 5 is phi_yy(x1,y1)
A5=[0,0,0,0,0,0,0,2,6y1,12y12,20*y13,0,2x1,6x1y1,12x1y12,0,2*x12,6x12*y1,0,2*x13,0];
% Row 6 is phi_xy(x1,y1)
A6=[0,0,0,0,0,0,0,0,0,0,0,1,2y1,3y12,4*y13,2x1,4x1y1,6x1y12,3*x12,6x12*y1,4*x13];
% Row 7 is phi(x2,y2)
A7=[1,x2,x22,x23,x24,x25,y2,y22,y23,y24,y25,x2y2,x2y22,x2*y23,x2y24,x22y2,x22*y22,x22*y23,x23*y2,x23y22,x24y2];
% Row 8 is phi_x(x2,y2)
A8=[0,1,2x2,3x22,4*x23,5x24,0,0,0,0,0,y2,y22,y23,y24,2x2y2,2x2y22,2*x2*y23,3x22*y2,3*x22y22,4*x23y2];
% Row 9 is phi_y(x2,y2)
A9=[0,0,0,0,0,0,1,2y2,3y22,4*y23,5y24,x2,2*x2*y2,3*x2*y22,4x2y23,x22,2x22*y2,3*x22y22,x23,2x23*y2,x24];
% Row 10 is phi_xx(x2,y2)
A10=[0,0,2,6x2,12x22,20*x23,0,0,0,0,0,0,0,0,0,2y2,2y22,2*y23,6x2y2,6x2y22,12*x22*y2];
% Row 11 is phi_yy(x2,y2)
A11=[0,0,0,0,0,0,0,2,6y2,12y22,20*y23,0,2x2,6x2y2,12x2y22,0,2*x22,6x22*y2,0,2*x23,0];
% Row 12 is phi_xy(x2,y2)
A12=[0,0,0,0,0,0,0,0,0,0,0,1,2y2,3y22,4*y23,2x2,4x2y2,6x2y22,3*x22,6x22*y2,4*x23];
% Row 13 is phi(x3,y3)
A13=[1,x3,x32,x33,x34,x35,y3,y32,y33,y34,y35,x3y3,x3y32,x3*y33,x3y34,x32y3,x32*y32,x32*y33,x33*y3,x33y32,x34y3];
% Row 14 is phi_x(x3,y3)
A14=[0,1,2x3,3x32,4*x33,5x34,0,0,0,0,0,y3,y32,y33,y34,2x3y3,2x3y32,2*x3*y33,3x32*y3,3*x32y32,4*x33y3];
% Row 15 is phi_y(x3,y3)
A15=[0,0,0,0,0,0,1,2y3,3y32,4*y33,5y34,x3,2*x3*y3,3*x3*y32,4x3y33,x32,2x32*y3,3*x32y32,x33,2x33*y3,x34];
% Row 16 is phi_xx(x3,y3)
A16=[0,0,2,6x3,12x32,20*x33,0,0,0,0,0,0,0,0,0,2y3,2y32,2*y33,6x3y3,6x3y32,12*x32*y3];
% Row 17 is phi_yy(x3,y3)
A17=[0,0,0,0,0,0,0,2,6y3,12y32,20*y33,0,2x3,6x3y3,12x3y32,0,2*x32,6x32*y3,0,2*x33,0];
% Row 18 is phi_xy(x3,y3)
A18=[0,0,0,0,0,0,0,0,0,0,0,1,2y3,3y32,4*y33,2x3,4x3y3,6x3y32,3*x32,6x32*y3,4*x33];
% Row 19 is dphi/dn1
A19=[0,-1/20.5,-1/20.52x4,-1/20.5*3*x42,-1/20.5*4*x43,-1/20.5*5*x44,-1/20.5,-1/20.52y4,-1/20.5*3*y42,-1/20.5*4*y43,-1/20.5*5*y44,-1/20.5*(x4+y4),-1/20.5(y42+2*x4*y4),-1/20.5(y43+3*x4*y42),-1/20.5*(y44+4x4y43),-1/20.5(2x4y4+x42),-2/20.5(x4y42+x42y4),-1/20.5*(2*x4*y43+3x42*y42),-1/20.5*(3*x42y4+x43),-1/20.5(3x42*y42+2x43*y4),-1/20.5(4*x43*y4+x44)];
% Row 20 is dphi/dn2
A20=[0,-1,-2x5,-3x52,-4*x53,-5x54,0,0,0,0,0,-y5,-y52,-y53,-y54,-2x5y5,-2x5y52,-2*x5*y53,-3x52*y5,-3*x52y52,-4*x53y5];
% Row 21 is dphi/dn3
A21=[0,0,0,0,0,0,1,2y6,3y62,4*y63,5y64,x6,2*x6*y6,3*x6*y62,4x6y63,x62,2x62*y6,3*x62y62,x63,2x63*y6,x64];
clc;
disp([A1;A2;A3;A4;A5;A6;A7;A8;A9;A10;A11;A12;A13;A14;A15;A16;A17;A18;A19;A20;A21]);
clear all;
end
输出结果:
1.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 2.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 2.0000 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1.0000 0 0 0 0 0 0 0 0 0
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1.0000 2.0000 3.0000 4.0000 5.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1.0000 0 0 0 0 1.0000 0 0 0 1.0000 0 0 1.0000 0 1.0000
0 0 2.0000 6.0000 12.0000 20.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 2.0000 0 0 0 0 2.0000 0 0 0 2.0000 0 0 2.0000 0
0 0 0 0 0 0 0 0 0 0 0 1.0000 0 0 0 2.0000 0 0 3.0000 0 4.0000
1.0000 0 0 0 0 0 1.0000 1.0000 1.0000 1.0000 1.0000 0 0 0 0 0 0 0 0 0 0
0 1.0000 0 0 0 0 0 0 0 0 0 1.0000 1.0000 1.0000 1.0000 0 0 0 0 0 0
0 0 0 0 0 0 1.0000 2.0000 3.0000 4.0000 5.0000 0 0 0 0 0 0 0 0 0 0
0 0 2.0000 0 0 0 0 0 0 0 0 0 0 0 0 2.0000 2.0000 2.0000 0 0 0
0 0 0 0 0 0 0 2.0000 6.0000 12.0000 20.0000 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1.0000 2.0000 3.0000 4.0000 0 0 0 0 0 0
0 -0.7071 -0.7071 -0.5303 -0.3536 -0.2210 -0.7071 0.7071 -0.5303 0.3536 -0.2210 0 0.1768 -0.1768 0.1326 0.1768 0 -0.0442 0.1768 -0.0442 0.1326
0 -1.0000 0 0 0 0 0 0 0 0 0 -0.5000 -0.2500 -0.1250 -0.0625 0 0 0 0 0 0
0 0 0 0 0 0 1.0000 0 0 0 0 0.5000 0 0 0 0.2500 0 0 0.1250 0 0.0625
`