@@ -147,49 +147,33 @@ function onSettingsChanged(obj)
147147
148148 % do decompositions for the eigenvalue sylvester method. see
149149 %
150- % Kirsten, Gerhardus Petrus. Comparison of methods for solving Sylvester systems. Stellenbosch University, 2018.
150+ % Kirsten, Gerhardus Petrus. Comparison of methods for solving Sylvester systems. Stellenbosch University, 2018.
151151 %
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);
159-
160- % We can represent the eigenvalues as
161- % dLambda = ((2*sinpi((1:nx)/(2*(nx + 1)))/hx).^2).';
162- % dD = ((2*sinpi((1:ny)/(2*(ny + 1)))/hy).^2).';
163- % L12 = 1./(dLambda + dD.');
164155 hx2 = hx ^ 2 ;
165156 hy2 = hy ^ 2 ;
166157 cx = (1 : nx )/(nx + 1 );
167158 cy = (1 : ny )/(ny + 1 );
168159 L12 = -(hx2 * hy2 ./(2 *(-hx2 - hy2 + hy2 * cospi(cx ).' + hx2 * cospi(cy ))));
169160 P1 = sqrt(2 /(nx + 1 ))*sinpi((1 : nx ).' *(1 : nx )/(nx + 1 ));
170161 P2 = sqrt(2 /(ny + 1 ))*sinpi((1 : ny ).' *(1 : ny )/(ny + 1 ));
171-
172-
173- % L12 = 1./(diag(Lambda) + diag(D).');
174- % P1T = P1.';
175- % P2T = P2.';
176162
177163 ys = linspace(ydomain(1 ), ydomain(end ), ny + 2 );
178164 ys = ys(2 : end - 1 );
179165
180166 ymat = repmat(ys .' , 1 , nx );
181- % ymat = reshape(ymat.', prod(n), 1);
182- % F = sin(pi*(ymat - 1));
183167 F = sin(pi *(ymat .' - 1 ));
184168
185169 obj.Rhs = otp .Rhs(@(t , psi ) ...
186170 otp .qg .f(psi , Lx , Ly , P1 , P2 , L12 , Dx , DyT , F , Re , Ro ), ...
187171 ...
188- otp .Rhs .FieldNames .JacobianVectorProduct , @(t , psi , u ) ...
189- otp .qg .jvp(psi , u , L , RdnL , PdnL , Ddx , Ddy , Re , Ro ), ...
172+ otp .Rhs .FieldNames .JacobianVectorProduct , @(t , psi , v ) ...
173+ otp .qg .jvp(psi , v , Lx , Ly , P1 , P2 , L12 , Dx , DyT , F , Re , Ro ), ...
190174 ...
191- otp .Rhs .FieldNames .JacobianAdjointVectorProduct , @(t , psi , u ) ...
192- otp .qg .javp(psi , u , L , RdnL , PdnL , Ddx , Ddy , Re , Ro ));
175+ otp .Rhs .FieldNames .JacobianAdjointVectorProduct , @(t , psi , v ) ...
176+ otp .qg .javp(psi , v , L , RdnL , PdnL , Ddx , Ddy , Re , Ro ));
193177
194178
195179 % AD LES
0 commit comments