function [d2psi_drho2,dpsipp_dx] = eval_psipp(x,~,~,model,gauss)
% function [d2psi_drho2] = eval_psipp(x,g,v,model,whichgrid)
% #codegen
if ~gauss
    d2psi_drho2 = model.psi.Lampp*x(model.psi.xind,:);
else
    d2psi_drho2 = model.psi.Lamppgauss*x(model.psi.xind,:); 
end

if nargout>1
    dpsipp_dx = zeros(numel(d2psi_drho2),numel(x));
    if ~gauss
        dpsipp_dx(:,model.psi.xind) = model.psi.Lampp;
    else
        dpsipp_dx(:,model.psi.xind) = model.psi.Lamppgauss;
    end
end


return
