@@ -117,7 +117,7 @@ function onSettingsChanged(obj)
117117 n = [nx , ny ];
118118
119119 hx = 1 /(nx + 1 );
120- hy = 1 /(ny + 1 );
120+ hy = 2 /(ny + 1 );
121121
122122 xdomain = [0 , 1 ];
123123 ydomain = [0 , 2 ];
@@ -152,23 +152,22 @@ function onSettingsChanged(obj)
152152 % for a detailed method, the "Eigenvalue Method" which makes this
153153 % particularly efficient
154154
155- nfLx = - full(Lx );
156- nfLy = - full(Ly );
157- [P1 , Lambda ] = eig(nfLx );
158- [P2 , D ] = eig(nfLy );
155+ % nfLx = -full(Lx);
156+ % nfLy = -full(Ly);
157+ % [P1, Lambda] = eig(nfLx);
158+ % [P2, D] = eig(nfLy);
159159
160160 % We can represent the eigenvalues as
161- % dLambda = (4/(hx^2) * (sin(pi*(1:nx)/(2*(nx + 1))).^2)).';
162- % dD = (4/(hy^2) * (sin(pi*(1:ny)/(2*(ny + 1))).^2)).';
163- % L12 = 1./(dLambda + dD.');
164- % P1 = sqrt(2/(nx + 1))*sin((1:nx).'*(1:nx)*pi/(nx + 1));
165- % P2 = sqrt(2/(ny + 1))*sin((1:ny).'*(1:ny)*pi/(ny + 1));
161+ dLambda = (4 /(hx ^ 2 ) * (sin(pi *(1 : nx )/(2 *(nx + 1 ))).^2 )).' ;
162+ dD = (4 /(hy ^ 2 ) * (sin(pi *(1 : ny )/(2 *(ny + 1 ))).^2 )).' ;
163+ L12 = 1 ./(dLambda + dD .' );
164+ P1 = sqrt(2 /(nx + 1 ))*sin((1 : nx ).' *(1 : nx )*pi /(nx + 1 ));
165+ P2 = sqrt(2 /(ny + 1 ))*sin((1 : ny ).' *(1 : ny )*pi /(ny + 1 ));
166166
167-
168-
169- L12 = 1 ./(diag(Lambda ) + diag(D ).' );
170- P1T = P1 .' ;
171- P2T = P2 .' ;
167+
168+ % L12 = 1./(diag(Lambda) + diag(D).');
169+ % P1T = P1.';
170+ % P2T = P2.';
172171
173172 ys = linspace(ydomain(1 ), ydomain(end ), ny + 2 );
174173 ys = ys(2 : end - 1 );
@@ -179,7 +178,7 @@ function onSettingsChanged(obj)
179178 F = sin(pi *(ymat .' - 1 ));
180179
181180 obj.Rhs = otp .Rhs(@(t , psi ) ...
182- otp .qg .f(psi , Lx , Ly , P1 , P1T , P2 , P2T , L12 , Dx , DyT , F , Re , Ro ), ...
181+ otp .qg .f(psi , Lx , Ly , P1 , P2 , L12 , Dx , DyT , F , Re , Ro ), ...
183182 ...
184183 otp .Rhs .FieldNames .JacobianVectorProduct , @(t , psi , u ) ...
185184 otp .qg .jvp(psi , u , L , RdnL , PdnL , Ddx , Ddy , Re , Ro ), ...
0 commit comments