Skip to content
Snippets Groups Projects
Commit e665c5f9 authored by Lang, Jens's avatar Lang, Jens
Browse files

Upload New File

parent 75b55d7e
No related branches found
No related tags found
No related merge requests found
function Coeffs = def_adjoint_peer_meth(meth)
%%%
%%% Coefficients of the adjoint discrete Peer methods
%%% AP4o33pa, AP4o33pfs, and AP4o43p
%%% Jens Lang and Bernhard A. Schmitt, 2024
%%%
if strcmpi(meth,'AP4o33pa')
name = 'AP4o33pa';
%%%
matA0 = [ -1.15776545053745785, 4.18041982218309242, -3.57123751413811795, 0.434466878981726612;
9.32004641586842444, -20.4351525197780492, 20.5366807975868225, -2.66042073507155447;
-9.50244685490493157, 18.1429495340814519, -17.8883756002821434, 2.64370625443895640;
1.57386544684708436, -2.96819811062586224, 2.20164646613211905, 0.149815169218439022];
matA = [ 0.707317073170731707, 0, 0, 0;
-1.45804476935905381, 2.01111111111111111, 0, 0;
0.896349914369814958, -3.44664312359408312, 2.17021276595744681, 0;
0.0880773390916265128, 0.355550738343604843, -0.891498616658766582, 0.567567567567567568];
matAN = [ 0.0357084153869351479, 0.4969703797836259, 0, 0;
2.797947998593283, -2.71711108917965831, 1.82758705410503492, -0.312035927923425972;
-3.79705846746989449, 4.49820885580674127, -2.91372512780947156, 0.817341669948077132;
0.483707383234413883, 0.109314879436931450, -0.402129665205866941, 0.0752736412932744167];
matK0 = [ 0.152542372881355932, 0.0634328358208955224, -0.0442477876106194690, 0;
0.245541449414229068, 0.347952853495927220, 0.264344548327940914, 0;
-0.238911975758696484, 0.368727925011343261, -0.235427961469025681, 0;
0.0344709234285259469, -0.0532011508785264731, 0.0371106414248961343, 0.247953574563469228];
matK = diag([0.224081702550453405, 0.291151862763378534, 0.255813953488372093, 0.228952481197795968]);
matKN = [ 0.2323465386026342, 0.08709000303247828, 0, 0;
0.000657849752067898742, -0.280033661681469416, 0, 0;
-0.000640088198525566162, 0.506244371575439921, 0.326948793781323850, 0;
0.0000923538102634218939, -0.0730424287576300562, 0, 0.0100480194317023389];
matR = [0, 0, 0, -0.210599403449096441;
0, 0, 0, 0.187644579213773871;
0, 0, 0, -0.129794666599707980;
0, 0, 0, 0.152749490835030550];
matRN = [0, 0, 0, -0.175110107050592060;
0, 0, 0, 0.229602241151716507;
0, 0, 0, -0.524736500544361632;
0, 0, 0, -0.07622773831802632];
s = 4;
vecC = [46/5253; 29/51; 1723/2193; 17131/12189];
e4 = ones(4,1);
vecA = matA0*e4;
vecW = matAN'*e4;
matV4 = [vecC.^0,vecC.^1,vecC.^2,vecC.^3];
matV4inv = matV4^(-1);
matP4 = [1 1 1 1; 0 1 2 3; 0 0 1 3; 0 0 0 1];
matE4 = diag([1 2 3], 1);
matB = (matA*matV4 - matK*matV4*matE4 + matR)*matP4*matV4inv;
matBN = (matAN*matV4 - matKN*matV4*matE4 + matRN)*matP4*matV4inv;
e4m = [1;0;0;0];
vecV = (matV4')^(-1)*e4m;
elseif strcmpi(meth,'AP4o33pfs')
name = 'AP4o33pfs';
%%%
matA0 = [ 1.333333333333333, 0, 0, 0;
-2.789814648187671, 2.243282202070159, 0.06686328023669716, 0.01646570267735142;
4.349477807846901,-6.391186028966211, 2.276667661951199, -0.06058221663260115;
-6.567438826613935, 9.406667237260441,-4.671899050533916, 1.788163545558252];
matA = [ 0.7857142857142857,0, 0, 0;
-2.028837530067695, 2.203900659027200, 0, 0;
4.063000939519495,-6.340099591541239, 2.287165301103365, 0;
-6.494320028787459, 9.394962342878431,-4.615533409449387, 1.744047031603003];
matAN = [ 1, 0, 0, 0;
-1.037159659693408, 0.4363577782952090, 0.6845553714934806,-0.2064640160522880;
0.03605110452225963,-0.5660510638564654,-0.1074762596776216, 0.7596425122215622;
0.001108555171148741,0.1296932855612564,-0.5770791118158589, 0.4468215038307258];
matK0 = diag([0, 0.2868808051464541, 0.4845433642003949, 0.2814200916147642]);
matK = diag([0, 0.2754665812532002, 0.4295774647887324, 0.2949559539580673]);
matKN = [ 0.3333333333333333, 0, 0, 0;
-0.3406285072951739, 0.1264725806602174, 0, 0;
0.1282327493289677, 0, 0.5627483658896584, 0;
-0.03272942952658255, 0, 0, 0.1697266466479663];
matR = [ 0, 0, 0, 0;
0, 0, 0, 0.156340095159149050;
0, 0, 0, -0.0212049600240154176;
0, 0, 0, -0.135135135135135135];
matRN = [ 0, 0, 0, 0.0463093438915248733;
0, 0, 0, 0.191797796516481359;
0, 0, 0, -0.286597642859776972;
0, 0, 0, 0.1785714285714285754];
s = 4;
vecC = [0; 9/86; 321/602; 1];
e4 = ones(4,1);
vecA = matA0*e4;
vecW = matAN'*e4;
matV4 = [vecC.^0,vecC.^1,vecC.^2,vecC.^3];
matV4inv = matV4^(-1);
matP4 = [1 1 1 1; 0 1 2 3; 0 0 1 3; 0 0 0 1];
matE4 = diag([1 2 3], 1);
matB = (matA*matV4 - matK*matV4*matE4 + matR)*matP4*matV4inv;
matBN = (matAN*matV4 - matKN*matV4*matE4 + matRN)*matP4*matV4inv;
e4m = [1;0;0;0];
vecV = (matV4')^(-1)*e4m;
elseif strcmpi(meth,'AP4o43p')
name = 'AP4o43p';
%%%
matA0 = [ 7.66666666666666667, -7.95238095238095238, 6.42857142857142857, -1;
-37.6457338578986401, 46.5146502212408503, -35.3473322450148652, 5.55674296649591893;
38.9040130866197642, -51.0331029412282968, 39.8467476911860376, -5.98762214872148145;
-9.13203968686396021, 14.1961513461232192, -13.4262421473903337, 3.41091057259464445];
matA = [ 2.08043751302843489, 0, 0, 0;
-6.58276780946094426, 2.84348148772695733, 0, 0;
5.64006409116323650, -4.38156354525157551, 2.01079068332727525, 0;
-1.34482758620689655, 3.26339973127943850, -4.50904595597500808, 1.98003139036908193];
matAN = [ 2.60294117647058824, 0.0942130055561403664, -1.07290671521259909, 0.6;
-9.77053883888651374, 3.64351749199891370, 4.76596963882955695, -3.17233604139706978;
9.12175843871911709, -5.32432432432432432, -3.19354838709677419, 3.51407117409450770;
-2.13701803226019819, 3.21740454865792099, -2.95625433768097550, 1.06705120253170978];
matK0 = [ 0.220130981453414013, -0.00168533108311871587, 0.0321442613056029265, 0;
0.111184598670213729, 0.431174554102291788, -0.177496780465271151, 0;
-0.118824307411673744, -0.00994564422562632893, 0.227995417316306658, 0;
0.0277749854684269964, 0.00232477789989438888, -0.0443404082676804983, 0.288385222035427183];
matK = diag([0.252309394841236446, 0.450431330440438822, 0, 0.297259274718324732]);
matKN = [ 0.275212206036510905, 0, 0.0307692307692307692, 0.0649350649350649351;
-0.0708868062462349264, 0.373542271243861921, -0.169904025698654343, -0.358563690597809490;
0.0757575757575757576, 0, 0.275092628801415933, 0.383201295033972388;
-0.0177082081236116078, 0, -0.0424436648712894966, 0.192173796161760009];
s = 4;
vecC = [4657/46172; 43/97; 3991/6596; 21111803999/23798723875];
e4 = ones(4,1);
vecA = matA0*e4;
vecW = matAN'*e4;
matV4 = [vecC.^0,vecC.^1,vecC.^2,vecC.^3];
matV4inv = matV4^(-1);
matP4 = [1 1 1 1; 0 1 2 3; 0 0 1 3; 0 0 0 1];
matE4 = diag([1 2 3], 1);
matB = (matA*matV4 - matK*matV4*matE4)*matP4*matV4inv;
matBN = (matAN*matV4 - matKN*matV4*matE4)*matP4*matV4inv;
e4m = [1;0;0;0];
vecV = (matV4')^(-1)*e4m;
end %%% end if
Coeffs = struct('c',vecC,...
's',s,...
'A',matA,...
'A0',matA0,...
'AN',matAN,...
'B',matB,...
'BN',matBN,...
'K',matK,...
'K0',matK0,...
'KN',matKN,...
'vA',vecA,...
'vW',vecW,...
'vV',vecV,...
'name',name);
end %%% end function
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment