Mercurial > hg > smallbox
comparison util/SL_A.m @ 8:33850553b702
(none)
author | idamnjanovic |
---|---|
date | Mon, 22 Mar 2010 10:56:54 +0000 |
parents | 7750624e0c73 |
children | fc395272d53e |
comparison
equal
deleted
inserted
replaced
7:0151f1ea080d | 8:33850553b702 |
---|---|
1 function y = SL_A(mode, m, n, x, I, dim) | 1 function y = SL_A(A, mode, m, n, x, I, dim) |
2 % Ivan Damnjanovic 2009 | 2 % Ivan Damnjanovic 2009 |
3 % This is auxilary function to allow implicit matrices from SPARCO | 3 % This is auxilary function to allow implicit matrices from SPARCO |
4 % to be used with SparsLab solvers | 4 % to be used with SparsLab solvers |
5 | 5 |
6 global SMALL | 6 global SMALL |
7 if (mode == 1) | 7 if (mode == 1) |
8 | 8 |
9 u = zeros(dim, 1); | 9 u = zeros(dim, 1); |
10 u(I) = x; | 10 u(I) = x; |
11 y = SMALL.Problem.A(u,1); | 11 y = A(u,1); |
12 | 12 |
13 elseif (mode == 2) | 13 elseif (mode == 2) |
14 | 14 |
15 x2 = SMALL.Problem.A(x,2); | 15 x2 = A(x,2); |
16 y = x2(I); | 16 y = x2(I); |
17 | 17 |
18 end | 18 end |
19 | 19 |
20 end | 20 end |