function [N_hat,dN_hat,spv] = loworder_Bsp_generic(ini_Val,lower,gaussp)
%function to calculate lowerorder B-spline
%
if nargin==1
    lower=1;
end

p = ini_Val.p-lower;
gaussno = ini_Val.gaussno;
U = ini_Val.U;
U(1:lower)= [];
U(end-lower+1:end)=[];
%
N_hat = zeros(length(gaussp),(p+1));
dN_hat = zeros(length(gaussp),(p+1));
gaussp(end) = gaussp(end)-1e5*eps;
for i=1:length(gaussp)
        [Nsh,sp]=evaluate_BSp(U,p,1,gaussp(i));
        N_hat(i,:)=Nsh(1,:);
        dN_hat(i,:)=Nsh(2,:);
        spv(i)=sp-p;
end

        
        