Commit 5862c165 authored by conmccoid's avatar conmccoid
Browse files

Extrap: updates after July meeting

parent 18e0810b
function [u1,u2] = ALGO_extrap_AltS_v2_20210713(A,b,f,B1,B2,ind1,ind2)
function [u1,u2,G] = ALGO_extrap_AltS_v2_20210713(A,b,f,u2,B1,B2,ind1,ind2,n,m,x)
% ALTS performs alternating Schwarz, in a compact implementation
% [u1,u2] = AltS(?)
m=1; N=10;
I=speye(size(A));
R1=I(ind1,:); P1=I(:,ind1); A1=R1*A*P1; b1=R1*A*b;
R2=I(ind2,:); P2=I(:,ind2); A2=R2*A*P2; b2=R2*A*b;
B1=R1*A*B1*P2; B2=R2*A*B2*P1;
for i=1:N
N=length(A); I=speye(N);
R1=I(ind1,:); P1=I(:,ind1); % restriction and prolongation operators
R2=I(ind2,:); P2=I(:,ind2);
A1=R1*A*P1; b1=R1*b; % restrict and prolong A and b
A2=R2*A*P2; b2=R2*b;
C1=R1*A*B1*P2; C2=R2*A*B2*P1; % info passed between subdomains
u1=zeros(N,1); u1=u1(ind1); % initial guess for u1
for i=1:n
for j=1:m
u1 = A1 \ (f(u1) - C1*u2 - b1);
end
for j=1:m
u1 = A1 \ (f(u1) - B1*u2 - b1);
u2 = A2 \ (f(u2) - B2*u1 - b2);
u2 = A2 \ (f(u2) - C2*u1 - b2);
end
if nargin==11
plot(x(ind1),u1,'r',x(ind2),u2,'b')
axis([0,1,-1,0])
pause(0.1)
end
if nargout==3
G=B1*P2*u2;
end
end
\ No newline at end of file
% EX_extrap_1DLaplace_v2_20210714
% 1DLAPLACE solves the 1D Laplace problem on [0,1] using alternating Schwarz
N=64; x=1:N-1; x=x'/N; M=N-1;
L=ones(M,1); L=spdiags([L,-2*L,L],0:2,M,M+2)*N^2;
B=[L(:,1),sparse(M,M),L(:,end)]; L=L(:,2:end-1);
u=zeros(N+1,1); % BCs
% Subdomains: [0,a] and [b,1]
a=0.6; b=0.4;
ind1=x<a; ind2=x>b; l1=sum(ind1); l2=M-sum(ind2);
B1=sparse(l1+1,l1+1,1,M,M);
B2=sparse(l2,l2,1,M,M);
gamma=-2:0.01:2; G=zeros(size(gamma)); alpha=3.6;
for i=1:length(gamma)
u2=gamma(i)*ones(M,1); u2=u2(ind2);
[u1,u2,bc] = ALGO_extrap_AltS_v2_20210713(L,B*u,@(v) sin(alpha*v),...
u2,B1,B2,ind1,ind2,1,100);
bc=bc(~ind1); G(i)=bc(1);
end
plot(gamma,G,'b-')
hold on
for k=-1:0.25:1
plot(gamma,k*sqrt(abs(gamma))+gamma,'k--')
end
hold off
axis([-2,2,-2,2])
axis square
xlabel('\gamma')
ylabel('G(\gamma)')
\ No newline at end of file
......@@ -39,6 +39,10 @@
\begin{document}
\section{Meeting notes}
\subsection{}
Nonlinear preconditioning: Krylov as extrapolation methods.
There exists proof of quadratic convergence (Sidi, \textit{Extrapolation vs. projection methods for linear systems of equations}, copy here)
......@@ -99,6 +103,20 @@ Questions:
\item do the sequences of Schwarz methods have distinct forms? Can they be predicted/exploited?
\end{itemize}
\subsection{Meeting 14.07.2021}
Goal is to take Newton's method and connect it to an extrapolation method and then a Krylov method, in an attempt to unify these types of nonlinear solves.
Also to apply extrapolation methods to the sinusoid altS example to see how they deal with these problems.
(Extrapolation methods are unlikely to find fault with this example as they will only accelerate a monotonically converging sequence; only a method seeking to quadratically converge would dramatically change the convergence behaviour.)
To read:
\begin{itemize}
\item Brezinski, Numerical stability of a quadratic method for solving systems of nonlinear equations
\item Shafer, On quadratic approximation
\item Brezinski, Méthodes d'acceleartion de la convergence en analyse numerique
\item Gekeler, On the solution of systems of equations by the epsilon algorithm of Wynn
\end{itemize}
\section{Framework of acceleration methods}
Take a sequence $(S_n) \to S$.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment