function [ alpha, m, tau, taut ] = SP_Sub34(alpha, G, H, IUP, k, m, NYS, tau, taut)
%sub34 Summary of this function goes here
%   Detailed explanation goes here

m=m+1;
XTST=((taut-alpha(m))^2)^.5;
taus=(k(m)/XTST)*(taut-alpha(m))+alpha(m);
% Q=(taus-alpha(m))/((taus-alpha(m))^2)^.5;
Q=(XTST-alpha(m))/((XTST-alpha(m))^2)^.5;
% H1=H(m)*G/(G - H(m));


% Stress correction
if IUP==1
    
%     ex=Q*(taut - taus) / (H1 + G);
%     taut=taut-G*ex*Q;
    
    taut=taus+(H(m)/G)*(taut-taus);
    [ alpha, m, tau ] = SP_Sub5( alpha, G, H, IUP, k, m, NYS, tau, taus, taut);
elseif IUP==2
    % Stress corretion for additional crossings
%     H2=H(m-1)*G/(G - H(m-1));
%     ex = (H2 + G) * Q * (taut - taus) /H2/ (H1 + G);
%     y = ex * (H2 - H1)/(H2 + G);
%     taut = taut - y * G * Q;
    
    taut=taus+(H(m)/H(m-1))*(taut-taus);
    [ alpha, m, tau ] = SP_Sub5( alpha, G, H, IUP, k, m, NYS, tau, taus, taut );
end

