function [C C1 C2] = interpolate_func_2(Invariant,x)
global ini_Val

p = ini_Val.p;
Nshape = Invariant.Nshape;
dNshape = Invariant.dNsh;
if (nargout == 3)
    ddNshape = Invariant.ddNsh;
else
    ddNshape = zeros(size(Invariant.Nshape));
end
spv = Invariant.spv;
ngp_total=length(spv);

C = zeros(ngp_total,1);
C1 = zeros(ngp_total,1);
C2 = zeros(ngp_total,1);
for k=1:(p+1)
    C(:) = C(:) + Nshape(:,k).*x((spv(:)+k-1));
    C1(:) = C1(:) + dNshape(:,k).*x((spv(:)+k-1));
    C2(:) = C2(:) + ddNshape(:,k).*x((spv(:)+k-1));
end
