>% ************* processing of left boundary condition ****************
[Q, R_left] = qr (L '); _trans = Q'; = (R_left (1: n_l, 1: n_l)) '; _f (1: n_l, 1) = inv (RR) * l; _f (:, 1) = Q * Y_f (:, 1); _0 (:,:, 1) = Q (:, n_l +1: n); _0 (:,:, 1) = Y_0 (:,:, 1); _f (:, 1) = Y_f (:, 1);
% ************** straight marching ************************* ******* j = 1: Nvet; = V (2,1, j); = V (1,1, j); = (gamma (j) * sqrt (a))/(2 * rho * A0 (j)); (:,:, j) =-znak (j)/tau * [2 * q/(q ^ 2/ac * a), 1/(- (q/a) ^ 2 + c);
, 0]; (:, j) = znak (j) * [q * (1/tau + Kr/a)/((q/a) ^ 2-c) ;/ tau ];;
% ************** dimensional segmentation loop ********************* i = 1 : N,
% vessels loopj = 1: Nvet = V (2, i +1, j); = V (1, i +1, j); = (gamma (j) * sqrt (a) )/(2 * rho * A0 (j)); (:,:, j) =-znak (j)/tau * [2 * q/(q ^ 2/ac * a), 1/(- (q /a) ^ 2 + c);
, 0]; (:, j) = znak (j) * [q * (1/tau + Kr/a)/((q/a) ^ 2-c) ;/ tau ];
% solution of Cauchy problem = h (j)/M; _mat = (G2 (:,:, j) - G1 (:,:, j))/M; _fun = (f2 ( :, j) - f1 (:, j))/M; _0 = Z_0 ((j-1) * Nfun +1: j * Nfun,:, i); _f = Z_f ((j-1) * Nfun + 1: j * Nfun, i);
% integrationjj = 1: M, = G1 (:,:, j) + (jj-1/2) * del_mat;% intermediate matrix = f1 (:, j) + (jj-1 /2) * del_fun;% intermediate right part_0 = A * z_0 * del; _0 = z_0 + del_0;% solution of homogeneous equations_f = (A * z_f + ff) * del; _f = z_f + del_f;% solution of nonhomogeneous equations ;
% new value_0 ((j-1) * Nfun +1: j * Nfun,:, i +1) = z_0; _f ((j-1) * Nfun +1: j * Nfun , i +1) = z_f;;
% orthogonaliz aiton = [Y_0 (:,:, i +1), Y_f (:, i +1)];
[Qpr, Rpr] = qr (Y); _f (:, i +1) = Qpr (:, n_od +1) * Rpr (n_od +1, n_od +1); (n_od +1, n_od +1) = 1; _0 (:,:, i +1) = Qpr (:, 1: n_od); (:,:, i) = Rpr (1: (n_od +1), 1: (n_od +1));;
% *************** inversion of right boundary condition ************** = inv (R * Z_0 ( :,:, N +1)) * (rR * Z_f (:, N +1));
% *************** return marching ************************ ******** (:, N +1) = [alpha; 1]; (:, N +1) = [Z_0 (:,:, N +1), Z_f (:, N +1) ] * beta (:, N +1); N> 1, for i = 1: N, = N +1- i; (:, m) = inv (Ort (:,:, m)) * beta (: , m +1); (:, m) = [Z_0 (:,:, m), Z_f (:, m)] * beta (:, m);; (:, 1) = inv (Ort (:, :, 1)) * beta (:, 2);; (:, 1) = [Y_0 (:,:, 1), Y_f (:, 1)] * beta (:, 1);
% *************** vessels loop ************************ *********** j = 1: Nvet, (:,:, j) = Z ((j-1) * Nfun +1: j * Nfun, :);% solution;
% *************** reserved operators for output result **************** = [U (: , 1,1)]; i = 1: Nvet-2, UUL = [UUL (1: 2 * i); U (:, 1, i +1)];; = [UUL (1: 2 * Nvet- 2); U (:, 1, Nvet)]; = [U (:, N +1,1)]; i = 1...