function [C] = interpolate_func(Invariant,x,lower)
global ini_Val

if lower == 0
    p = ini_Val.p;
    Nshape = Invariant.Nshape;
    spv = Invariant.spv;
else
    p = ini_Val.p - lower;
    Nshape = Invariant.N_hat;
    spv = Invariant.spv_hat;
end
ngp_total=length(spv);

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