% FMVmu is a driver script for showing the multigrid method
% full approximation scheme
%
%
m = input('number of levels \n');

mu = input('cycle index (1 for V, 2 for W, etc.) \n');

nu1 = input('number of pre-sweeps \n');

nu2 = input('number of postsweeps \n');

nu0 = input('number of coarse-grid sweeps \n');

u = zeros(0,1);
ur = zeros(0,1);

%   The following two lines are used for printing picture of cycle and may be
%   safely removed.
global level
level = [];

%   Use either mg to call the recursive version of the multigrid algorithm
%   or mg_nr to call the non-recursive version.

fmg(m,nu1,nu2,nu0,mu,u,ur)

%   The following line is used for printing picture of cycle and may be safely
%   removed.
plot(level)