clear all; close all;
n = input('Number of gridpoints in one direction ');
maxit = input('Maximum number of iterations= ');
tol = 1e-8;
A = gallery('poisson',n);
x = ones(n^2,1);
b = A*x;

L = tril(A,0);
D = diag(diag(A));

% make here your preconditioner

% call to your pcg routine

% Plot the residual norm as function of the iteration number
figure

% niter: the number of iterations to compute the solution
semilogy(resnrm);
