% This routine is needed for G Vainikko's method of solution for the 
% Lippmann-Schwinger equation. Implements the operator [I + g* (V. )]w, 
% where * denotes convolution and . denotes pointwise multiplication.
%
% Samuli Siltanen March 2012

function result = GV_LS(w, fundfft, V, M, h)

% Reshape w to vertical vector
w = w(:);

% Temporary variable for w given on the square grid
wtmp = reshape(w, 2^M, 2^M);

% Convolution-multiplication operator
result = h^2*ifft2(fundfft .* fft2(V.*wtmp));

% Final result needs the identity operator
result = w + result(:);


