function [Vpp] = eval_Vpp(x,g,~,model,gauss)
% function [Vpp] = eval_Vpp(x,g,v,model,whichgrid)
% #codegen

if ~gauss;
    ngrid = model.rgrid.nrho;
else
    ngrid = model.rgrid.nrhogauss;
end

if ~gauss
    Vpp = model.geom.LamGp*g(model.geom.ind_Vp,:);
else
    Vpp = model.geom.LamGpgauss*g(model.geom.ind_Vp,:);
end



return