function result = C3a32(x,t) global gamma beta omega theta global m f v r L % % Computes the advective solution for phase 3 in the interval % v3*t <= x <= v2*t, by adjusting the overall % solution C3a (without the Dirac spike) for the jump. % It adds the jump of K_eta where xi <= eta. % result = C3a(x,t); xi = beta*omega/theta*(v(1)*t-x)/(v(1)-v(3)); eta = beta*theta/omega*(x-v(3)*t)/(v(1)-v(3)); i0 = find(xi <= eta); e0 = exp(-((r(3)*v(1)-r(1)*v(3))*t-(r(3)-r(1))*x(i0))/(v(1)-v(3))) ... /(f(3)*omega*(v(1)-v(3))); result(i0) = result(i0) + e0.*m(2)*theta/omega*L(2,3)*exp(-gamma*xi(i0));